Use persistent systemd units for autostart

This commit is contained in:
2020-12-20 20:36:27 +01:00
parent f4fbae6683
commit 0f36baf30c
31 changed files with 194 additions and 182 deletions

View File

@@ -10,14 +10,15 @@ is_on() {
switch_on() {
touch "${_status_file}"
dunstctl disable &
systemctl --user --no-block stop user:redshift
systemctl --user --no-block stop user:spotify
systemctl --user --no-block stop redshift.service
systemctl --user --no-block stop spotify.service
}
switch_off() {
rm -f "${_status_file}"
dunstctl enable &
"$_autostart" redshift spotify
systemctl --user --no-block start redshift.service
systemctl --user --no-block start spotify.service
}