blob: 91a2d6651625308ec0d87fc7b21e1927818f662e (
plain) (
tree)
|
|
#!/bin/sh
set -xe
function toggle () {
k=$(((`xinput list-props $1 | grep Device\ Enabled | cut -f3`+1)%2))
xinput set-prop $1 "Device Enabled" $k
echo $k > /sys/class/leds/input4\:\:capslock/brightness
}
if [ x$1 != x ]
then
toggle $1
exit
fi
for i in `xinput | grep SYNA | cut -f2 | cut -d= -f2 | sort -g | head -n2 | tail -n1`
do
toggle $i
done
|