summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dotfiles/Xsession14
1 files changed, 10 insertions, 4 deletions
diff --git a/dotfiles/Xsession b/dotfiles/Xsession
index 0ee6946..ab17699 100644
--- a/dotfiles/Xsession
+++ b/dotfiles/Xsession
@@ -1,13 +1,19 @@
-#!/bin/sh
+#!/bin/bash
+
+run_if_exists() {
+ bin=$1
+ binpath=$(which "$bin")
+ [ -x "$binpath" ] && "$binpath" &
+}
# screen locker
-xscreensaver &
+run_if_exists xscreensaver
# keyboard layout indicator
-fbxkb &
+run_if_exists fbxkb
# clipboard manager
-parcellite &
+run_if_exists parcellite
# on FIDO HW key add/remove, update the SSH agent
udev_match --subsystem=hidraw --match=ACTION=remove --match=ID_FIDO_TOKEN=1 ssh_sk_clean &