Use persistent systemd units for autostart
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user