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
This commit is contained in:
parent
abbf55046f
commit
5b4944696e
1 changed files with 15 additions and 7 deletions
|
|
@ -135,23 +135,31 @@ config.keys = {
|
||||||
action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
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
|
||||||
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()
|
||||||
|
|
||||||
if #panes == 1 then
|
if #panes == 1 then
|
||||||
pane:split({
|
pane:split({
|
||||||
direction = "Bottom",
|
direction = "Bottom",
|
||||||
size = 0.3,
|
size = 0.30,
|
||||||
})
|
})
|
||||||
elseif not panes[1].is_zoomed then
|
pane:split({
|
||||||
panes[1].pane:activate()
|
direction = "Left",
|
||||||
tab:set_zoomed(true)
|
size = 0.26,
|
||||||
elseif panes[1].is_zoomed then
|
args = { "claude" }
|
||||||
tab:set_zoomed(false)
|
})
|
||||||
|
|
||||||
|
elseif not panes[2].is_zoomed then
|
||||||
panes[2].pane:activate()
|
panes[2].pane:activate()
|
||||||
|
tab:set_zoomed(true)
|
||||||
|
|
||||||
|
elseif panes[2].is_zoomed then
|
||||||
|
tab:set_zoomed(false)
|
||||||
|
panes[3].pane:activate()
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue