From 24636c508192a53eb2e3229202bdf561b466a48b Mon Sep 17 00:00:00 2001 From: jasmine Date: Mon, 29 Sep 2025 11:05:21 +0800 Subject: [PATCH 1/3] unify splits with neovim --- home-manager/sajenim/features/desktop/wezterm/wezterm.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home-manager/sajenim/features/desktop/wezterm/wezterm.lua b/home-manager/sajenim/features/desktop/wezterm/wezterm.lua index 1b4affc..eed56a9 100644 --- a/home-manager/sajenim/features/desktop/wezterm/wezterm.lua +++ b/home-manager/sajenim/features/desktop/wezterm/wezterm.lua @@ -124,13 +124,13 @@ config.keys = { -- { -- Split pane vertically - key = "v", + key = "s", mods = "LEADER", action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }), }, { -- Split pane horizontally - key = "s", + key = "v", mods = "LEADER", action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }), }, From abbf55046f71be5da1204e97f7536b0886d02ef3 Mon Sep 17 00:00:00 2001 From: jasmine Date: Mon, 29 Sep 2025 12:43:23 +0800 Subject: [PATCH 2/3] chore: bump inputs --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index cf1d7f8..5981999 100644 --- a/flake.lock +++ b/flake.lock @@ -760,11 +760,11 @@ "nixvim": "nixvim_2" }, "locked": { - "lastModified": 1758995705, - "narHash": "sha256-ix/VUpm2MIAr16yMmUeB/B8tdv7ximran6zZa1OlZvg=", + "lastModified": 1759120734, + "narHash": "sha256-BCor67IctwZ09Bx7QuEXY5effIUqk8lVNqDhrRmLM4s=", "ref": "refs/heads/master", - "rev": "939e8a45f5f9c3ab32f071a559bca6eceead0d53", - "revCount": 104, + "rev": "620bad601117de9f9d123d2772b7d421114d4af1", + "revCount": 105, "type": "git", "url": "https://git.sajenim.dev/jasmine/nixvim-config.git" }, From 1029f738b80f93a2154fd39028ee3ab539391ea7 Mon Sep 17 00:00:00 2001 From: jasmine Date: Mon, 29 Sep 2025 12:44:39 +0800 Subject: [PATCH 3/3] enhance wezterm: add intelligent development layout with Claude integration - Create 3-pane layout automatically: editor (main), terminal (bottom 30%), Claude sidebar (left 25%) - Implement smart focus management between editor and terminal panes - Add zoom toggling for distraction-free editing sessions - Launch Claude Code automatically in dedicated sidebar pane --- .../features/desktop/wezterm/wezterm.lua | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/home-manager/sajenim/features/desktop/wezterm/wezterm.lua b/home-manager/sajenim/features/desktop/wezterm/wezterm.lua index eed56a9..d1d321d 100644 --- a/home-manager/sajenim/features/desktop/wezterm/wezterm.lua +++ b/home-manager/sajenim/features/desktop/wezterm/wezterm.lua @@ -135,23 +135,36 @@ config.keys = { action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }), }, - { -- If there is only one pane, split it vertically, otherwise toggle zoom on the first pane. + { -- Dynamic pane management: Creates development layout or toggles focus between editor and terminal key = "`", mods = "LEADER", action = wezterm.action_callback(function(_, pane) local tab = pane:tab() local panes = tab:panes_with_info() + + -- Case 1: Single pane - Create a 3-pane development layout if #panes == 1 then + -- First split: Create bottom terminal pane (30% height) pane:split({ direction = "Bottom", - size = 0.3, + size = 0.30, }) - elseif not panes[1].is_zoomed then - panes[1].pane:activate() - tab:set_zoomed(true) - elseif panes[1].is_zoomed then - tab:set_zoomed(false) - panes[2].pane:activate() + -- Second split: Create left sidebar for Claude Code (25% width) + pane:split({ + direction = "Left", + size = 0.25, + args = { "claude" } -- Launch Claude Code in the sidebar + }) + + -- Case 2: Multiple panes exist, pane 2 (editor) is not zoomed - Focus and zoom editor + elseif not panes[2].is_zoomed then + panes[2].pane:activate() -- Switch to editor pane (typically Neovim) + tab:set_zoomed(true) -- Zoom to hide other panes for focused editing + + -- Case 3: Pane 2 (editor) is currently zoomed - Unzoom and return to terminal + elseif panes[2].is_zoomed then + tab:set_zoomed(false) -- Restore multi-pane layout + panes[3].pane:activate() -- Focus the terminal pane for quick commands end end), },