mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Update i3, polybar, emacs, qtile, zsh & sctipts
This commit is contained in:
parent
8822c65b4f
commit
102aa36798
15 changed files with 152 additions and 140 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue