From 010c7903562963e5585190896f47d62218fa08fd Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 2 Oct 2023 17:43:23 +0200 Subject: added scripts --- bin/extra/pomo | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 bin/extra/pomo (limited to 'bin/extra/pomo') diff --git a/bin/extra/pomo b/bin/extra/pomo new file mode 100755 index 0000000..4227738 --- /dev/null +++ b/bin/extra/pomo @@ -0,0 +1,8 @@ +#!/bin/sh +while true +do + date +%R + sleep 20m + notify-send -u critical -t 5000 "pomodoro" "BREAK TIME" + sleep 5m +done -- cgit v1.2.3 From 472da12759cdb2e63520826add567da34376d15a Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 8 Oct 2023 17:06:33 +0200 Subject: added countdown timer --- bin/extra/pomo | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bin/extra/pomo') diff --git a/bin/extra/pomo b/bin/extra/pomo index 4227738..fa14cca 100755 --- a/bin/extra/pomo +++ b/bin/extra/pomo @@ -1,6 +1,14 @@ #!/bin/sh +notif() { notify-send -t 1000 "pomo" "$1"; sleep 1; } + +for msg in "three" "two" "one" +do notif "$msg" +done + while true -do + +do + notif "START" date +%R sleep 20m notify-send -u critical -t 5000 "pomodoro" "BREAK TIME" -- cgit v1.2.3 From f69263dc091c6a61011af9e5f3684d2895b49795 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 8 Oct 2023 17:07:02 +0200 Subject: added bigger break after four cycles --- bin/extra/pomo | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'bin/extra/pomo') diff --git a/bin/extra/pomo b/bin/extra/pomo index fa14cca..2627628 100755 --- a/bin/extra/pomo +++ b/bin/extra/pomo @@ -5,12 +5,21 @@ for msg in "three" "two" "one" do notif "$msg" done +i="${1-0}" while true do notif "START" date +%R sleep 20m - notify-send -u critical -t 5000 "pomodoro" "BREAK TIME" - sleep 5m + if [ "$i" -eq 3 ] + then + i=-1 + notify-send -u critical -t 20000 "pomodoro" "GIGA BREAK TIME" + sleep 20m + else + notify-send -u critical -t 5000 "pomodoro" "BREAK TIME" + sleep 5m + fi + i=$((i+1)) done -- cgit v1.2.3 From 9001cd2124c665abcedf359ef77507e301ea9e8e Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 9 Oct 2023 14:58:43 +0200 Subject: fixed: notification not staying long enough changed the delay from seconds to minutes through multiplying by 60. --- bin/extra/pomo | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin/extra/pomo') diff --git a/bin/extra/pomo b/bin/extra/pomo index 2627628..0971343 100755 --- a/bin/extra/pomo +++ b/bin/extra/pomo @@ -14,12 +14,12 @@ do sleep 20m if [ "$i" -eq 3 ] then - i=-1 - notify-send -u critical -t 20000 "pomodoro" "GIGA BREAK TIME" + notify-send -u critical -t 1200000 "pomodoro" "GIGA BREAK TIME" sleep 20m + i=0 else - notify-send -u critical -t 5000 "pomodoro" "BREAK TIME" + notify-send -u critical -t 300000 "pomodoro" "BREAK TIME" sleep 5m + i=$((i+1)) fi - i=$((i+1)) done -- cgit v1.2.3 From d89bf2c50e177f6570c2d845b14a014b5c7898c0 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 9 Oct 2023 21:23:24 +0200 Subject: added more verbose output --- bin/extra/pomo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/extra/pomo') diff --git a/bin/extra/pomo b/bin/extra/pomo index 0971343..27722a4 100755 --- a/bin/extra/pomo +++ b/bin/extra/pomo @@ -10,8 +10,9 @@ while true do notif "START" - date +%R + date '+%R S' sleep 20m + date '+%R B' if [ "$i" -eq 3 ] then notify-send -u critical -t 1200000 "pomodoro" "GIGA BREAK TIME" -- cgit v1.2.3 From ee6e9c223b1b73c08801b415c17e12f93e504f2a Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 10 Oct 2023 19:08:13 +0200 Subject: use a function for breaks --- bin/extra/pomo | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'bin/extra/pomo') diff --git a/bin/extra/pomo b/bin/extra/pomo index 27722a4..859dd12 100755 --- a/bin/extra/pomo +++ b/bin/extra/pomo @@ -1,10 +1,20 @@ #!/bin/sh -notif() { notify-send -t 1000 "pomo" "$1"; sleep 1; } +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 @@ -12,15 +22,12 @@ do notif "START" date '+%R S' sleep 20m - date '+%R B' if [ "$i" -eq 3 ] then - notify-send -u critical -t 1200000 "pomodoro" "GIGA BREAK TIME" - sleep 20m i=0 + ring_ring 20 "GIGA BREAK TIME" else - notify-send -u critical -t 300000 "pomodoro" "BREAK TIME" - sleep 5m + ring_ring 5 "BREAK TIME" i=$((i+1)) fi done -- cgit v1.2.3 From a01644894f9e490a7055f49d3fa8fc2c3164cc4d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 10 Oct 2023 20:58:37 +0200 Subject: introudcing the -w option of notify-send --- bin/extra/pomo | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bin/extra/pomo') diff --git a/bin/extra/pomo b/bin/extra/pomo index 859dd12..68f3d59 100755 --- a/bin/extra/pomo +++ b/bin/extra/pomo @@ -1,5 +1,5 @@ #!/bin/sh -notif() { notify-send -t "${2:-1000}" "pomo" "$1"; sleep 1; } +notif() { notify-send -t 1000 -w "pomo" "$1"; } for msg in "three" "two" "one" do notif "$msg" @@ -9,10 +9,8 @@ done # $2: msg for notification ring_ring() { - time="$(($1*1000*60))" date '+%R B' - notif "$time" "$2" - sleep "$time"s + notify-send -w "$(($1*1000*60))" -u critical "pomo" "$2" } i="${1-0}" -- cgit v1.2.3 From a93a711e4f6f112f0b5a1b29f576e5f9b8742a65 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 10 Oct 2023 20:59:09 +0200 Subject: typo --- bin/extra/pomo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/extra/pomo') diff --git a/bin/extra/pomo b/bin/extra/pomo index 68f3d59..a2c371d 100755 --- a/bin/extra/pomo +++ b/bin/extra/pomo @@ -5,7 +5,7 @@ for msg in "three" "two" "one" do notif "$msg" done -# $1: time in seconds +# $1: time in minutes # $2: msg for notification ring_ring() { -- cgit v1.2.3