sway: add system menu

This commit is contained in:
Inhji 2022-12-04 12:21:16 +01:00
parent 9ccd3e9207
commit e1eba6acbd
1 changed files with 17 additions and 1 deletions

View File

@ -142,7 +142,7 @@ hide_edge_borders both
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
#bindsym $mod+0 workspace 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
@ -218,6 +218,21 @@ mode "resize" {
}
bindsym $mod+r mode "resize"
set $system_mode "(r)eload e(x)it (s)hutdown re(b)oot (w)aybar"
mode $system_mode {
bindsym $mod+r reload; mode "default"
bindsym $mod+x exec swaymsg exit
bindsym $mod+s exec systemctl poweroff
bindsym $mod+b exec systemctl reboot
bindsym $mod+w exec killall waybar; exec waybar; mode "default"
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+0 mode $system_mode
# class border backgr. text indicator child_border
client.focused #000000 #ffffff #000000 #000000 #000000
client.focused_inactive #000000 #eeeeee #000000 #000000 #000000
@ -261,6 +276,7 @@ exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSO
seat seat0 xcursor_theme Adwaita 24
# waybar
exec "killall waybar"
exec waybar
# start a terminal