dotfiles

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

exit_check.sh (335B)


      1 #!/bin/sh
      2 
      3 # Use wofi to check if the user wants to exit sway.
      4 
      5 # If wofi isn't installed, bail out immediately.
      6 if ! which wofi; then
      7   swaymsg exit
      8 fi
      9 
     10 while [ "$choice" != "no" ] && [ "$choice" != "yes" ]; do
     11   choice=$(printf 'no\nyes\n' | wofi --show dmenu -p "Really exit?")
     12 done
     13 if [ "$choice" = "yes" ]; then
     14   swaymsg exit
     15 fi