HASH 92017034810d
DATE 2025-04-24
SUBJECT darwin: add move binding, cmd click window draggins
FILES 4 CHANGED
HASH 92017034810d
DATE 2025-04-24
SUBJECT darwin: add move binding, cmd click
window draggins
FILES 4 CHANGED
┌─ modules/darwin/environment/aerospace/binds.nix ───────────────────────────┐
│ diff --git a/modules/darwin/environment/aerospace/binds.nix b/modules/darwin/envir │
│ onment/aerospace/binds.nix │
│ index 7e428a7..15792d3 100644 │
│ --- a/modules/darwin/environment/aerospace/binds.nix │
│ +++ b/modules/darwin/environment/aerospace/binds.nix │
│ @@ -11,6 +11,10 @@ │
│ "${mod}-right" = "focus right --boundaries all-monitors-outer-frame"; │
│ "${mod}-up" = "focus up --boundaries all-monitors-outer-frame"; │
│ "${mod}-down" = "focus down --boundaries all-monitors-outer-frame"; │
│ + "${mod}-h" = "focus left --boundaries all-monitors-outer-frame"; │
│ + "${mod}-l" = "focus right --boundaries all-monitors-outer-frame"; │
│ + "${mod}-k" = "focus up --boundaries all-monitors-outer-frame"; │
│ + "${mod}-j" = "focus down --boundaries all-monitors-outer-frame"; │
│ "${mod}-1" = "workspace 1"; │
│ "${mod}-2" = "workspace 2"; │
│ "${mod}-3" = "workspace 3"; │
│ @@ -20,7 +24,16 @@ │
│ "${mod}-7" = "workspace 7"; │
│ "${mod}-8" = "workspace 8"; │
│ "${mod}-9" = "workspace 9"; │
│ + "${mod}-backtick" = "workspace ai"; │
│ │
│ + "${mod}-shift-left" = "move left"; │
│ + "${mod}-shift-right" = "move right"; │
│ + "${mod}-shift-up" = "move up"; │
│ + "${mod}-shift-down" = "move down"; │
│ + "${mod}-shift-h" = "move left"; │
│ + "${mod}-shift-l" = "move right"; │
│ + "${mod}-shift-j" = "move down"; │
│ + "${mod}-shift-k" = "move up"; │
│ "${mod}-shift-1" = "move-node-to-workspace 1"; │
│ "${mod}-shift-2" = "move-node-to-workspace 2"; │
│ "${mod}-shift-3" = "move-node-to-workspace 3"; │
│ @@ -30,6 +43,16 @@ │
│ "${mod}-shift-7" = "move-node-to-workspace 7"; │
│ "${mod}-shift-8" = "move-node-to-workspace 8"; │
│ "${mod}-shift-9" = "move-node-to-workspace 9"; │
│ + "${mod}-shift-backtick" = "move-node-to-workspace ai"; │
│ + │
│ + "${mod}-ctrl-left" = "resize width -50"; │
│ + "${mod}-ctrl-right" = "resize width +50"; │
│ + "${mod}-ctrl-up" = "resize height +50"; │
│ + "${mod}-ctrl-down" = "resize height -50"; │
│ + "${mod}-ctrl-h" = "resize width -50"; │
│ + "${mod}-ctrl-l" = "resize width +50"; │
│ + "${mod}-ctrl-k" = "resize height +50"; │
│ + "${mod}-ctrl-j" = "resize height -50"; │
│ │
│ alt-f = "fullscreen"; │
│ │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...vironment/aerospace/binds.nix ───┐
│ diff --git a/modules/darwin/environment/aero │
│ space/binds.nix b/modules/darwin/environment │
│ /aerospace/binds.nix │
│ index 7e428a7..15792d3 100644 │
│ --- a/modules/darwin/environment/aerospace/b │
│ inds.nix │
│ +++ b/modules/darwin/environment/aerospace/b │
│ inds.nix │
│ @@ -11,6 +11,10 @@ │
│ "${mod}-right" = "focus right --boundar │
│ ies all-monitors-outer-frame"; │
│ "${mod}-up" = "focus up --boundaries al │
│ l-monitors-outer-frame"; │
│ "${mod}-down" = "focus down --boundarie │
│ s all-monitors-outer-frame"; │
│ + "${mod}-h" = "focus left --boundaries a │
│ ll-monitors-outer-frame"; │
│ + "${mod}-l" = "focus right --boundaries │
│ all-monitors-outer-frame"; │
│ + "${mod}-k" = "focus up --boundaries all │
│ -monitors-outer-frame"; │
│ + "${mod}-j" = "focus down --boundaries a │
│ ll-monitors-outer-frame"; │
│ "${mod}-1" = "workspace 1"; │
│ "${mod}-2" = "workspace 2"; │
│ "${mod}-3" = "workspace 3"; │
│ @@ -20,7 +24,16 @@ │
│ "${mod}-7" = "workspace 7"; │
│ "${mod}-8" = "workspace 8"; │
│ "${mod}-9" = "workspace 9"; │
│ + "${mod}-backtick" = "workspace ai"; │
│ │
│ + "${mod}-shift-left" = "move left"; │
│ + "${mod}-shift-right" = "move right"; │
│ + "${mod}-shift-up" = "move up"; │
│ + "${mod}-shift-down" = "move down"; │
│ + "${mod}-shift-h" = "move left"; │
│ + "${mod}-shift-l" = "move right"; │
│ + "${mod}-shift-j" = "move down"; │
│ + "${mod}-shift-k" = "move up"; │
│ "${mod}-shift-1" = "move-node-to-worksp │
│ ace 1"; │
│ "${mod}-shift-2" = "move-node-to-worksp │
│ ace 2"; │
│ "${mod}-shift-3" = "move-node-to-worksp │
│ ace 3"; │
│ @@ -30,6 +43,16 @@ │
│ "${mod}-shift-7" = "move-node-to-worksp │
│ ace 7"; │
│ "${mod}-shift-8" = "move-node-to-worksp │
│ ace 8"; │
│ "${mod}-shift-9" = "move-node-to-worksp │
│ ace 9"; │
│ + "${mod}-shift-backtick" = "move-node-to │
│ -workspace ai"; │
│ + │
│ + "${mod}-ctrl-left" = "resize width -50" │
│ ; │
│ + "${mod}-ctrl-right" = "resize width +50 │
│ "; │
│ + "${mod}-ctrl-up" = "resize height +50"; │
│ + "${mod}-ctrl-down" = "resize height -50 │
│ "; │
│ + "${mod}-ctrl-h" = "resize width -50"; │
│ + "${mod}-ctrl-l" = "resize width +50"; │
│ + "${mod}-ctrl-k" = "resize height +50"; │
│ + "${mod}-ctrl-j" = "resize height -50"; │
│ │
│ alt-f = "fullscreen"; │
│ │
└──────────────────────────────────────────────┘
┌─ modules/darwin/environment/aerospace/options.nix ─────────────────────────┐
│ diff --git a/modules/darwin/environment/aerospace/options.nix b/modules/darwin/env │
│ ironment/aerospace/options.nix │
│ index a9f9f3c..be28f0c 100644 │
│ --- a/modules/darwin/environment/aerospace/options.nix │
│ +++ b/modules/darwin/environment/aerospace/options.nix │
│ @@ -48,6 +48,11 @@ │
│ default = null; │
│ description = "Workspace to move the window to (can be a number or name l │
│ ike 'Browser1')"; │
│ }; │
│ + checkFurtherCallbacks = mkOption { │
│ + type = bool; │
│ + default = false; │
│ + description = "Override callback behaviour"; │
│ + }; │
│ }; │
│ }; │
│ │
│ @@ -55,11 +60,12 @@ │
│ "if" = filterAttrs (_: v: v != null) { │
│ inherit (rule.conditions) title name; │
│ app-id = rule.conditions.id; │
│ - during-startup = │
│ + during-aerospace-startup = │
│ if rule.conditions.duringStartup │
│ then true │
│ else null; │
│ }; │
│ + "check-further-callbacks" = rule.checkFurtherCallbacks; │
│ run = remove null [ │
│ ( │
│ if rule.float │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...ronment/aerospace/options.nix ───┐
│ diff --git a/modules/darwin/environment/aero │
│ space/options.nix b/modules/darwin/environme │
│ nt/aerospace/options.nix │
│ index a9f9f3c..be28f0c 100644 │
│ --- a/modules/darwin/environment/aerospace/o │
│ ptions.nix │
│ +++ b/modules/darwin/environment/aerospace/o │
│ ptions.nix │
│ @@ -48,6 +48,11 @@ │
│ default = null; │
│ description = "Workspace to move th │
│ e window to (can be a number or name like 'B │
│ rowser1')"; │
│ }; │
│ + checkFurtherCallbacks = mkOption { │
│ + type = bool; │
│ + default = false; │
│ + description = "Override callback be │
│ haviour"; │
│ + }; │
│ }; │
│ }; │
│ │
│ @@ -55,11 +60,12 @@ │
│ "if" = filterAttrs (_: v: v != null) { │
│ inherit (rule.conditions) title name; │
│ app-id = rule.conditions.id; │
│ - during-startup = │
│ + during-aerospace-startup = │
│ if rule.conditions.duringStartup │
│ then true │
│ else null; │
│ }; │
│ + "check-further-callbacks" = rule.checkF │
│ urtherCallbacks; │
│ run = remove null [ │
│ ( │
│ if rule.float │
└──────────────────────────────────────────────┘
┌─ modules/darwin/environment/aerospace/rules.nix ───────────────────────────┐
│ diff --git a/modules/darwin/environment/aerospace/rules.nix b/modules/darwin/envir │
│ onment/aerospace/rules.nix │
│ index 6775db8..32d84ba 100644 │
│ --- a/modules/darwin/environment/aerospace/rules.nix │
│ +++ b/modules/darwin/environment/aerospace/rules.nix │
│ @@ -15,6 +15,10 @@ in { │
│ conditions.id = "com.apple.finder"; │
│ float = true; │
│ } │
│ + # { │
│ + # conditions.id = "com.anthropic.claudefordesktop"; │
│ + # workspace = "ai"; │
│ + # } │
│ (optionals (default.browser == "zen") { │
│ conditions.id = "app.zen-browser.zen"; │
│ workspace = 2; │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...vironment/aerospace/rules.nix ───┐
│ diff --git a/modules/darwin/environment/aero │
│ space/rules.nix b/modules/darwin/environment │
│ /aerospace/rules.nix │
│ index 6775db8..32d84ba 100644 │
│ --- a/modules/darwin/environment/aerospace/r │
│ ules.nix │
│ +++ b/modules/darwin/environment/aerospace/r │
│ ules.nix │
│ @@ -15,6 +15,10 @@ in { │
│ conditions.id = "com.apple.finder"; │
│ float = true; │
│ } │
│ + # { │
│ + # conditions.id = "com.anthropic.clau │
│ defordesktop"; │
│ + # workspace = "ai"; │
│ + # } │
│ (optionals (default.browser == "zen") { │
│ conditions.id = "app.zen-browser.zen" │
│ ; │
│ workspace = 2; │
└──────────────────────────────────────────────┘
┌─ modules/darwin/system.nix ────────────────────────────────────────────────┐
│ diff --git a/modules/darwin/system.nix b/modules/darwin/system.nix │
│ index 6b54a11..c382752 100644 │
│ --- a/modules/darwin/system.nix │
│ +++ b/modules/darwin/system.nix │
│ @@ -40,6 +40,9 @@ in { │
│ NSWindowResizeTime = 0.0; │
│ NSUseAnimatedFocusRing = false; │
│ _HIHideMenuBar = true; │
│ + │
│ + # enable window dragging with cmd-crtl │
│ + NSWindowShouldDragOnGesture = true; │
│ }; │
│ }; │
│ activationScripts = { │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ modules/darwin/system.nix ──────────┐
│ diff --git a/modules/darwin/system.nix b/mod │
│ ules/darwin/system.nix │
│ index 6b54a11..c382752 100644 │
│ --- a/modules/darwin/system.nix │
│ +++ b/modules/darwin/system.nix │
│ @@ -40,6 +40,9 @@ in { │
│ NSWindowResizeTime = 0.0; │
│ NSUseAnimatedFocusRing = false; │
│ _HIHideMenuBar = true; │
│ + │
│ + # enable window dragging with cmd-c │
│ rtl │
│ + NSWindowShouldDragOnGesture = true; │
│ }; │
│ }; │
│ activationScripts = { │
└──────────────────────────────────────────────┘
[ BACK TO LOG ]
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET