mass update.
[my-dotfiles.git] / bin / i3-exit
CommitLineData
fdd76fc5 1#!/bin/bash
7abef725 2rofi_command="rofi -theme darknix/i3exit.rasi"
fdd76fc5 3
4NO="ﰸ"
5YES=""
6
7options="$YES\n$NO"
8chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 1)"
9case $chosen in
10 "$YES")
11 # take wallpaper.sh down with you
12 for pid in $(cat /tmp/wallpaper.pid); do
13 # sending all term signals. hopefully one of them will work!
14 kill -15 $pid
15 kill -1 $pid
16 kill -9 $pid
17 done
18 rm /tmp/wallpaper.pid
19 i3-msg exit
20 ;;
21 "$NO")
22 exit 0
23 ;;
24esac