diff --git a/bin/powermenu.sh b/bin/powermenu.sh new file mode 100755 index 0000000..6c8d26b --- /dev/null +++ b/bin/powermenu.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +SELECTION=$(printf "󰗽 Logout\n Sleep\n󰜉 Reboot\n Shutdown\n󰈆 Exit" | wofi -d) + +logout() { + uwsm stop +} + +sleep() { + systemctl sleep +} + + +reboot() { + systemctl reboot +} + +shutdown() { + systemctl poweroff +} + +case "$SELECTION" in + "󰗽 Logout") + logout + ;; + " Sleep") + sleep + ;; + "󰜉 Reboot") + reboot + ;; + " Shutdown") + shutdown + ;; +esac diff --git a/modules/home-manager/hyprland/bindings.nix b/modules/home-manager/hyprland/bindings.nix index 61107aa..553b557 100644 --- a/modules/home-manager/hyprland/bindings.nix +++ b/modules/home-manager/hyprland/bindings.nix @@ -16,7 +16,7 @@ in # End active session "SUPER, ESCAPE, exec, hyprlock" - "SUPER SHIFT, ESCAPE, exec, uwsm stop" + "SUPER SHIFT, ESCAPE, exec, ~/.local/share/hyperdeepnix/bin/powermenu.sh" # "SUPER CTRL, ESCAPE, exec, reboot" # "SUPER SHIFT CTRL, ESCAPE, exec, systemctl poweroff" "SUPER, K, exec, ~/.local/share/hyperdeepnix/bin/hyperdeepnix-show-keybindings"