Update i3, polybar, emacs, qtile, zsh & sctipts

This commit is contained in:
Smirnov Olexandr 2021-01-02 21:48:35 +02:00
parent 8822c65b4f
commit 102aa36798
15 changed files with 152 additions and 140 deletions

View file

@ -1,42 +1,28 @@
#!/bin/sh
declare options=("Poweroff
declare options=("ShutDown
Lock
Logout
Reboot")
choice=$(echo -e "${options[@]}" | dmenu -p 'Power' $@)
choice=$(echo -e "${options[@]}" | dmenu -p "Power" $@)
case "$choice" in
"Poweroff")
declare opt=("Yes\nNo")
yesno=$(echo -e "${opt[@]}" | dmenu -p 'Power' $@)
case "$yesno" in
"ShutDown")
case "$(echo -e "Yes\nNo"|dmenu -p "ShutDown" $@)" in
"Yes") exec systemctl poweroff ;;
"No") exec exit 0 ;;
"No") exec exit 0 ;;
esac
;;
"Lock")
exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;;
"Lock") exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;;
"Logout")
declare opt=("Yes\nNo")
yesno=$(echo -e "${opt[@]}" | dmenu -p 'Logout' $@)
case "$yesno" in
"Yes")
if [[ "$(pgrep spectrwm)" ]]; then
exec pkill spectrwm
else
exec loginctl terminate-session $XDG_SESSION_ID
fi
;;
"No") exec exit 0 ;;
case "$(echo -e "Yes\nNo"|dmenu -p "ShutDown" $@)" in
"Yes") exec loginctl terminate-session $XDG_SESSION_ID ;;
"No") exec exit 0 ;;
esac
;;
"Reboot")
declare opt=("Yes\nNo")
yesno=$(echo -e "${opt[@]}" | dmenu -p 'Power' $@)
case "$yesno" in
case "$(echo -e "Yes\nNo"|dmenu -p "Reboot" $@)" in
"Yes") exec systemctl reboot ;;
"No") exec exit 0 ;;
"No") exec exit 0 ;;
esac
;;
*) exit 1 ;;
esac