Created
July 21, 2015 02:46
-
-
Save TylerOderkirk/228b745f3b1e7a97fe1d to your computer and use it in GitHub Desktop.
Switching tmux windows on ADS7846 touch events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while :; do # until forever... | |
if ! evtest --query /dev/input/event2 EV_KEY BTN_TOUCH; then # if somebody is pressing their finger on the touchscreen... | |
echo BTN_TOUCH! | |
tmux next-window -t 0 # tell un-named tmux session #0 to switch to its next window | |
sleep .1s # avoid doing this twice for a single touch | |
fi | |
sleep .05s | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment