more wezterm format-tab-title adjustments for the weird things i've seen
this "feature" appears to be full of holes, seemingly limited by what process info wezterm is able to provide to you (which is probably limited by other things, etc etc). ugh.
This commit is contained in:
parent
dfe1d530b5
commit
9731e4c3e5
|
@ -128,6 +128,9 @@ local function get_process(tab)
|
|||
if string.find(process_name, "kubectl") then
|
||||
process_name = "kubectl"
|
||||
end
|
||||
if string.find(process_name, "python3") then
|
||||
process_name = "python3"
|
||||
end
|
||||
|
||||
return {
|
||||
Icon = process_icons[process_name] or string.format("[%s]", process_name),
|
||||
|
@ -157,13 +160,14 @@ wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_wid
|
|||
|
||||
local title
|
||||
if process then
|
||||
local sub_title = cwd
|
||||
if process_use_suggested_title[process.Process] then
|
||||
sub_title = get_suggested_tab_title(tab)
|
||||
end
|
||||
|
||||
local icon = process.Icon or string.format("[%s]", process.Process)
|
||||
title = string.format(" %s (%s) ", icon, sub_title)
|
||||
if process_use_suggested_title[process.Process] then
|
||||
title = string.format(" %s %s ", icon, get_suggested_tab_title(tab))
|
||||
else
|
||||
title = string.format(" %s (%s) ", icon, cwd)
|
||||
end
|
||||
else
|
||||
title = string.format(" %s %s ", wezterm.nerdfonts.cod_terminal_bash, get_suggested_tab_title(tab))
|
||||
end
|
||||
|
||||
if has_unseen_output then
|
||||
|
|
Loading…
Reference in a new issue