feat: add toggle tab bar functionality

This commit is contained in:
2024-11-20 02:26:52 -05:00
parent 572e749c66
commit 190306f765
2 changed files with 11 additions and 0 deletions
+1
View File
@@ -188,6 +188,7 @@ local opts = {
mods = LeaderCtrl,
action = tunicodes.DefaultAction,
},
{ key = "u", mods = LeaderCtrl, action = act.EmitEvent("toggle-tabbar") },
},
-- ━━━━━━━━━━━━━━━━━━━━━━ Conditional Key Mappings ━━━━━━━━━━━━━━━━━━━
+10
View File
@@ -25,6 +25,16 @@ wezterm.on("update-status", function(window, pane)
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
---@return string leadericon The leader icon
function M.leader_component()