Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 1ead6331ded89576584170d74abb9aaf > files > 6

ivman-0.6.14-7mdv2010.0.i586.rpm

<?xml version="1.0" encoding="UTF-8"?>
<ivm:PropertiesConfig version="0.1" xmlns:ivm="http://www.eikke.com/ivm">

    <!-- general syntax of this file:

         <ivm:Match name="matchname" value="matchvalue">
             <ivm:Property name="propertyname">
                <ivm:Action value="propertyvalue1" exec="command1" />
                <ivm:Action value="propertyvalue2" exec="command2" />
             ...
             </ivm:Property>
         </ivm:Match>

         What does this actually mean?  Well, when a property on a device
         changes, if the device matches the 'Match' tag, AND 'propertyname'
         matches the changed property on the device, AND 'propertyvalue1'
         is equal to the new value of the property, then 'command1' will be
         executed.  It's easier to just understand it from the examples :-)

         Matches can be nested.  See the examples.

         There are no restrictions for nesting matches, but Property tags
         can only have Action tags within them.

         If a property matches multiple times, all matching commands will be
         executed.
    -->

    <!-- names for Match:    

         ivm.mountable (true/false) - a volume which can be mounted by ivman
         hal.anything (mixed) - the HAL property specified by 'anything'
         * - always match (use with care!)

         The hal.anything match is very powerful; see the examples in this
         file for some things which can be done.  Use the output of 'lshal'
         to come up with properties to match for certain devices.
    -->

    <!-- names for Property:

         hal.anything (mixed) - as above, any HAL property.
         * - always match (use with care!  will be executed every time property changes...)
    -->
    <!-- commands can have any HAL properties placed within them by surrounding
         the property name with $ symbols, for example, $hal.block.device$.
    -->

    <!-- the below special option specifies whether or not to run through all
         rules once when starting.  Read the IvmConfigProperties.xml man page
         for more details.
    -->
    <ivm:Option name="checkOnInit" value="true" />

    <!-- Let everyone know when a device is mounted -->
    <!--
    <ivm:Match name="*">
        <ivm:Property name="hal.volume.is_mounted">
            <ivm:Action value="true" exec="sudo wall $hal.block.device$ mounted at $hal.volume.mount_point$" />
        </ivm:Property>
    </ivm:Match>
    -->

    <!-- The ACPI examples here need /usr/sbin/hibernate and /etc/init.d/laptop_mode added
         to whatever user Ivman runs as in /etc/sudoers. -->

    <!-- Hibernate when laptop lid is closed.  This and the rest of the ACPI
         stuff needs HAL 0.5 or better to work. -->
    <!--
    <ivm:Match name="hal.info.udi" value="/org/freedesktop/Hal/devices/acpi_LID">
        <ivm:Property name="hal.button.state.value">
            <ivm:Action value="true" exec="/usr/bin/sudo /usr/sbin/hibernate" />
        </ivm:Property>
    </ivm:Match>
    -->

    <!-- Turn 'laptop mode' on if battery is being used, and hibernate if battery gets too low. -->
    <!--
    <ivm:Match name="hal.info.udi" value="/org/freedesktop/Hal/devices/acpi_BAT0">
        <ivm:Property name="hal.battery.rechargeable.is_discharging">
            <ivm:Action value="true" exec="/usr/bin/sudo /etc/init.d/laptop_mode start" />
            <ivm:Action value="false" exec="/usr/bin/sudo /etc/init.d/laptop_mode stop" />
        </ivm:Property>

        <ivm:Property name="hal.battery.charge_level.current">
            <ivm:Action value="*" exec="$hal.battery.rechargeable.is_discharging$ &amp;&amp; [ $( expr $( expr $hal.battery.charge_level.current$ \* 100 )  / $hal.battery.charge_level.last_full$ ) -lt 5 ] &amp;&amp; /usr/bin/sudo /usr/sbin/hibernate" />
        </ivm:Property>
    </ivm:Match>
    -->

</ivm:PropertiesConfig>