From 7bbb56723fda0514cab48934f8dfac51ad424d88 Mon Sep 17 00:00:00 2001 From: Stacy Harper Date: Sun, 28 Mar 2021 23:34:20 +0200 Subject: [PATCH] Move conky in an auto configured user xinit Signed-off-by: Stacy Harper Signed-off-by: Maarten van Gompel --- scripts/core/sxmo_xinit.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/scripts/core/sxmo_xinit.sh b/scripts/core/sxmo_xinit.sh index f2a16fb..e1bae1d 100755 --- a/scripts/core/sxmo_xinit.sh +++ b/scripts/core/sxmo_xinit.sh @@ -54,12 +54,6 @@ defaultkeyboard() { } daemons() { - pkill conky - if [ -e "$XDG_CONFIG_HOME/sxmo/conky.conf" ]; then - conky -c $XDG_CONFIG_HOME/sxmo/conky.conf -d - else - conky -c /usr/share/sxmo/appcfg/conky.conf -d - fi autocutsel & autocutsel -selection PRIMARY & sxmo_statusbar.sh & @@ -71,10 +65,22 @@ daemonsneedingdbus() { sxmo_lisgdstart.sh & } +defaultconfig() { + mkdir -p "$XDG_CONFIG_HOME/sxmo" + + echo '#!/usr/bin/env sh + +conky -c /usr/share/sxmo/appcfg/conky.conf -d +' > "$XDG_CONFIG_HOME/sxmo/xinit" +} + customxinit() { set -o allexport # shellcheck disable=SC1090 - [ -f "$XDG_CONFIG_HOME/sxmo/xinit" ] && . "$XDG_CONFIG_HOME/sxmo/xinit" + [ ! -f "$XDG_CONFIG_HOME/sxmo/xinit" ] && defaultconfig + + # shellcheck disable=SC1090 + . "$XDG_CONFIG_HOME/sxmo/xinit" set +o allexport }