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.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
source $DTF_SERVICES_DIR/common.bash
|
|
||||||
service_name="Compton"
|
service_name="Compton"
|
||||||
service_process="compton"
|
service_process="compton"
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
source $DTF_SERVICES_DIR/common.bash
|
|
||||||
service_name="Conky"
|
service_name="Conky"
|
||||||
service_process="conky"
|
service_process="conky"
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
source $DTF_SERVICES_DIR/common.bash
|
|
||||||
service_name="Dropbox"
|
service_name="Dropbox"
|
||||||
service_process="dropbox"
|
service_process="dropbox"
|
||||||
service_kill_on_reload="false"
|
service_kill_on_reload="false"
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
source $DTF_SERVICES_DIR/common.bash
|
|
||||||
service_name="Dunst"
|
service_name="Dunst"
|
||||||
service_process="dunst"
|
service_process="dunst"
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
source $DTF_SERVICES_DIR/common.bash
|
|
||||||
service_name="Krunner"
|
service_name="Krunner"
|
||||||
service_process="krunner"
|
service_process="krunner"
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
source $DTF_SERVICES_DIR/common.bash
|
|
||||||
service_name="Plasma"
|
service_name="Plasma"
|
||||||
service_process="plasmashell"
|
service_process="plasmashell"
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
source $DTF_SERVICES_DIR/common.bash
|
|
||||||
service_name="Polybar"
|
service_name="Polybar"
|
||||||
service_process="polybar"
|
service_process="polybar"
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
source $DTF_SERVICES_DIR/common.bash
|
|
||||||
service_name="Redshift"
|
service_name="Redshift"
|
||||||
service_process="redshift"
|
service_process="redshift"
|
||||||
service_kill_on_reload="false"
|
service_kill_on_reload="false"
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
source $DTF_SERVICES_DIR/common.bash
|
|
||||||
service_name="sxhkd"
|
service_name="sxhkd"
|
||||||
service_process="sxhkd"
|
service_process="sxhkd"
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
source $DTF_SERVICES_DIR/common.bash
|
|
||||||
service_name="Syncthing"
|
service_name="Syncthing"
|
||||||
service_process="syncthing"
|
service_process="syncthing"
|
||||||
service_kill_on_reload="false"
|
service_kill_on_reload="false"
|
||||||
|
@ -62,10 +62,11 @@ if [[ "$XDG_RUNTIME_DIR" == "" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## Set some more variables
|
## 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
|
## 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"
|
dtf_log "Sourcing devices/$(hostname).rc"
|
||||||
source $HOME/.config/dtfscripts/devices/$(hostname).rc
|
source $HOME/.config/dtfscripts/devices/$(hostname).rc
|
||||||
fi
|
fi
|
||||||
@ -94,7 +95,8 @@ for service in $DTF_SERVICES; do
|
|||||||
dtf_log "Service is unexecutable: $service"
|
dtf_log "Service is unexecutable: $service"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
source $service_full
|
source "$DTF_CONFIG_HOME/common_service.sh"
|
||||||
|
source "$service_full"
|
||||||
if isup && [[ "$service_kill_on_reload" == "true" ]] ; then
|
if isup && [[ "$service_kill_on_reload" == "true" ]] ; then
|
||||||
stop
|
stop
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user