diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-10-15 00:33:26 +0200 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-10-15 00:33:26 +0200 | 
| commit | 826ce094fecc4c6e07faf6e8b91387c2ae49842c (patch) | |
| tree | 1820c843e4e260f6b51e8d269a972295a17e558c /bin/extra/pomo | |
| parent | c032a9d071ee4b7eb2bfe79ec03d2a7dc4020f15 (diff) | |
| parent | a915b5ade1a47b9678e2f9963b13b49dbd406031 (diff) | |
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin/extra/pomo')
| -rwxr-xr-x | bin/extra/pomo | 31 | 
1 files changed, 31 insertions, 0 deletions
diff --git a/bin/extra/pomo b/bin/extra/pomo new file mode 100755 index 0000000..a2c371d --- /dev/null +++ b/bin/extra/pomo @@ -0,0 +1,31 @@ +#!/bin/sh +notif() { notify-send -t 1000 -w "pomo" "$1"; } + +for msg in "three" "two" "one" +do notif "$msg" +done + +# $1: time in minutes +# $2: msg for notification +ring_ring() +{ +	date '+%R B' +	notify-send -w "$(($1*1000*60))" -u critical "pomo" "$2" +} + +i="${1-0}" +while true + +do  +	notif "<b>START</b>" +	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  | 
