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

@@ -201,8 +201,8 @@ assign [class="^Google-chrome$"] $workspace7
bindsym F2 exec --no-startup-id ~/.i3/scripts/screenmenu
bindsym $mod+F1 exec --no-startup-id ~/.i3/scripts/i3exit lock
bindsym $mod+F2 exec --no-startup-id screencfg ~/.screencfg/all.yml ; exec --no-startup-id ~/.autostart/30_keyboard.sh
bindsym $mod+F3 exec --no-startup-id screencfg ~/.screencfg/laptop.yml ; exec --no-startup-id ~/.autostart/30_keyboard.sh
bindsym $mod+F2 exec --no-startup-id screencfg ~/.screencfg/all.yml ; exec systemctl --user restart keyboard.service
bindsym $mod+F3 exec --no-startup-id screencfg ~/.screencfg/laptop.yml ; exec systemctl --user restart keyboard.service
bindsym $mod+F4 exec --no-startup-id ~/.i3/scripts/i3exit suspend
bindsym $mod+Home exec --no-startup-id ~/.i3/scripts/shutdown-menu

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
}