/
udisks-glue.conf
56 lines (47 loc) · 1.57 KB
/
udisks-glue.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# Filters
#
filter backup {
optical = false
partition_table = false
usage = filesystem
uuid = 0ff8cf2f-030a-4ff8-b128-73dc1e322061
}
filter disks {
optical = false
partition_table = false
usage = filesystem
}
filter burnable {
optical = true
optical_disc_closed = false
}
filter optical {
optical = true
}
#
# Rules to apply
#
match backup {
automount = true
automount_options = sync
post_mount_command = "notify-send 'Backup' 'mounted %device_file to %mount_point' && notify-send -u critical -t 10000 'Starting Backup' 'Do NOT remove the disk' && rsync -az --delete /home/me %mount_point/ && notify-send 'Backup finished' 'You can safely remove the disk' || notify-send -u critical -t 10000 'Backup Failed' 'Check what happened'"
post_unmount_command = "notify-send 'Backup' 'unmounted %device_file from %mount_point'"
}
match disks {
automount = true
automount_options = { sync, noatime}
post_mount_command = "notify-send 'disk' 'mounted %device_file to %mount_point'"
post_unmount_command = "notify-send 'disk' 'unmounted %device_file from %mount_point'"
}
match burnable {
#post_insertion_command = "k3b %device_file"
post_mount_command = "notify-send 'burnable' 'mounted %device_file %mount_point'"
post_insertion_command = "udisks --mount %device_file --mount-options ro"
}
match optical {
automount = true
automount_options = ro
post_mount_command = "notify-send 'optical' 'mounted %device_file %mount_point'"
post_insertion_command = "udisks --mount %device_file --mount-options ro"
}