Add power menu to config dir
This commit is contained in:
parent
96c8c81fd5
commit
13fa2cca69
2 changed files with 19 additions and 1 deletions
|
@ -191,7 +191,7 @@ binds {
|
||||||
Mod+Shift+P { screenshot; }
|
Mod+Shift+P { screenshot; }
|
||||||
Mod+Ctrl+P { screenshot-window; }
|
Mod+Ctrl+P { screenshot-window; }
|
||||||
|
|
||||||
Mod+Shift+E { spawn "power-menu"; }
|
Mod+Shift+E { spawn "/home/fern/.config/niri/power-menu"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
workspace "browser" {
|
workspace "browser" {
|
||||||
|
|
18
private_dot_config/niri/executable_power-menu
Normal file
18
private_dot_config/niri/executable_power-menu
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SELECTION="$(printf " Turn off displays\n Lock\n Suspend\n Log out\n Reboot\n Shutdown" | fuzzel --dmenu -l 6 -p "Power Menu: ")"
|
||||||
|
|
||||||
|
case $SELECTION in
|
||||||
|
*"Turn off displays")
|
||||||
|
niri msg action power-off-monitors;;
|
||||||
|
*"Lock")
|
||||||
|
gtklock -d;;
|
||||||
|
*"Suspend")
|
||||||
|
loginctl suspend;;
|
||||||
|
*"Log out")
|
||||||
|
niri msg action quit -s;;
|
||||||
|
*"Reboot")
|
||||||
|
loginctl reboot;;
|
||||||
|
*"Shutdown")
|
||||||
|
loginctl poweroff;;
|
||||||
|
esac
|
Loading…
Add table
Add a link
Reference in a new issue