diff --git a/i3/.config/i3/config b/i3/.config/i3/config index df4e5a8..03bc1ce 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -208,12 +208,28 @@ bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle -# Lock and power settings +# power settings +set $mode_power Power: [s]uspend [r]eboot [p]oweroff +mode "$mode_power" { + # These bindings trigger as soon as you enter the power mode + + # Pressing r will reboot + # Pressing p will poweroff + # Pressing s will leave power binding mode and suspend + bindsym r exec --no-startup-id systemctl reboot + bindsym p exec --no-startup-id systemctl poweroff + bindsym s exec --no-startup-id i3-msg mode "default" && systemctl suspend + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+p mode "$mode_power" + +# lock settings exec --no-startup-id light-locker --lock-on-suspend bindsym $mod+u exec --no-startup-id light-locker-command -l -bindsym $mod+i exec --no-startup-id systemctl suspend -bindsym $mod+p exec --no-startup-id systemctl poweroff -bindsym $mod+z exec --no-startup-id systemctl reboot # Brightness bindsym XF86MonBrightnessDown exec --no-startup-id brightness decrease 50