kunsis-dotfiles/.config/i3pystatus/trackpad.sh

13 lines
251 B
Bash
Raw Permalink Normal View History

2020-08-23 15:24:06 +00:00
#!/bin/bash
OUT=$(xinput list-props 'SynPS/2 Synaptics TouchPad' | awk '/^\tDevice Enabled \([0-9]+\):\t[01]/ {print $NF}')
echo -n '<span color="'
if [ $OUT -eq 0 ]
then
echo -n "#FF9900"
else
echo -n "#00FF00"
fi
echo '">Trackpad</span>'