Skip to content

Instantly share code, notes, and snippets.

@stefan2904
Last active June 1, 2025 12:33
Show Gist options
  • Save stefan2904/9000c0789402616c1e715fb024bf42f6 to your computer and use it in GitHub Desktop.
Save stefan2904/9000c0789402616c1e715fb024bf42f6 to your computer and use it in GitHub Desktop.
i3-gnome-pomodoro snippet for i3blocks
[pomodoro]
command=~/.i3/i3blocks/pomodoro.sh $BLOCK_BUTTON
interval=1
#!/bin/bash
# https://github.com/vivien/i3blocks
# https://gnomepomodoro.org/
# https://github.com/kantord/i3-gnome-pomodoro
if [ ! -z ${1+x} ];
then
#echo "key is set to '$1'";
case "$1" in
1) i3-gnome-pomodoro toggle ;;
2) i3-gnome-pomodoro start_stop ;;
3) i3-gnome-pomodoro skip ;;
esac
fi
status=`i3-gnome-pomodoro status --always`
if [[ "$status" == *"PAUSED"* ]]; then
textcolor="#FF8C00"
elif [[ "$status" == *"Break"* ]]; then
textcolor="#69BF7F"
else
textcolor="#fed8b1"
fi
# echo "<span font='FontAwesome' background='#002b36'> $status</span>";
echo " $status "
echo "$status"
echo "$textcolor"
echo "#002b36"
echo ""
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment