From 91654b306802d5e15676154dec8949572efff51a Mon Sep 17 00:00:00 2001 From: alexion Date: Sun, 11 Oct 2026 15:58:50 -0400 Subject: [PATCH] feat(hyprland): add remaining window actions --- .../desktop/session/hyprland/default.nix | 19 +++++++++++++++++++ configs/nixos/registry/keybind.nix | 13 +++++++++++++ 2 files changed, 32 insertions(+) diff --git a/configs/nixos/modules/desktop/session/hyprland/default.nix b/configs/nixos/modules/desktop/session/hyprland/default.nix index 5dee9af..7236346 100644 --- a/configs/nixos/modules/desktop/session/hyprland/default.nix +++ b/configs/nixos/modules/desktop/session/hyprland/default.nix @@ -93,6 +93,22 @@ } ] )) + { + hyprland-toggle-floating = { + keys = "SUPER + Space"; + action.kind = "toggle-floating"; + }; + + hyprland-toggle-fullscreen = { + keys = "SUPER + F"; + action.kind = "toggle-fullscreen"; + }; + + hyprland-close-window = { + keys = "SUPER + SHIFT + Q"; + action.kind = "close-window"; + }; + } ]; # This program integration owns the session, portals, and polkit, launched @@ -160,6 +176,9 @@ .${keybind.action.direction} ) })"; + "toggle-floating" = ''hl.dsp.window.float({ action = "toggle" })''; + "toggle-fullscreen" = "hl.dsp.window.fullscreen()"; + "close-window" = "hl.dsp.window.close()"; } .${keybind.action.kind} )) diff --git a/configs/nixos/registry/keybind.nix b/configs/nixos/registry/keybind.nix index 7abd253..fa2e1bc 100644 --- a/configs/nixos/registry/keybind.nix +++ b/configs/nixos/registry/keybind.nix @@ -23,6 +23,16 @@ && entry.value.action.direction != null && entry.value.action.workspace == null ) + || ( + builtins.elem entry.value.action.kind [ + "toggle-floating" + "toggle-fullscreen" + "close-window" + ] + && entry.value.action.command == null + && entry.value.action.direction == null + && entry.value.action.workspace == null + ) ) entries; message = "Desktop keybind actions must set the fields their kind requires."; } @@ -54,6 +64,9 @@ "focus" "move-window" "resize-window" + "toggle-floating" + "toggle-fullscreen" + "close-window" ]; };