Large update to upgrade script, remove unneccessary configs, add additional and fixups

This commit is contained in:
natemaia
2017-12-07 20:20:42 -08:00
parent 9a63b6f701
commit d4c9ea73af
38 changed files with 505 additions and 617 deletions

36
home/bin/session-logout Executable file
View File

@ -0,0 +1,36 @@
#!/usr/bin/env bash
# check which wm were using, case insensitive
WMS=(bspwm i3 openbox)
for i in ${WMS[@]}; do
if [[ "$(wmctrl -m | grep -i name | awk '{print tolower($2)}')" == "$i" ]]; then
WM=$i && break
elif [[ "$(xprop -root -notype | grep "WM_NAME =" | tr -d '"' | awk '{print tolower($3)}')" == "$i" ]]; then
WM=$i && break
elif [[ "$(awk '{print tolower($0)}' <<< $XDG_CURRENT_DESKTOP)" == "$i" ]]; then
WM=$i && break
fi
done
# do the logout
case $WM in
i3)
i3-msg exit
;;
bspwm)
for window_id in $(bspc query -W); do
bspc window $window_id -c
done
killall sxhkd
bspc quit
;;
openbox)
openbox --exit
;;
*)
echo "WM not yet supported.. Exiting"
exit 0
;;
esac