[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Halevt-dev] Example configurations
From: |
Marcin Gryszkalis |
Subject: |
Re: [Halevt-dev] Example configurations |
Date: |
Wed, 20 May 2009 15:50:27 +0200 |
User-agent: |
KMail/1.9.10 |
On Wednesday of May 20 2009, Felix wrote:
> Just thought I would ask how other list readers have configured halevt.
> Mine is very standard although I have notification for the Awesome
> window manager on volume mount. Anyone care to give examples?
I added notifications too, like:
<halevt:Device
match="hal.info.category = printer | hal.info.category = scanner ">
<halevt:Insertion exec="/bin/popper -n -5
'$hal.info.category$ detected'
'Connected $hal.info.vendor$ $hal.info.product$'
'/usr/share/icons/nuvola/64x64/devices/printer.png'"
/>
</halevt:Device>
<halevt:Device
match="hal.info.category = printer | hal.info.category = scanner">
<halevt:Removal exec="/bin/popper -n -5
'$hal.info.category$ removed'
'Removed $hal.info.vendor$ $hal.info.product$'
'/usr/share/icons/nuvola/64x64/devices/printer.png'"
/>
</halevt:Device>
<halevt:Device match="hal.volume.is_disc = true & hal.volume.disc.is_blank
= true">
<halevt:Insertion
exec="/bin/popper -n -5
'Empty disc'
'This disc is empty ($hal.volume.disc.type$)'
'/usr/share/icons/nuvola/64x64/devices/cdwriter_unmount.png'" />
</halevt:Device>
/bin/popper is from http://phospher.com/index.php/Popper
I also created fdi rule to create mount point from volume labels
<match key="volume.label" empty="false">
<match key="volume.label" is_absolute_path="false">
<merge key="volume.policy.desired_mount_point"
type="copy_property">volume.label</merge>
</match>
</match>
and then in halevt config:
<halevt:Device match="&MOUNTABLE;">
<halevt:Insertion
exec="halevt-mount -u $hal.udi$ -o sync -p
$hal.volume.policy.desired_mount_point$ -m 002"
/>
</halevt:Device>
My favourite thing is the rule that check for existence of DCIM directories on
mounted volume (stadard digital camera dirs), asks for confirmation and moves
photos to local hdd - but main part of this is separate perl script so it's
not interesting as halevt example
greetings
--
Marcin Gryszkalis, PGP 0x9F183FA3
jabber jid:address@hidden, gg:2532994
http://the.fork.pl