Making different types of media get different icons

<?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!