mirror of
https://github.com/GRFreire/scripts.git
synced 2026-01-09 04:49:38 +00:00
simple-power-menu: run lockscreen before suspending
This commit is contained in:
parent
770c8a540f
commit
18f3261665
@ -9,7 +9,7 @@ else
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
fn_logout() {
|
||||
_fn_logout() {
|
||||
case "$DESKTOP_SESSION" in
|
||||
*openbox*) openbox --exit;;
|
||||
*i3*) i3-msg exit;;
|
||||
@ -20,12 +20,21 @@ fn_logout() {
|
||||
esac
|
||||
}
|
||||
|
||||
_lockscreen() {
|
||||
betterlockscreen -l dimblur
|
||||
}
|
||||
|
||||
_suspend() {
|
||||
_lockscreen &
|
||||
systemctl suspend
|
||||
}
|
||||
|
||||
OPTIONS="\
|
||||
Shutdown \tsystemctl poweroff
|
||||
Reboot \tsystemctl reboot
|
||||
Suspend \tsystemctl suspend
|
||||
Lockscreen \tbetterlockscreen -l dimblur
|
||||
Log out \tfn_logout"
|
||||
Suspend \t_suspend
|
||||
Lockscreen \t_lockscreen
|
||||
Log out \t_fn_logout"
|
||||
|
||||
PROMPT="$(echo "$OPTIONS" | awk -F"\t" '{print $1}')"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user