From 451301e9140f899b757d583ec323db7b69eb49ca Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 19 Jul 2018 14:21:45 +0200 Subject: [xprofile] only start programs if they are available --- xprofile | 13 ++++++++++--- 1 file 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 "&" -- cgit v1.2.3