Skip to content

Commit

Permalink
Fixes #3
Browse files Browse the repository at this point in the history
replace `dunstify` with `notify-send`
  • Loading branch information
jbirnick committed Aug 20, 2024
1 parent b1eef1a commit 4eed090
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions polybar-timer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4eed090

Please sign in to comment.