aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Nipper <nipsy@bitgnome.net>2025-01-24 15:25:07 -0800
committerMark Nipper <nipsy@bitgnome.net>2025-01-24 15:25:07 -0800
commit04934718c2e7b7c5e646efa45a96e26b91870811 (patch)
tree889147dd6601b23580653987684a057c3ae6d442
parent7cb02514ad3a51ac98326e71c7edad8e6ae23fde (diff)
downloadnix-04934718c2e7b7c5e646efa45a96e26b91870811.tar
nix-04934718c2e7b7c5e646efa45a96e26b91870811.tar.gz
nix-04934718c2e7b7c5e646efa45a96e26b91870811.tar.bz2
nix-04934718c2e7b7c5e646efa45a96e26b91870811.tar.lz
nix-04934718c2e7b7c5e646efa45a96e26b91870811.tar.xz
nix-04934718c2e7b7c5e646efa45a96e26b91870811.tar.zst
nix-04934718c2e7b7c5e646efa45a96e26b91870811.zip
Check if xscreensaver is installed
-rwxr-xr-xhome/nipsy/common/optional/desktops/i3/xscreensaver-activate6
1 files changed, 6 insertions, 0 deletions
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"