Compare commits

..

No commits in common. "1029f738b80f93a2154fd39028ee3ab539391ea7" and "2a63eb381c69ba6e79d912f0471a7be858ce5940" have entirely different histories.

2 changed files with 14 additions and 27 deletions

8
flake.lock generated
View file

@ -760,11 +760,11 @@
"nixvim": "nixvim_2" "nixvim": "nixvim_2"
}, },
"locked": { "locked": {
"lastModified": 1759120734, "lastModified": 1758995705,
"narHash": "sha256-BCor67IctwZ09Bx7QuEXY5effIUqk8lVNqDhrRmLM4s=", "narHash": "sha256-ix/VUpm2MIAr16yMmUeB/B8tdv7ximran6zZa1OlZvg=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "620bad601117de9f9d123d2772b7d421114d4af1", "rev": "939e8a45f5f9c3ab32f071a559bca6eceead0d53",
"revCount": 105, "revCount": 104,
"type": "git", "type": "git",
"url": "https://git.sajenim.dev/jasmine/nixvim-config.git" "url": "https://git.sajenim.dev/jasmine/nixvim-config.git"
}, },

View file

@ -124,47 +124,34 @@ config.keys = {
-- --
{ -- Split pane vertically { -- Split pane vertically
key = "s", key = "v",
mods = "LEADER", mods = "LEADER",
action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }), action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }),
}, },
{ -- Split pane horizontally { -- Split pane horizontally
key = "v", key = "s",
mods = "LEADER", mods = "LEADER",
action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }), action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }),
}, },
{ -- Dynamic pane management: Creates development layout or toggles focus between editor and terminal { -- If there is only one pane, split it vertically, otherwise toggle zoom on the first pane.
key = "`", key = "`",
mods = "LEADER", mods = "LEADER",
action = wezterm.action_callback(function(_, pane) action = wezterm.action_callback(function(_, pane)
local tab = pane:tab() local tab = pane:tab()
local panes = tab:panes_with_info() local panes = tab:panes_with_info()
-- Case 1: Single pane - Create a 3-pane development layout
if #panes == 1 then if #panes == 1 then
-- First split: Create bottom terminal pane (30% height)
pane:split({ pane:split({
direction = "Bottom", direction = "Bottom",
size = 0.30, size = 0.3,
}) })
-- Second split: Create left sidebar for Claude Code (25% width) elseif not panes[1].is_zoomed then
pane:split({ panes[1].pane:activate()
direction = "Left", tab:set_zoomed(true)
size = 0.25, elseif panes[1].is_zoomed then
args = { "claude" } -- Launch Claude Code in the sidebar tab:set_zoomed(false)
}) panes[2].pane:activate()
-- 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
end), end),
}, },