Skip to content

Dynamic padding for neovim #6497

Closed Answered by erlestor
erlestor asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks a lot! I changed it a bit so the padding is 0 as long as one of the panes in the active tab has an alt screen active

wezterm.on("update-status", function(window, _)
    local tab = window:active_tab()
    local panes = tab:panes()
    local alt_screen_active = false
    
    for i = 1, #panes, 1 do
        local pane = panes[i]
        if pane:is_alt_screen_active() then
	    alt_screen_active = true
	    break
        end
    end
    
    if alt_screen_active then
    window:set_config_overrides({
        window_padding = { left = 0, right = 0, top = 0, bottom = 0 },
    })
    else
    window:set_config_overrides({
        window_padding = default_padding,
    })
    end
end)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by erlestor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants