From 4eed0902cf4c638164b1dd34289f97e8c9072129 Mon Sep 17 00:00:00 2001 From: Johann Birnick Date: Mon, 19 Aug 2024 20:15:10 -0700 Subject: [PATCH] Fixes #3 replace `dunstify` with `notify-send` --- README.md | 3 +-- polybar-timer.sh | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 12b4169..ecd3db9 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,7 @@ Use cases: pomodoro timer, self-reminder when next meeting begins, tea/pasta tim ## Dependencies -Inside the script `dunstify` is called to view the mentioned notification for the expiry time. -But this is not necessary. (Just beautiful.) If you do not use Dunst then you need to edit two lines in the script according to [this issue](https://github.com/jbirnick/polybar-timer/issues/3), and still everything (but the preview of the expiry time) **will work fine without dependencies**. +This script works perfectly **without any dependencies**. ## Installation diff --git a/polybar-timer.sh b/polybar-timer.sh index dfeef5a..f0b060d 100755 --- a/polybar-timer.sh +++ b/polybar-timer.sh @@ -21,9 +21,9 @@ minutesLeftWhenPaused () { echo $(( ( $(secondsLeftWhenPaused) + 59 ) / 60 )) ; secondsLeft () { echo $(( $(timerExpiry) - $(now) )) ; } minutesLeft () { echo $(( ( $(secondsLeft) + 59 ) / 60 )) ; } -printExpiryTime () { dunstify -u low -r -12345 "Timer expires at $( date -d "$(secondsLeft) sec" +%H:%M)" ;} -printPaused () { dunstify -u low -r -12345 "Timer paused" ; } -removePrinting () { dunstify -C -12345 ; } +printExpiryTime () { notify-send -u low -r -12345 "Timer expires at $( date -d "$(secondsLeft) sec" +%H:%M)" ;} +printPaused () { notify-send -u low -r -12345 "Timer paused" ; } +removePrinting () { notify-send -C -12345 ; } updateTail () { # check whether timer is expired