wmstartup: Move common service functions out of individual services

This commit is contained in:
Salt 2018-08-27 12:35:25 -05:00
parent 731560f736
commit df605a74b2
12 changed files with 5 additions and 13 deletions

View File

@ -6,7 +6,6 @@
# Distributed under terms of the MIT license.
#
source $DTF_SERVICES_DIR/common.bash
service_name="Compton"
service_process="compton"

View File

@ -6,7 +6,6 @@
# Distributed under terms of the MIT license.
#
source $DTF_SERVICES_DIR/common.bash
service_name="Conky"
service_process="conky"

View File

@ -6,7 +6,6 @@
# Distributed under terms of the MIT license.
#
source $DTF_SERVICES_DIR/common.bash
service_name="Dropbox"
service_process="dropbox"
service_kill_on_reload="false"

View File

@ -6,7 +6,6 @@
# Distributed under terms of the MIT license.
#
source $DTF_SERVICES_DIR/common.bash
service_name="Dunst"
service_process="dunst"

View File

@ -6,7 +6,6 @@
# Distributed under terms of the MIT license.
#
source $DTF_SERVICES_DIR/common.bash
service_name="Krunner"
service_process="krunner"

View File

@ -6,7 +6,6 @@
# Distributed under terms of the MIT license.
#
source $DTF_SERVICES_DIR/common.bash
service_name="Plasma"
service_process="plasmashell"

View File

@ -6,7 +6,6 @@
# Distributed under terms of the MIT license.
#
source $DTF_SERVICES_DIR/common.bash
service_name="Polybar"
service_process="polybar"

View File

@ -6,7 +6,6 @@
# Distributed under terms of the MIT license.
#
source $DTF_SERVICES_DIR/common.bash
service_name="Redshift"
service_process="redshift"
service_kill_on_reload="false"

View File

@ -6,7 +6,6 @@
# Distributed under terms of the MIT license.
#
source $DTF_SERVICES_DIR/common.bash
service_name="sxhkd"
service_process="sxhkd"

View File

@ -6,7 +6,6 @@
# Distributed under terms of the MIT license.
#
source $DTF_SERVICES_DIR/common.bash
service_name="Syncthing"
service_process="syncthing"
service_kill_on_reload="false"

View File

@ -62,10 +62,11 @@ if [[ "$XDG_RUNTIME_DIR" == "" ]]; then
fi
## Set some more variables
export DTF_SERVICES_DIR="$XDG_CONFIG_HOME/dtfscripts/services"
export DTF_CONFIG_HOME="$XDG_CONFIG_HOME/dtfscripts"
export DTF_SERVICES_DIR="$DTF_CONFIG_HOME/services"
## Load device-specific scripts
if [[ -x "$XDG_CONFIG_HOME/dtfscripts/devices/$(hostname).rc" ]]; then
if [[ -x "$DTF_CONFIG_HOME/devices/$(hostname).rc" ]]; then
dtf_log "Sourcing devices/$(hostname).rc"
source $HOME/.config/dtfscripts/devices/$(hostname).rc
fi
@ -94,7 +95,8 @@ for service in $DTF_SERVICES; do
dtf_log "Service is unexecutable: $service"
exit 1
fi
source $service_full
source "$DTF_CONFIG_HOME/common_service.sh"
source "$service_full"
if isup && [[ "$service_kill_on_reload" == "true" ]] ; then
stop
fi