Making different types of media get different icons
- Patch rox-filer to add SOAP calls for setting icons: http://kymatica.com/stuff/rox-2.3-iconsoap.patch
- Add this /etc/hal/fdi/information/10-usb-flash.fdi to detect usb flash sticks:
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> <deviceinfo version="0.2"> <device> <match key="@block.storage_device:storage.bus" string="usb"> <match key="info.category" string="volume"> <merge key="volume.is_usb_storage" type="bool">true</merge> </match> </match> </device> </deviceinfo>
- Change your ~/.ivman/IvmConfigProperties.xml rule to this:
<ivm:Match name="ivm.mountable" value="true"> <ivm:Property name="hal.volume.is_mounted"> <ivm:Action value="true" exec='rox.seticon Set "$hal.volume.mount_point$" $HOME/.ivman/other.png' /> <ivm:Action value="false" exec='rox.seticon Unset "$hal.volume.mount_point$"' /> </ivm:Property> <ivm:Match name="hal.volume.is_usb_storage" value="true"> <ivm:Property name="hal.volume.is_mounted"> <ivm:Action value="true" exec='rox.seticon Set "$hal.volume.mount_point$" $HOME/.ivman/usb.png' /> <ivm:Action value="false" exec='rox.seticon Unset "$hal.volume.mount_point$"' /> </ivm:Property> </ivm:Match> <ivm:Match name="hal.volume.is_disc" value="true"> <ivm:Property name="hal.volume.is_mounted"> <ivm:Action value="true" exec='rox.seticon Set "$hal.volume.mount_point$" $HOME/.ivman/cdr.png' /> <ivm:Action value="false" exec='rox.seticon Unset "$hal.volume.mount_point$"' /> </ivm:Property> </ivm:Match> <ivm:Property name="hal.volume.is_mounted"> <ivm:Action value="true" exec='rox.panelput Add "$hal.volume.mount_point$"' /> <ivm:Action value="false" exec='rox.panelput Remove "$hal.volume.mount_point$"' /> </ivm:Property> </ivm:Match>
- Create this script in ~/bin/rox.seticon and make it executable:
rox --RPC << EOF <?xml version="1.0"?> <env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope"> <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer"> <$1Icon> <Path>$2</Path> <Icon>$3</Icon> </$1Icon> </env:Body> </env:Envelope> EOF
- And put some icons for other.png, cdr.png and usb.png in ~/.ivman/ and you're done!
»
- Printer-friendly version
- Login to post comments
Recent comments
2 years 8 weeks ago
2 years 17 weeks ago
3 years 1 week ago
3 years 5 weeks ago
3 years 9 weeks ago
3 years 10 weeks ago
3 years 10 weeks ago
3 years 14 weeks ago
3 years 14 weeks ago
3 years 15 weeks ago