dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit 1b448ed92200b6ab55821649b1ec2b909c24a7ee
parent 3d0cc65d30b3da3b6584b00916d82a20fa37b1d8
Author: Chris Bracken <chris@bracken.jp>
Date:   Tue, 17 Dec 2019 18:07:08 -0800

Use dmenu for Sway WM exit check

Mirrors the config I use for i3.

Diffstat:
M.config/sway/config | 2+-
A.config/sway/exit_check.sh | 10++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/.config/sway/config b/.config/sway/config @@ -93,7 +93,7 @@ input * { bindsym $mod+Shift+c reload # 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' + bindsym $mod+Shift+e exec ~/.config/sway/exit_check.sh # # Moving around: diff --git a/.config/sway/exit_check.sh b/.config/sway/exit_check.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Use dmenu to check if the user wants to exit i3. + +while [ "$choice" != "no" -a "$choice" != "yes" ]; do + choice=$(echo -e 'no\nyes' | dmenu -p "Really exit?") +done +if [ "$choice" == "yes" ]; then + swaymsg exit +fi