mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
chezmoi: dunst, fcitx5, hyprland
This commit is contained in:
parent
95fbc079ba
commit
947f290d3c
40 changed files with 3750 additions and 3738 deletions
50
dot_config/wlogout/actions
Normal file
50
dot_config/wlogout/actions
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## wlogout actions
|
||||
|
||||
# Ask for confirmation
|
||||
cdialog () {
|
||||
yad --title='Confirm?' --borders=15 --center --fixed --undecorated --button=Yes:0 --button=No:1 --text="Are you sure?" --text-align=center
|
||||
}
|
||||
|
||||
if [[ "$1" == '--shutdown' ]]; then
|
||||
cdialog
|
||||
if [[ "$?" == 0 ]]; then
|
||||
systemctl poweroff
|
||||
else
|
||||
exit
|
||||
fi
|
||||
elif [[ "$1" == '--reboot' ]]; then
|
||||
cdialog
|
||||
if [[ "$?" == 0 ]]; then
|
||||
systemctl reboot
|
||||
else
|
||||
exit
|
||||
fi
|
||||
elif [[ "$1" == '--hibernate' ]]; then
|
||||
cdialog
|
||||
if [[ "$?" == 0 ]]; then
|
||||
systemctl hibernate
|
||||
else
|
||||
exit
|
||||
fi
|
||||
elif [[ "$1" == '--lock' ]]; then
|
||||
~/.config/hypr/scripts/lockscreen
|
||||
elif [[ "$1" == '--suspend' ]]; then
|
||||
cdialog
|
||||
if [[ "$?" == 0 ]]; then
|
||||
mpc -q pause
|
||||
amixer set Master mute
|
||||
~/.config/hypr/scripts/lockscreen
|
||||
systemctl suspend
|
||||
else
|
||||
exit
|
||||
fi
|
||||
elif [[ "$1" == '--logout' ]]; then
|
||||
cdialog
|
||||
if [[ "$?" == 0 ]]; then
|
||||
kill -9 -1
|
||||
else
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue