mirror of
https://github.com/GRFreire/scripts.git
synced 2026-01-09 20:59:37 +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;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fn_logout() {
|
_fn_logout() {
|
||||||
case "$DESKTOP_SESSION" in
|
case "$DESKTOP_SESSION" in
|
||||||
*openbox*) openbox --exit;;
|
*openbox*) openbox --exit;;
|
||||||
*i3*) i3-msg exit;;
|
*i3*) i3-msg exit;;
|
||||||
@ -20,12 +20,21 @@ fn_logout() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_lockscreen() {
|
||||||
|
betterlockscreen -l dimblur
|
||||||
|
}
|
||||||
|
|
||||||
|
_suspend() {
|
||||||
|
_lockscreen &
|
||||||
|
systemctl suspend
|
||||||
|
}
|
||||||
|
|
||||||
OPTIONS="\
|
OPTIONS="\
|
||||||
Shutdown \tsystemctl poweroff
|
Shutdown \tsystemctl poweroff
|
||||||
Reboot \tsystemctl reboot
|
Reboot \tsystemctl reboot
|
||||||
Suspend \tsystemctl suspend
|
Suspend \t_suspend
|
||||||
Lockscreen \tbetterlockscreen -l dimblur
|
Lockscreen \t_lockscreen
|
||||||
Log out \tfn_logout"
|
Log out \t_fn_logout"
|
||||||
|
|
||||||
PROMPT="$(echo "$OPTIONS" | awk -F"\t" '{print $1}')"
|
PROMPT="$(echo "$OPTIONS" | awk -F"\t" '{print $1}')"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user