Skip to content

Instantly share code, notes, and snippets.

@0xbb
Created October 28, 2016 22:57
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 0xbb/2da31edfee775ac03118880fd64c5c2e to your computer and use it in GitHub Desktop.
Save 0xbb/2da31edfee775ac03118880fd64c5c2e to your computer and use it in GitHub Desktop.
i3blocks coffee
#!/bin/bash
while true;
do
xdotool mousemove_relative --sync -- 1 1
xdotool mousemove_relative --sync -- -1 -1
sleep 60
done
#!/bin/bash
running=$(pgrep -c -x coffee.sh)
if [[ $BLOCK_BUTTON -eq 1 ]]; then
if [[ running -eq 0 ]]; then
i3-msg exec coffee.sh &> /dev/null
else
i3-msg exec pkill -x coffee.sh &> /dev/null
fi
running=$((1-$running))
fi
if [[ running -le 0 ]]; then
echo ""
else
echo ""
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment