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

12 lines
251 B
Bash
Executable file

#!/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>'