From 04934718c2e7b7c5e646efa45a96e26b91870811 Mon Sep 17 00:00:00 2001 From: Mark Nipper Date: Fri, 24 Jan 2025 15:25:07 -0800 Subject: Check if xscreensaver is installed --- home/nipsy/common/optional/desktops/i3/xscreensaver-activate | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'home') diff --git a/home/nipsy/common/optional/desktops/i3/xscreensaver-activate b/home/nipsy/common/optional/desktops/i3/xscreensaver-activate index b558da8..edcfa62 100755 --- a/home/nipsy/common/optional/desktops/i3/xscreensaver-activate +++ b/home/nipsy/common/optional/desktops/i3/xscreensaver-activate @@ -1,5 +1,11 @@ #!/usr/bin/env zsh +# bail out if xscreensaver isn't installed +if [[ ! -x =xscreensaver ]]; then + echo "no xscreensaver command found, ${0:t} bailing out" >&2 + exit 0 +fi + # record our own PID to avoid duplicate invocations PIDFILE="/dev/shm/${0:t}.pid" -- cgit v1.2.3