Hi all,

I'm tweaking how my laptop behaves depending on whether it is pluggde
into AC or not. Any hints or alternative suggestions are welcome.

This is my config:

/etc/sensorsd.conf:

    acpiac0.indicator0:command=/etc/sensorsd/ac_power %2

and this is the script:

    #!/bin/sh

    echo $1 >> /root/test

    case $1 in
        On)
            /sbin/sysctl -w machdep.lidaction=0
            ;;
        Off)
            /sbin/sysctl -w machdep.lidaction=1
            ;;
        *)
            echo "unknown state $1"
            exit 1
            ;;
    esac

I'd expect the lidaction to change when I plug my X270 into AC, or
unplug it, but nothing seems to happen. Running 'sensorsd -d -c 1'
didn't output anything. /root/test stays empty.



Kind regards,

Job

Reply via email to