feat: add toggle tab bar functionality
This commit is contained in:
@@ -188,6 +188,7 @@ local opts = {
|
|||||||
mods = LeaderCtrl,
|
mods = LeaderCtrl,
|
||||||
action = tunicodes.DefaultAction,
|
action = tunicodes.DefaultAction,
|
||||||
},
|
},
|
||||||
|
{ key = "u", mods = LeaderCtrl, action = act.EmitEvent("toggle-tabbar") },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- ━━━━━━━━━━━━━━━━━━━━━━ Conditional Key Mappings ━━━━━━━━━━━━━━━━━━━
|
-- ━━━━━━━━━━━━━━━━━━━━━━ Conditional Key Mappings ━━━━━━━━━━━━━━━━━━━
|
||||||
|
|||||||
@@ -25,6 +25,16 @@ wezterm.on("update-status", function(window, pane)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
wezterm.on("toggle-tabbar", function(window, _)
|
||||||
|
local overrides = window:get_config_overrides() or {}
|
||||||
|
if overrides.enable_tab_bar == false then
|
||||||
|
overrides.enable_tab_bar = true
|
||||||
|
else
|
||||||
|
overrides.enable_tab_bar = false
|
||||||
|
end
|
||||||
|
window:set_config_overrides(overrides)
|
||||||
|
end)
|
||||||
|
|
||||||
---@function Function to render the leader icon
|
---@function Function to render the leader icon
|
||||||
---@return string leadericon The leader icon
|
---@return string leadericon The leader icon
|
||||||
function M.leader_component()
|
function M.leader_component()
|
||||||
|
|||||||
Reference in New Issue
Block a user