diff --git a/bin/sway_exit b/bin/sway_exit new file mode 100755 index 0000000..04b5cfc --- /dev/null +++ b/bin/sway_exit @@ -0,0 +1,4 @@ +#!/bin/bash +export PATH=$PATH:$HOME/.config/sway/bin +bash -c "$(echo -e 'sway_lock lock\nsystemctl suspend\nswaymsg reload\nswaymsg exit' | \ + wofi --dmenu --prompt 'exit menu')" diff --git a/config b/config index 1720020..7321a12 100644 --- a/config +++ b/config @@ -28,6 +28,7 @@ set $font Cascadia Code PL Regular 10 # Your preferred application launcher set $menu wofi --show drun --prompt applications set $search_cmd $HOME/.config/sway/bin/sway_search +set $exit_cmd $HOME/.config/sway/bin/sway_exit # # Host Specific @@ -102,12 +103,9 @@ bindsym $mod+Shift+r exec $search_cmd # mouse button for dragging. floating_modifier $mod normal -# Reload the configuration file -bindsym $mod+Ctrl+r reload +# Show exit menu +bindsym $mod+Shift+e exec $exit_cmd -# Exit sway (logs you out of your Wayland session) -bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' -# # Moving around: # # Move your focus around