#!/bin/sh notif() { notify-send -t "${2:-1000}" "pomo" "$1"; sleep 1; } for msg in "three" "two" "one" do notif "$msg" done # $1: time in seconds # $2: msg for notification ring_ring() { time="$(($1*1000*60))" date '+%R B' notif "$time" "$2" sleep "$time"s } i="${1-0}" while true do notif "START" date '+%R S' sleep 20m if [ "$i" -eq 3 ] then i=0 ring_ring 20 "GIGA BREAK TIME" else ring_ring 5 "BREAK TIME" i=$((i+1)) fi done