aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2018-07-19 14:21:45 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2018-07-20 01:38:24 +0200
commit451301e9140f899b757d583ec323db7b69eb49ca (patch)
tree47f1b473f70c6002e9f8eef9026598b47c56d114
parent8c2717c964e4ba711b3c0831575d69cc0c2e7bba (diff)
downloaddotfiles-451301e9140f899b757d583ec323db7b69eb49ca.tar.gz
dotfiles-451301e9140f899b757d583ec323db7b69eb49ca.zip
[xprofile] only start programs if they are available
-rw-r--r--xprofile13
1 files changed, 10 insertions, 3 deletions
diff --git a/xprofile b/xprofile
index 466de83..7dcda4c 100644
--- a/xprofile
+++ b/xprofile
@@ -65,11 +65,18 @@ fi
# Set keyboard layout
setxkbmap de
+function start_if_avail {
+ if type $1 >/dev/null
+ then
+ eval "$1 $2"
+ fi
+}
+
# Start notification service
-dunst &
+start_if_avail dunst '&'
# Start touchpad daemon
-syndaemon -i 1 -d
+start_if_avail "syndaemon" "-i 1 -d"
# Start owncloud client
-owncloud &
+start_if_avail owncloud "&"