diff --git a/config/keys.lua b/config/keys.lua index cd31982..54ba15d 100644 --- a/config/keys.lua +++ b/config/keys.lua @@ -188,6 +188,7 @@ local opts = { mods = LeaderCtrl, action = tunicodes.DefaultAction, }, + { key = "u", mods = LeaderCtrl, action = act.EmitEvent("toggle-tabbar") }, }, -- ━━━━━━━━━━━━━━━━━━━━━━ Conditional Key Mappings ━━━━━━━━━━━━━━━━━━━ diff --git a/funcs.lua b/funcs.lua index 0584159..e002bfe 100644 --- a/funcs.lua +++ b/funcs.lua @@ -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()