mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-20 22:57:17 +02:00
fix: adjust hyprland configs
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,30 +1,36 @@
|
||||
{
|
||||
"label" : "suspend",
|
||||
"text" : "Suspend",
|
||||
"action" : "~/.config/hypr/wlogout/actions --suspend",
|
||||
"keybind" : "u"
|
||||
}
|
||||
{
|
||||
"label" : "logout",
|
||||
"text" : "Logout",
|
||||
"action" : "~/.config/hypr/wlogout/actions --logout",
|
||||
"keybind" : "e"
|
||||
}
|
||||
{
|
||||
"label" : "lock",
|
||||
"action" : "~/.config/hypr/scripts/lockscreen",
|
||||
"text" : "Lock",
|
||||
"action" : "~/.config/hypr/wlogout/actions --lock",
|
||||
"keybind" : "l"
|
||||
}
|
||||
{
|
||||
"label" : "reboot",
|
||||
"text" : "Reboot",
|
||||
"action" : "~/.config/hypr/wlogout/actions --reboot",
|
||||
"keybind" : "r"
|
||||
"label" : "hibernate",
|
||||
"action" : "systemctl hibernate",
|
||||
"text" : "Hibernate",
|
||||
"keybind" : "h"
|
||||
}
|
||||
{
|
||||
"label" : "logout",
|
||||
"action" : "loginctl terminate-user $USER",
|
||||
"text" : "Logout",
|
||||
"keybind" : "e"
|
||||
}
|
||||
{
|
||||
"label" : "shutdown",
|
||||
"action" : "systemctl poweroff",
|
||||
"text" : "Shutdown",
|
||||
"action" : "~/.config/hypr/wlogout/actions --shutdown",
|
||||
"keybind" : "s"
|
||||
}
|
||||
{
|
||||
"label" : "suspend",
|
||||
"action" : "systemctl suspend",
|
||||
"text" : "Suspend",
|
||||
"keybind" : "u"
|
||||
}
|
||||
{
|
||||
"label" : "reboot",
|
||||
"action" : "systemctl reboot",
|
||||
"text" : "Reboot",
|
||||
"keybind" : "r"
|
||||
}
|
||||
Reference in New Issue
Block a user