dotfiles

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

exit_check.sh (377B)


      1 #!/bin/sh
      2 
      3 # Use dmenu to check if the user wants to exit i3.
      4 
      5 # Work around dmenu crasher when XOpenIM() returns NULL.
      6 # See: https://bugs.archlinux.com/task/61673
      7 unset XMODIFIERS
      8 
      9 while [ "$choice" != "no" ] && [ "$choice" != "yes" ]; do
     10   choice=$(printf 'no\nyes\n' | dmenu -fn "DejaVu Sans Mono-12" -p "Really exit?")
     11 done
     12 if [ "$choice" = "yes" ]; then
     13   i3-msg exit
     14 fi