caio.co/de/dotfiles

wezterm lua cleanup

Id
aac1cc2ff5df3cc0c5662ff1b265b2bf18c642a5
Author
Caio
Commit time
2023-07-27T08:51:14+02:00

Modified config/wezterm/keys.lua

@@ -16,7 +16,7
{ key = 'w', mods = 'LEADER', action = act.CloseCurrentPane{ confirm = true } },
{ key = ',', mods = 'LEADER', action = act.PromptInputLine {
description = 'Enter new tab name',
- action = wezterm.action_callback(function(window, pane, line)
+ action = wezterm.action_callback(function(window, _, line)
if line then
window:active_tab():set_title(line)
end

Modified config/wezterm/wezterm.lua

@@ -58,7 +58,7
bottom = 0,
}

-function tab_title(tab_info)
+local function tab_title(tab_info)
local title = tab_info.tab_title
-- if the tab title is explicitly set, take that
if title and #title > 0 then
@@ -70,7 +70,7

wezterm.on(
'format-tab-title',
- function(tab, tabs, panes, config, hover, max_width)
+ function(tab, _, _, _, _, max_width)
local background = bg
local foreground = fg