[polybar] Add icons to pomo timer

Added running and paused tomato icons; as well as break coffee icon.
Removed display of seconds, unless the last minute of a timer is
running.
This commit is contained in:
Marty Oehme 2020-05-25 15:41:15 +02:00
parent 657ef21b0b
commit 2d78271113
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A

View file

@ -23,7 +23,13 @@ restart_notify() {
if [ -z "$1" ]; then
run_notify
while true; do
pomo clock
display=$(pomo clock)
# replace W (work)
# B (break)
# P (paused) with pomodoro symbols
# remove seconds *except for* when 00 minutes reached
display=$(echo "$display" | sed -e 's/P.*$/  /;s/W/ /;s/B/ /;/00:/! { s/:[[:digit:]]\+$// }')
echo "$display"
sleep 1
done
elif [ "$1" = "toggle" ]; then