Skip to content

Commit

Permalink
Add the timer name to system notifications. (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahlonsmith authored Apr 2, 2024
1 parent a6c9fe7 commit 0d93d9e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/pomo/notifiers/system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ SystemNotifier.done = function(self) ---@diagnostic disable-line: unused-local
if util.get_os() == util.OS.Darwin then
os.execute(
string.format(
[[osascript -e 'display notification "Timer done!" with title "Timer #%d, %s%s" sound name "Ping"']],
[[osascript -e 'display notification "Timer done!" with title "Timer #%d%s%s%s" sound name "Ping"']],
self.timer.id,
( self.timer.name and ' ('..self.timer.name..'), ' or ', ' ),
util.format_time(self.timer.time_limit),
repetitions_str
)
)
elseif util.get_os() == util.OS.Linux then
os.execute(
string.format(
[[notify-send -u critical -i "appointment-soon" "Timer %d, %s%s" "Timer done!"]],
[[notify-send -u critical -i "appointment-soon" "Timer %d%s%s%s" "Timer done!"]],
self.timer.id,
( self.timer.name and ' ('..self.timer.name..'), ' or ', ' ),
util.format_time(self.timer.time_limit),
repetitions_str
)
Expand Down

0 comments on commit 0d93d9e

Please sign in to comment.