chiark
/
gitweb
/
~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6e3de42
)
bin/wakey.zsh: Use the new hook machinery to insinuate.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 21 Apr 2020 12:03:58 +0000
(13:03 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 21 Apr 2020 12:03:58 +0000
(13:03 +0100)
bin/wakey.zsh
patch
|
blob
|
blame
|
history
diff --git
a/bin/wakey.zsh
b/bin/wakey.zsh
index bb6e9087be5985d2cc9dea4e07239233e9d5e567..6f008a9930616a976d61ea9bcaf81a7631460e3e 100644
(file)
--- a/
bin/wakey.zsh
+++ b/
bin/wakey.zsh
@@
-60,12
+60,12
@@
__wakey_precmd () {
esac
}
esac
}
-case ${DISPLAY
-nil},${WINDOWID-nil
} in
-
nil,* | *,nil
) ;;
+case ${DISPLAY
+t},${WINDOWID+t},${__mdw_precmd_hook+t},${mdw__preexec_hook+t
} in
+
t,t,t,t
) ;;
*)
*)
- if
whence notify-send >/dev/null 2>&1
; then
- preexec_functions+=(__wakey_preexec)
- precmd_functions+=(__wakey_precmd)
+ if
__mdw_programp notify-send
; then
+ __mdw_addhook __mdw_preexec_hook __wakey_preexec
+ __mdw_addhook __mdw_precmd_hook __wakey_precmd
fi
;;
esac
fi
;;
esac