From aaf03d1860760f8fc4ae100d3db3b71ba1d99526 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 5 Dec 2025 10:14:10 +0100 Subject: ... --- accounts/gkleen@sif/niri.nix | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'accounts/gkleen@sif/niri.nix') diff --git a/accounts/gkleen@sif/niri.nix b/accounts/gkleen@sif/niri.nix index d4b77d9c..fada053b 100644 --- a/accounts/gkleen@sif/niri.nix +++ b/accounts/gkleen@sif/niri.nix @@ -716,6 +716,11 @@ in { (plain "binds" (let bind = name: cfg: node name [(lib.removeAttrs cfg ["action"])] (lib.mapAttrsToList leaf (lib.removeAttrs cfg.action ["__functor"])); + + move-column-to-workspace = kdl.magic-leaf "move-column-to-workspace"; + screenshot = kdl.magic-leaf "screenshot"; + screenshot-window = kdl.magic-leaf "screenshot-window"; + screenshot-screen = kdl.magic-leaf "screenshot-screen"; in normalize-nodes [ (lib.mapAttrsToList bind (with config.lib.niri.actions; { @@ -821,9 +826,9 @@ in { wl-copy "$(cut -d ':' -f 1 <<<"$FUZZEL_RES" | tr -d '\n')" && wtype -k XF86Paste ''; })); - "Print".action = kdl.magic-leaf "screenshot"; - "Control+Print".action = kdl.magic-leaf "screenshot-window"; - "Shift+Print".action = kdl.magic-leaf "screenshot-screen"; + "Print".action = screenshot; + "Control+Print".action = screenshot-window; + "Shift+Print".action = screenshot-screen; "Mod+B".action = with-select-window-action ".workspace_id == ($active_workspace | tonumber)" "{\"Action\":{\"FocusWindow\":{\"id\": .id}}}"; "Mod+Shift+B".action = with-select-window-action "true" "{\"Action\":{\"FocusWindow\":{\"id\": .id}}}"; @@ -862,19 +867,19 @@ in { "Mod+Shift+Control+C".action = move-workspace-up; "Mod+ParenLeft".action = focus-workspace "comm"; - "Mod+Shift+ParenLeft".action = kdl.magic-leaf "move-column-to-workspace" "comm"; + "Mod+Shift+ParenLeft".action = move-column-to-workspace "comm"; "Mod+ParenRight".action = focus-workspace "web"; - "Mod+Shift+ParenRight".action = kdl.magic-leaf "move-column-to-workspace" "web"; + "Mod+Shift+ParenRight".action = move-column-to-workspace "web"; "Mod+BraceRight".action = focus-workspace "read"; - "Mod+Shift+BraceRight".action = kdl.magic-leaf "move-column-to-workspace" "read"; + "Mod+Shift+BraceRight".action = move-column-to-workspace "read"; "Mod+BraceLeft".action = focus-workspace "mon"; - "Mod+Shift+BraceLeft".action = kdl.magic-leaf "move-column-to-workspace" "mon"; + "Mod+Shift+BraceLeft".action = move-column-to-workspace "mon"; "Mod+Asterisk".action = focus-workspace "vid"; - "Mod+Shift+Asterisk".action = kdl.magic-leaf "move-column-to-workspace" "vid"; + "Mod+Shift+Asterisk".action = move-column-to-workspace "vid"; "Mod+Plus".action = with-unnamed-workspace-action ''{"Action":{"FocusWorkspace":{"reference":{"Id": .id}}}}''; "Mod+Shift+Plus".action = with-unnamed-workspace-action ''{"Action":{"MoveColumnToWorkspace":{"reference":{"Id": .id}, "focus": true}}}''; @@ -884,6 +889,7 @@ in { "Mod+Shift+M".action = toggle-column-tabbed-display; + "Mod+L".action = maximize-window-to-edges; "Mod+R".action = switch-preset-column-width; "Mod+Shift+R".action = maximize-column; "Mod+Shift+Ctrl+R".action = switch-preset-window-height; @@ -970,7 +976,7 @@ in { "Mod+Shift+Semicolon".action = shell { Notifications = { DismissAll = {}; }; }; })) (map ({ name, selector, spawn, key, ...}: if key != null && selector != null && spawn != null then bind key { action = focus-or-spawn-action selector name spawn; } else null) cfg.scratchspaces) - (map ({ name, moveKey, ...}: if moveKey != null then bind moveKey { action = kdl.magic-leaf "move-column-to-workspace" name; } else null) cfg.scratchspaces) + (map ({ name, moveKey, ...}: if moveKey != null then bind moveKey { action = move-column-to-workspace name; } else null) cfg.scratchspaces) ] )) ]; -- cgit v1.2.3