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

12 lines
238 B
Bash
Executable file

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