diff --git a/home/toast/bin/powermenu.sh b/home/toast/bin/powermenu.sh new file mode 100755 index 0000000..e027b1a --- /dev/null +++ b/home/toast/bin/powermenu.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +choice=$(printf """ +󰍃 Logout +⏻ Shutdown + Reboot + Suspend + Hibernate +""" | tofi) + +case "$choice" in + "󰍃 Logout") uwsm stop ;; + "⏻ Shutdown") systemctl poweroff ;; + " Reboot") systemctl reboot ;; + " Suspend") systemctl suspend ;; + " Hibernate") systemctl hibernate ;; +esac diff --git a/home/toast/home.nix b/home/toast/home.nix index a9006de..8e47fa3 100644 --- a/home/toast/home.nix +++ b/home/toast/home.nix @@ -10,7 +10,6 @@ ./programs/fonts.nix ./programs/hyprland.nix ./programs/tofi.nix - ./programs/wlogout.nix ./programs/zsh.nix ./programs/firefox.nix ./programs/yazi.nix @@ -26,6 +25,9 @@ username = "toast"; homeDirectory = "/home/toast"; stateVersion = "24.11"; + file = { + "bin" = { source = ./bin; recursive = true; }; + }; }; nixpkgs.config.allowUnfree = true; diff --git a/home/toast/programs/hyprland.nix b/home/toast/programs/hyprland.nix index e729185..8aa53ac 100644 --- a/home/toast/programs/hyprland.nix +++ b/home/toast/programs/hyprland.nix @@ -72,7 +72,7 @@ "$mod, mouse_up, workspace, e-1" "$mod SHIFT, S, exec, env HYPRSHOT_DIR=/data/Backup/Screenshots hyprshot -m region" - "$mod SHIFT, E, exec, wlogout" + "$mod SHIFT, E, exec, ~/bin/powermenu.sh" ]; bindel = [ diff --git a/home/toast/programs/wlogout.nix b/home/toast/programs/wlogout.nix deleted file mode 100644 index fa7ed28..0000000 --- a/home/toast/programs/wlogout.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.wlogout = { - enable = true; - }; -}