wmstartup: Move common service functions out of individual services
This commit is contained in:
parent
731560f736
commit
df605a74b2
@ -6,7 +6,6 @@
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
source $DTF_SERVICES_DIR/common.bash
|
||||
service_name="Compton"
|
||||
service_process="compton"
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
source $DTF_SERVICES_DIR/common.bash
|
||||
service_name="Conky"
|
||||
service_process="conky"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -6,7 +6,6 @@
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
source $DTF_SERVICES_DIR/common.bash
|
||||
service_name="Dunst"
|
||||
service_process="dunst"
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
source $DTF_SERVICES_DIR/common.bash
|
||||
service_name="Krunner"
|
||||
service_process="krunner"
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
source $DTF_SERVICES_DIR/common.bash
|
||||
service_name="Plasma"
|
||||
service_process="plasmashell"
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
source $DTF_SERVICES_DIR/common.bash
|
||||
service_name="Polybar"
|
||||
service_process="polybar"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -6,7 +6,6 @@
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
source $DTF_SERVICES_DIR/common.bash
|
||||
service_name="sxhkd"
|
||||
service_process="sxhkd"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user