diff --git a/modules/linux/home-manager/hyprland.nix b/modules/linux/home-manager/hyprland.nix index 477e949..2b34bca 100644 --- a/modules/linux/home-manager/hyprland.nix +++ b/modules/linux/home-manager/hyprland.nix @@ -36,14 +36,6 @@ ${pkgs.libnotify}/bin/notify-send -h string:x-canonical-private-synchronous:sys-notify "🔊 Volume: ''${volumep}" ''; - power-menu = pkgs.writeShellScriptBin "power-menu" '' - #!/usr/bin/env sh - - case "$(printf "shutdown\\nreboot" | tofi --prompt "Choose your poison")" in - "shutdown") poweroff ;; - "reboot") reboot ;; - esac - ''; grim = "${pkgs.grim}/bin/grim"; playerctl = "${pkgs.playerctl}/bin/playerctl"; in { @@ -199,7 +191,6 @@ in { bind = [ "$mod, Return, exec, $terminal" "$mod SHIFT, Q, killactive" - "$mod CTRL, E, exit" "$mod SHIFT, Space, togglefloating" "$mod, D, exec, tofi-run | xargs hyprctl dispatch exec --" "$mod SHIFT, D, exec, tofi-drun | xargs hyprctl dispatch exec --" @@ -212,7 +203,7 @@ in { "$mod SHIFT, B, exec, librewolf" "$mod, G, exec, ${hyprgamemode}/bin/gamemode" - "$mod SHIFT, E, exec, ${power-menu}/bin/power-menu" + "$mod SHIFT, E, exec, wleave" "$mod, F12, exec, ${grim} ${config.xdg.userDirs.pictures}/screenshots/$(date +'%s_grim.png')" diff --git a/modules/linux/home-manager/wayland.nix b/modules/linux/home-manager/wayland.nix index 8cf81fc..4d182da 100644 --- a/modules/linux/home-manager/wayland.nix +++ b/modules/linux/home-manager/wayland.nix @@ -18,6 +18,7 @@ wl-clipboard waylock inputs.pyprland.packages.${pkgs.stdenv.hostPlatform.system}.pyprland + hyprshutdown ]; # Enable and setup tofi @@ -107,6 +108,40 @@ # Disable stylix to add full css, I only need it to add colors stylix.targets.waybar.addCss = false; + programs.wleave = { + enable = true; + settings = { + margin = 200; + buttons-per-row = "1/1"; + delay-command-ms = 100; + close-on-lost-focus = true; + show-keybinds = true; + buttons = [ + { + label = "logout"; + action = "hyprshutdown"; + text = "Logout"; + keybind = "e"; + icon = "${pkgs.wleave}/share/wleave/icons/logout.svg"; + } + { + label = "shutdown"; + action = "systemctl poweroff"; + text = "Shutdown"; + keybind = "s"; + icon = "${pkgs.wleave}/share/wleave/icons/shutdown.svg"; + } + { + label = "reboot"; + action = "systemctl reboot"; + text = "Reboot"; + keybind = "r"; + icon = "${pkgs.wleave}/share/wleave/icons/reboot.svg"; + } + ]; + }; + }; + # Enable and install waybar programs.waybar = { enable = true;