-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpomodoro.fish
23 lines (23 loc) · 1.07 KB
/
pomodoro.fish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function pomodoro --description 'the pomodoro technique to stay focussed'
set banners (gsettings get org.gnome.desktop.notifications show-banners)
while true
set pause 300
set pausetype '\e[10D\e[32m[short pause]\e[0m'
for i in (seq 4)
xdotool key XF86AudioPlay
notify-send -i /usr/share/icons/hicolor/64x64/apps/io.github.alarm-clock-applet.clock.png -c productivity -u low 'pomodoro ⏰' '▶️ start working'
gsettings set org.gnome.desktop.notifications show-banners false
waitfor 1500 '\e[100D \e[100D\e[31m[working]\e[0m' '▶️ working '
xdotool key XF86AudioPlay
here_is_the_news
if [ "$i" -gt 3 ]
set pause 900
set pausetype '\e[10D\e[33m[long pause]\e[0m'
end
gsettings set org.gnome.desktop.notifications show-banners "$banners"
notify-send -i /usr/share/icons/hicolor/64x64/apps/io.github.alarm-clock-applet.clock.png -c productivity -u low 'pomodoro ⏰' '⏸️ take a break'
waitfor "$pause" "$pausetype" '⏸️ pause '
here_is_the_news
end
end
end