summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2026-02-19 07:11:55 +0100
committerache <ache@ache.one>2026-02-19 07:11:55 +0100
commit8e9baf052c25e6a0a23c0f73e29a95b8e16c2aba (patch)
tree6f8fb1b6f15bfad87095b30fe179ccbf7f600d6f
parentfeat: Function exif_remove (diff)
fix: Make the notify on long commands works when there is no X11 server
-rw-r--r--functions/fish_prompt.fish3
1 files changed, 2 insertions, 1 deletions
diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish
index d3fce84..0caa8bf 100644
--- a/functions/fish_prompt.fish
+++ b/functions/fish_prompt.fish
@@ -8,7 +8,8 @@
set -g cmd_notification_threshold 15000
function __d12_prompt__check_duration
- if test (xdotool getactivewindow) -ne "$WINDOWID"
+ 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"