From bb9988245a7251fd2aaee19533237ec71b707d71 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Tue, 6 Jan 2026 12:04:05 +0100 Subject: [PATCH] hyprland: add submaps for common open commands --- homes/julian/features/hyprland/default.nix | 41 ++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/homes/julian/features/hyprland/default.nix b/homes/julian/features/hyprland/default.nix index fab2a7b..6b7774e 100644 --- a/homes/julian/features/hyprland/default.nix +++ b/homes/julian/features/hyprland/default.nix @@ -152,6 +152,37 @@ in { # hyprlandPlugins.hyprbars ]; + submaps = { + "resize".settings = { + binde = [ + ", right, resizeactive, 20" + ", left, resizeactive, -20 0" + ", up, resizeactive, 0 -20" + ", down, resizeactive, 0 20" + ", l, resizeactive, 20" + ", h, resizeactive, -20 0" + ", k, resizeactive, 0 -20" + ", j, resizeactive, 0 20" + ]; + + bind = [ + ", q, submap, reset" + ", escape, submap, reset" + + ", catchall, submap, reset" # make any other keypress cancel the submap + ]; + }; + "open, reset".settings = { + bind = [ + ", e, exec, emacs" + ", m, exec, open-messaging" + ", b, exec, firefox" + + ", catchall, submap, reset" # make any other keypress cancel the submap + ]; + }; + }; + settings = { "$mod" = "SUPER"; @@ -280,8 +311,14 @@ in { bind = [ # compositor commands - "$mod, Space, focuswindow, floating" - "$mod SHIFT, Space, togglefloating," + # + # + "$mod, R, submap, resize" + "$mod, SPACE, submap, open" + # + + "$mod, V, focuswindow, floating" + "$mod SHIFT, V, togglefloating," "$mod, F, fullscreen," "$mod, X, killactive,"