Skip to content

Instantly share code, notes, and snippets.

@eladc
Last active December 17, 2018 18:56
Show Gist options
  • Save eladc/136183427dfd641d39b2742e68846ccb to your computer and use it in GitHub Desktop.
Save eladc/136183427dfd641d39b2742e68846ccb to your computer and use it in GitHub Desktop.
beeper
#!/bin/bash
function getID()
{
ID=\$(xinput | grep Touch | sort -g | head -n1 | cut -f2 -d=)
}
xinput test-xi2 --root \$ID \
| grep --line-buffered "EVENT type 22 (RawTouchBegin)" | \
while read line;do getID; paplay /home/kiosk/pop.ogg ;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment