Skip to content

Commit

Permalink
update expiry var name & changes default expiry
Browse files Browse the repository at this point in the history
  • Loading branch information
huafu committed Oct 22, 2023
1 parent 7188331 commit 996ef1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ set -U __done_notification_urgency_level_failure normal
```fish
set -U __done_allow_nongraphical 1
```
#### For Linux, set the timeout in milliseconds at which to expire the notification. The default is "0" (never expire).
#### For Linux (except Ubuntu's Notify OSD), set the timeout in milliseconds at which to expire the notification. The default is "3000" (3 seconds). Set to "0" if you want it to never expire.

```fish
set -U __done_expire_time 3000 # 3 seconds
set -U __done_notification_duration 5000 # 5 seconds
```
## Support

Expand Down
3 changes: 2 additions & 1 deletion conf.d/done.fish
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ if set -q __done_enabled
set -q __done_sway_ignore_visible; or set -g __done_sway_ignore_visible 0
set -q __done_expire_time; or set -g __done_expire_time 0
set -q __done_tmux_pane_format; or set -g __done_tmux_pane_format '[#{window_index}]'
set -q __done_notification_duration; or set -g __done_notification_duration 3000

function __done_started --on-event fish_preexec
set __done_initial_window_id (__done_get_focused_window_id)
Expand Down Expand Up @@ -283,7 +284,7 @@ if set -q __done_enabled
end
end

notify-send --hint=int:transient:1 --urgency=$urgency --icon=utilities-terminal --app-name=fish --expire-time=$__done_expire_time "$title" "$message"
notify-send --hint=int:transient:1 --urgency=$urgency --icon=utilities-terminal --app-name=fish --expire-time=$__done_notification_duration "$title" "$message"

if test "$__done_notify_sound" -eq 1
echo -e "\a" # bell sound
Expand Down

0 comments on commit 996ef1e

Please sign in to comment.