Skip to content

Instantly share code, notes, and snippets.

@JosephRedfern
Created September 28, 2016 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JosephRedfern/a417548a5691c5faaafa43383d5a2b97 to your computer and use it in GitHub Desktop.
Save JosephRedfern/a417548a5691c5faaafa43383d5a2b97 to your computer and use it in GitHub Desktop.
#!/bin/bash
while read line;
do
if [[ "$line" == *"CLOSE" ]]
then
echo "CLOSE"
gnome-screensaver-command -l
elif [[ "$line" == *"OPEN" ]]
then
echo "LOCK"
gnome-screensaver-command -d
elif [[ "$line" == *"TRUNK" ]]
then
echo "TRUNK"
xdotool click 1
fi
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment