diff options
| author | ache <ache@ache.one> | 2026-03-05 11:53:51 +0100 |
|---|---|---|
| committer | ache <ache@ache.one> | 2026-03-05 11:54:47 +0100 |
| commit | 4700cffda4f8b599b73c248d2a63e935550e11c9 (patch) | |
| tree | 20a70f91035832957b6b7987ee949e2f39ed789a /functions/fish_prompt.fish | |
| parent | feat: New alias to create dynamic proxies (diff) | |
fix: Check if xdotool exists
Diffstat (limited to 'functions/fish_prompt.fish')
| -rw-r--r-- | functions/fish_prompt.fish | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index e586f92..4fbdf34 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -8,12 +8,14 @@ set -g cmd_notification_threshold 15000 function __d12_prompt__check_duration - set -l active_window_id (xdotool getactivewindow 2> /dev/null) - if test "$active_window_id" != "$WINDOWID" - if test "$CMD_DURATION" - if test "$CMD_DURATION" -ge $cmd_notification_threshold - __d12_prompt__notify_completion "$CMD_DURATION" - __d12_prompt__on_duration_exceeded "$CMD_DURATION" + if type xdotool 2>/dev/null >/dev/null + set -l active_window_id (xdotool getactivewindow 2> /dev/null) + if test "$active_window_id" != "$WINDOWID" + if test "$CMD_DURATION" + if test "$CMD_DURATION" -ge $cmd_notification_threshold + __d12_prompt__notify_completion "$CMD_DURATION" + __d12_prompt__on_duration_exceeded "$CMD_DURATION" + end end end end |