From 6564c283cd1e465b8a971f98375387e3d0a93f98 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 19 Sep 2016 16:46:35 -0700 Subject: [PATCH] [X11] Run gnome-settings-daemon only if it exists --- dotfiles/lib/setup_functions.sh | 4 ++++ dotfiles/xprofile | 1 + 2 files changed, 5 insertions(+) diff --git a/dotfiles/lib/setup_functions.sh b/dotfiles/lib/setup_functions.sh index 97393484..395c8bbf 100644 --- a/dotfiles/lib/setup_functions.sh +++ b/dotfiles/lib/setup_functions.sh @@ -2,6 +2,10 @@ function command_exists { hash "$1" 2>/dev/null 1>/dev/null } +function run_if_exists { + command_exists "$@" && "$@" +} + function shell_contains () { local e for e in "${@:2}"; do diff --git a/dotfiles/xprofile b/dotfiles/xprofile index 3d31ac74..90d9c27c 100644 --- a/dotfiles/xprofile +++ b/dotfiles/xprofile @@ -1 +1,2 @@ source "$HOME/.lib/shellenv.sh" +run_if_exists gnome-settings-daemon &