1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00
dotfiles/.config/i3/blocks/rotation

21 lines
342 B
Plaintext
Raw Normal View History

2016-05-15 22:40:57 +00:00
#!/bin/sh
lock="/tmp/rotlock"
[[ -e $lock ]] || echo "unlocked" > "$lock"
status=$(<$lock)
if [ $BLOCK_BUTTON -gt 0 ]; then
case $status in
"unlocked") status="locked" ;;
"locked") status="unlocked";;
esac
echo $status > "$lock"
fi
case $status in
"locked") echo "";;
"unlocked") echo "";;
esac