From 10b206132e4a48ed2eee6d0aa6e49006abe953d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 9 Apr 2022 17:48:06 +0200 Subject: zshrc.d/bell: do not use if there is no xprop or notify-send --- zshrc.d/bell | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'zshrc.d/bell') 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 -- cgit v1.2.3