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

13 lines
238 B
Bash
Raw Normal View History

2019-03-29 17:26:34 +00:00
#!/bin/bash
OUT=$(xinput list-props 'ELAN Touchscreen' | 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 '">Touch</span>'