aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-04-09 17:48:06 +0200
committerKarel Kočí <cynerd@email.cz>2022-04-09 17:48:06 +0200
commit10b206132e4a48ed2eee6d0aa6e49006abe953d7 (patch)
tree084ce72eab647bf429b1a1eb99a41a8e0a319d95
parentb259a37426be9b0ddb0a837a38aeb1903b377036 (diff)
downloadshellrc-10b206132e4a48ed2eee6d0aa6e49006abe953d7.tar.gz
shellrc-10b206132e4a48ed2eee6d0aa6e49006abe953d7.tar.bz2
shellrc-10b206132e4a48ed2eee6d0aa6e49006abe953d7.zip
zshrc.d/bell: do not use if there is no xprop or notify-send
-rw-r--r--zshrc.d/bell6
1 files changed, 4 insertions, 2 deletions
diff --git a/zshrc.d/bell b/zshrc.d/bell
index 5fbb5c4..e785dbf 100644
--- a/zshrc.d/bell
+++ b/zshrc.d/bell
@@ -33,5 +33,7 @@ lrbell_end() {
fi
}
-add-zsh-hook preexec lrbell_begin
-add-zsh-hook precmd lrbell_end
+if command -v xprop >/dev/null && command -v notify-send >/dev/null; then
+ add-zsh-hook preexec lrbell_begin
+ add-zsh-hook precmd lrbell_end
+fi