A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
feat(tab-icons): always show program icons
RoversX2369e327bd77
diff --git a/mux/src/foreground_program.rs b/mux/src/foreground_program.rsindex a04ccd1b..a66e1c7f 100644--- a/mux/src/foreground_program.rs+++ b/mux/src/foreground_program.rs@@ -94,17 +94,15 @@ pub fn program_for_pane(pane_id: PaneId) -> Option<ForegroundProgram> {.and_then(|record| record.published.clone())}-/// Install a process-local switch. The GUI wires its tab-icon setting-/// through this so a user who turned the icons off pays nothing for them;-/// a mux server installs nothing and always observes, because its clients-/// decide for themselves what to show.+/// Install a process-local switch. Nothing installs one now -- tab icons+/// are always on -- and a process without one always observes.pub fn set_process_preference(preference: impl Fn() -> bool + Send + Sync + 'static) {*PROCESS_PREFERENCE.write() = Some(Box::new(preference));refresh_enabled();}-/// Re-read the switch. The GUI calls this when its setting changes; the-/// flip itself is handled by the next drain.+/// Re-read the switch, after it changes; the flip itself is handled by the+/// next drain.pub fn refresh_enabled() {let enabled = PROCESS_PREFERENCE.read().as_ref().map_or(true, |f| f());let was = ENABLED.swap(enabled, Ordering::AcqRel);@@ -120,8 +118,8 @@ pub fn refresh_enabled() {}}-/// Whether this process observes: the GUI's tab icon switch, or always-/// on a mux server.+/// Whether this process observes: always, unless a switch was installed+/// and is off.pub fn enabled() -> bool {ENABLED.load(Ordering::Acquire)}diff --git a/thinkterm-i18n/i18n/de-DE.ftl b/thinkterm-i18n/i18n/de-DE.ftlindex dc557cc6..350c35ab 100644--- a/thinkterm-i18n/i18n/de-DE.ftl+++ b/thinkterm-i18n/i18n/de-DE.ftl@@ -1225,8 +1225,6 @@ settings-web-verify-certificate = Vergleichen Sie diesen SHA-256-Fingerabdruck m# --- Tab icons: Settings › Tab Icons, and the pane tabs themselves ---settings-section-tab-icons = Tab-Symbole-settings-tab-icons-enabled = Programmsymbole auf Tabs-settings-tab-icons-enabled-description = Jeder Tab zeigt das Symbol des Programms, das darin läuft.settings-tab-icons-cards-heading = Symbolesettings-tab-icons-cards-note = Klicken Sie auf eine Karte, um sie zu bearbeiten. Ziehen Sie eine .svg-Datei auf eine Karte, um deren Form zu verwenden.settings-tab-icons-search-placeholder = Symbole oder Programme suchendiff --git a/thinkterm-i18n/i18n/en-US.ftl b/thinkterm-i18n/i18n/en-US.ftlindex ae6a702b..cad663ce 100644--- a/thinkterm-i18n/i18n/en-US.ftl+++ b/thinkterm-i18n/i18n/en-US.ftl@@ -1225,8 +1225,6 @@ settings-web-verify-certificate = Compare this SHA-256 with the browser certific# --- Tab icons: Settings › Tab Icons, and the pane tabs themselves ---settings-section-tab-icons = Tab Icons-settings-tab-icons-enabled = Program icons on tabs-settings-tab-icons-enabled-description = Each tab shows an icon for the program running in it.settings-tab-icons-cards-heading = Iconssettings-tab-icons-cards-note = Click a card to change it. Drop an .svg file on a card to use its shape.settings-tab-icons-search-placeholder = Search icons or programsdiff --git a/thinkterm-i18n/i18n/fr-FR.ftl b/thinkterm-i18n/i18n/fr-FR.ftlindex ea2e077a..8b119669 100644--- a/thinkterm-i18n/i18n/fr-FR.ftl+++ b/thinkterm-i18n/i18n/fr-FR.ftl@@ -1219,8 +1219,6 @@ settings-web-verify-certificate = Comparez cette empreinte SHA-256 à celle du c# --- Tab icons: Settings › Tab Icons, and the pane tabs themselves ---settings-section-tab-icons = Icônes d’onglet-settings-tab-icons-enabled = Icônes de programme sur les onglets-settings-tab-icons-enabled-description = Chaque onglet affiche l’icône du programme qui s’y exécute.settings-tab-icons-cards-heading = Icônessettings-tab-icons-cards-note = Cliquez sur une carte pour la modifier. Déposez un fichier .svg sur une carte pour utiliser sa forme.settings-tab-icons-search-placeholder = Rechercher une icône ou un programmediff --git a/thinkterm-i18n/i18n/ja-JP.ftl b/thinkterm-i18n/i18n/ja-JP.ftlindex 37910027..e1c3c64e 100644--- a/thinkterm-i18n/i18n/ja-JP.ftl+++ b/thinkterm-i18n/i18n/ja-JP.ftl@@ -1188,8 +1188,6 @@ settings-web-verify-certificate = 信頼する前に、この SHA-256 指紋を# --- Tab icons: Settings › Tab Icons, and the pane tabs themselves ---settings-section-tab-icons = タブアイコン-settings-tab-icons-enabled = タブにプログラムのアイコンを表示-settings-tab-icons-enabled-description = 各タブに、中で動いているプログラムのアイコンを表示します。settings-tab-icons-cards-heading = アイコンsettings-tab-icons-cards-note = カードをクリックして編集します。.svg ファイルをカードにドロップすると、その形に置き換わります。settings-tab-icons-search-placeholder = アイコンまたはプログラムを検索diff --git a/thinkterm-i18n/i18n/zh-CN.ftl b/thinkterm-i18n/i18n/zh-CN.ftlindex f0c7cd4c..8cc2ad37 100644--- a/thinkterm-i18n/i18n/zh-CN.ftl+++ b/thinkterm-i18n/i18n/zh-CN.ftl@@ -1188,8 +1188,6 @@ settings-web-verify-certificate = 信任前,请核对浏览器证书的 SHA-25# --- Tab icons: Settings › Tab Icons, and the pane tabs themselves ---settings-section-tab-icons = 标签图标-settings-tab-icons-enabled = 标签上显示程序图标-settings-tab-icons-enabled-description = 每个标签显示里面正在运行的程序的图标。settings-tab-icons-cards-heading = 图标settings-tab-icons-cards-note = 点卡片修改;把 .svg 文件拖到卡片上,就换成它的图案。settings-tab-icons-search-placeholder = 搜索图标或程序diff --git a/thinkterm-mobile/src/icons.rs b/thinkterm-mobile/src/icons.rsindex fc0aabf4..762c813c 100644--- a/thinkterm-mobile/src/icons.rs+++ b/thinkterm-mobile/src/icons.rs@@ -227,7 +227,6 @@ mod tests {#[test]fn the_built_in_cards_carry_their_glyphs() {let catalog = catalog();- assert!(catalog.enabled);let terminal = catalog.cards.iter().find(|card| card.id == catalog.terminal).expect("the terminal's card");assert!(terminal.circle.starts_with('#') && terminal.glyph.starts_with('#'));let mask = mask(&terminal.svg, 48).expect("a glyph");diff --git a/thinkterm-tab-icons/src/lib.rs b/thinkterm-tab-icons/src/lib.rsindex 78ea7c60..d232e951 100644--- a/thinkterm-tab-icons/src/lib.rs+++ b/thinkterm-tab-icons/src/lib.rs@@ -716,7 +716,6 @@ impl Card {/// Every card, and the tables that find one for a pane.pub struct Catalog {- pub enabled: bool,pub cards: Vec<Card>,matcher: Matcher,}@@ -813,11 +812,7 @@ impl Catalog {.iter().map(|card| (card.id.as_str(), &card.programs[..], &card.agents[..])),);- Self {- enabled: settings.enabled.unwrap_or(true),- cards,- matcher,- }+ Self { cards, matcher }}pub fn card(&self, id: &str) -> Option<&Card> {@@ -857,7 +852,6 @@ impl Catalog {}).collect();WireCatalog {- enabled: self.enabled,terminal: self.terminal_card().id.clone(),cards,}@@ -941,8 +935,6 @@ pub struct WireCard {/// Every card a page needs, and which one is the terminal's.#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]pub struct WireCatalog {- /// The machine's own switch; a page has its own as well.- pub enabled: bool,pub terminal: String,pub cards: Vec<WireCard>,}@@ -1032,8 +1024,6 @@ pub fn svg_key(id: Option<&str>) -> Option<GlyphKey> {#[derive(Debug, Clone, Default, Deserialize, Serialize, PartialEq)]#[serde(default)]pub struct TabIconSettings {- /// Absent means on.- pub enabled: Option<bool>,/// Built-in cards the user changed, and the user's own cards, in the/// order they are shown.pub cards: Vec<TabIconCard>,@@ -1113,7 +1103,6 @@ mod tests {#[test]fn a_card_of_the_users_own_wins_over_a_built_in() {let settings = TabIconSettings {- enabled: None,cards: vec![TabIconCard {id: "custom-1".to_string(),programs: Some(vec!["deploy.sh".to_string(), "python".to_string()]),@@ -1128,10 +1117,17 @@ mod tests {assert_eq!(card_id(&catalog, &program("python3", None)), "custom-1");}+ #[test]+ fn a_settings_file_that_turned_the_icons_off_still_reads() {+ // Tab icons were once switchable; the old key is passed over.+ let settings: TabIconSettings =+ serde_json::from_str(r#"{"enabled":false,"cards":[{"id":"python"}]}"#).unwrap();+ assert_eq!(settings.cards.len(), 1);+ }+#[test]fn a_built_in_card_keeps_its_defaults_where_unchanged() {let settings = TabIconSettings {- enabled: Some(false),cards: vec![TabIconCard {id: "python".to_string(),circle: Some("#112233".to_string()),@@ -1140,7 +1136,6 @@ mod tests {}],};let catalog = build(&settings);- assert!(!catalog.enabled);let python = catalog.card("python").unwrap();assert_eq!(python.circle, Rgb(0x11, 0x22, 0x33));assert_eq!(python.glyph_color, WHITE);@@ -1153,7 +1148,6 @@ mod tests {#[test]fn the_terminal_card_ignores_saved_changes() {let settings = TabIconSettings {- enabled: None,cards: vec![TabIconCard {id: TERMINAL_CARD.to_string(),circle: Some("#112233".to_string()),@@ -1171,7 +1165,6 @@ mod tests {#[test]fn a_default_saved_as_a_change_is_no_change() {let settings = TabIconSettings {- enabled: None,cards: vec![TabIconCard {id: "monitor".to_string(),circle: Some(@@ -1229,7 +1222,6 @@ mod tests {#[test]fn a_page_matches_the_cards_it_is_sent_as_the_desktop_does() {let settings = TabIconSettings {- enabled: None,cards: vec![TabIconCard {id: "custom-1".to_string(),programs: Some(vec!["deploy.sh".to_string()]),diff --git a/thinkterm-web/src/app.rs b/thinkterm-web/src/app.rsindex 5e56ede1..6f8bbbec 100644--- a/thinkterm-web/src/app.rs+++ b/thinkterm-web/src/app.rs@@ -1250,9 +1250,9 @@ impl<P: Platform, L: Link> App<P, L> {}/// The cards to dress the tabs with: none until the page has handed- /// them over, or with tab icons off.+ /// them over.fn tab_icons(inner: &Inner<P, L>) -> Option<&crate::tab_icons::TabIcons> {- inner.tab_icons.as_ref().filter(|_| inner.settings.tab_icons)+ inner.tab_icons.as_ref()}/// The card heading a pane's tab: its agent's, else its program's,diff --git a/thinkterm-web/src/navbar.rs b/thinkterm-web/src/navbar.rsindex 4c09cb62..4c43b007 100644--- a/thinkterm-web/src/navbar.rs+++ b/thinkterm-web/src/navbar.rs@@ -188,7 +188,7 @@ pub struct CapsuleView {pub title: String,pub busy: bool,pub current: bool,- /// The card heading it (`tab_icons`); none with tab icons off.+ /// The card heading it (`tab_icons`); none until the cards arrive.pub icon: Option<String>,}diff --git a/thinkterm-web/src/settings.rs b/thinkterm-web/src/settings.rsindex 3544d944..a2f66969 100644--- a/thinkterm-web/src/settings.rs+++ b/thinkterm-web/src/settings.rs@@ -60,9 +60,6 @@ pub struct WebSettings {pub auto_reconnect: bool,/// The bars over the panes; a phone can do without them.pub pane_bars: bool,- /// The program's icon at the head of each tab, as the desktop draws- /// it from that machine's cards.- pub tab_icons: bool,}/// A colour scheme as the page hands it over, straight out of@@ -129,7 +126,6 @@ impl Default for WebSettings {resize_mode: ResizeMode::Live,auto_reconnect: true,pane_bars: true,- tab_icons: true,}}}diff --git a/thinkterm-web/src/tab_icons.rs b/thinkterm-web/src/tab_icons.rsindex 79918727..6963ed11 100644--- a/thinkterm-web/src/tab_icons.rs+++ b/thinkterm-web/src/tab_icons.rs@@ -13,8 +13,6 @@ use thinkterm_tab_icons::{Matcher, WireCatalog};pub struct TabIcons {/// The cards' ids, in the catalog's order: what `Matcher` indexes.ids: Vec<String>,- /// The machine's own switch: off, no tab gets an icon.- enabled: bool,matcher: Matcher,}@@ -27,7 +25,6 @@ impl TabIcons {pub fn new(catalog: &WireCatalog) -> Self {Self {ids: catalog.cards.iter().map(|card| card.id.clone()).collect(),- enabled: catalog.enabled,matcher: catalog.matcher(),}}@@ -43,9 +40,6 @@ impl TabIcons {}fn id(&self, index: usize) -> Option<&str> {- if !self.enabled {- return None;- }self.ids.get(index).map(String::as_str)}}@@ -54,9 +48,8 @@ impl TabIcons {mod tests {use super::*;- fn catalog(enabled: bool) -> String {+ fn catalog() -> String {serde_json::json!({- "enabled": enabled,"terminal": "terminal","cards": [{ "id": "terminal", "circle": "#333333", "glyph": "#ffffff", "svg": "<svg/>", "programs": [], "agents": [] },@@ -76,7 +69,7 @@ mod tests {#[test]fn a_pane_gets_its_agents_card_then_its_programs_then_the_terminals() {- let icons = TabIcons::parse(&catalog(true)).unwrap();+ let icons = TabIcons::parse(&catalog()).unwrap();assert_eq!(icons.card(Some("claude"), Some(&program("node"))), Some("claude"));assert_eq!(icons.card(None, Some(&program("nvim"))), Some("vim"));assert_eq!(icons.card(None, Some(&program("zsh"))), Some("terminal"));@@ -84,13 +77,6 @@ mod tests {assert_eq!(icons.terminal(), Some("terminal"));}- #[test]- fn the_machines_switch_turns_every_icon_off() {- let icons = TabIcons::parse(&catalog(false)).unwrap();- assert_eq!(icons.card(None, Some(&program("vim"))), None);- assert_eq!(icons.terminal(), None);- }-#[test]fn a_catalog_that_does_not_parse_is_refused() {assert!(TabIcons::parse("{}").is_err());diff --git a/thinkterm-web/src/views.rs b/thinkterm-web/src/views.rsindex 865cb75e..d1caf36b 100644--- a/thinkterm-web/src/views.rs+++ b/thinkterm-web/src/views.rs@@ -31,7 +31,7 @@ pub struct TabsView {pub tabs: Vec<TabView>,pub controls: Controls,/// The card heading every window tab: the terminal's, as on the- /// desktop (`tab_icons`); none with tab icons off.+ /// desktop (`tab_icons`); none until the cards arrive.pub icon: Option<String>,}@@ -158,9 +158,6 @@ pub const STRING_KEYS: &[&str] = &[// The page's toolbar, as the desktop's Remote Hosts page has it."ssh-new-host","ssh-search",- // The desktop's Tab Icons switch.- "settings-tab-icons-enabled",- "settings-tab-icons-enabled-description","menu-add-remote-host","menu-new-space-here","sidebar-new-thread",diff --git a/thinkterm-web/ui/src/SettingsPanel.svelte b/thinkterm-web/ui/src/SettingsPanel.svelteindex 80c132bc..5b03ffd5 100644--- a/thinkterm-web/ui/src/SettingsPanel.svelte+++ b/thinkterm-web/ui/src/SettingsPanel.svelte@@ -6,7 +6,7 @@import { clients, handle } from './client';import { s, views } from './client.svelte';import {- aLargeSmall, arrowLeft, bot, braces, contrast, gitBranch, globe, grid2x2, info, minus, mouse, packageIcon, palette, panelLeft,+ aLargeSmall, arrowLeft, bot, braces, contrast, gitBranch, globe, info, minus, mouse, packageIcon, palette, panelLeft,panelLeftOpen, panelRightOpen, plus, puzzle, rotateCcw, rotateCw, scale as scaleIcon, search, server,slidersHorizontal, squareTerminal, x,} from './icons';@@ -473,18 +473,6 @@</div>{/if}- {#if shows('appearance', s('settings-tab-icons-enabled'))}- <!-- The desktop's Tab Icons switch, under that page's square. The- cards themselves are set on the desktop, and come from it. -->- <div class="card">- <div class="srow">- <span class="tile" style:--tile={TILE.pink}>{@html grid2x2}</span>- <div class="tx"><div class="lab">{s('settings-tab-icons-enabled')}</div><div class="desc">{d('settings-tab-icons-enabled-description')}</div></div>- <label class="switch"><input type="checkbox" data-setting="tab-icons" checked={settings['tab-icons']} onchange={(ev) => onFlag('tab-icons', ev)} /><span class="knob"></span></label>- </div>- </div>- {/if}-{#if shows('sidebar', s('web-settings-hover-reveal')) || shows('sidebar', s('web-settings-sidebar-reset'))}<div class="card"><!-- The desktop sets these two from the sidebar itself, so has nodiff --git a/thinkterm-web/ui/src/model.ts b/thinkterm-web/ui/src/model.tsindex 16ab5500..a2b303d6 100644--- a/thinkterm-web/ui/src/model.ts+++ b/thinkterm-web/ui/src/model.ts@@ -370,8 +370,6 @@ export type WebSettings = {'scroll-mode': ScrollMode;/** `"desktop"` follows the server's configuration; else a scheme's name. */'terminal-scheme': string;- /** The program's icon at the head of each tab (tabicons.svelte.ts). */- 'tab-icons': boolean;};/** One entry of `schemes.json`, built by `thinkterm cli color-schemesdiff --git a/wezterm-gui/src/main.rs b/wezterm-gui/src/main.rsindex 885733e8..1c48c2e1 100644--- a/wezterm-gui/src/main.rs+++ b/wezterm-gui/src/main.rs@@ -1392,8 +1392,6 @@ fn setup_mux(mux::agent_status::set_process_preference(|| {crate::native_settings::agent_panel_enabled()});- // Tab icons turned off: this process stops watching what its panes run.- mux::foreground_program::set_process_preference(crate::tab_icons::enabled);// The user-facing shell choice reaches every local spawn from here.// A headless mux server installs nothing, so this preference can only// ever decide what *this* process spawns, never what a remote serverdiff --git a/wezterm-gui/src/settings_window.rs b/wezterm-gui/src/settings_window.rsindex 3a57bdad..3b7343cd 100644--- a/wezterm-gui/src/settings_window.rs+++ b/wezterm-gui/src/settings_window.rs@@ -1934,7 +1934,6 @@ enum SettingsAction {SidebarResize,SidebarScrollArea,ContentScrollArea,- ToggleTabIcons,/// A card, by its place in `tab_icon_cards` as last painted.TabIconSelect(u16),TabIconNew,@@ -6692,11 +6691,6 @@ impl SettingsWindow {}}}- SettingsAction::ToggleTabIcons => {- let enabled = !crate::tab_icons::catalog().enabled;- let result = crate::tab_icons::set_enabled(enabled);- self.after_tab_icon_change(result);- }SettingsAction::TabIconSelect(index) => {if let Some(id) = self.ui.tab_icon_cards.get(index as usize).cloned() {self.select_tab_icon(id);@@ -11507,7 +11501,7 @@ impl SettingsWindow {Ok(())}- /// Tab icons: the switch, a card for every look a pane tab can take but+ /// Tab icons: a card for every look a pane tab can take but/// the fixed terminal one, and the editor for the card picked. Cards sit/// beside the editor where the page is wide enough, above it where it is/// not; beside them, the editor stays in view while they scroll.@@ -11540,23 +11534,8 @@ impl SettingsWindow {}}- let (switch_card_y, switch_row_y) = self.settings_card_geometry(section_y, 1);- let switch_card_height = self.settings_card_height(1);- let card_padding = self.ui_px(36.0);- self.paint_group_card(layers, x, switch_card_y, max_width, switch_card_height)?;- self.paint_toggle_setting_row(- layers,- x + card_padding,- switch_row_y,- max_width - card_padding * 2.0,- &crate::i18n::tr("settings-tab-icons-enabled"),- &crate::i18n::tr("settings-tab-icons-enabled-description"),- catalog.enabled,- SettingsAction::ToggleTabIcons,- false,- )?;-- let heading_y = switch_card_y + switch_card_height + self.settings_section_card_gap();+ // The page's first heading, where every page has its first.+ let heading_y = section_y;self.draw_text(layers,&body_font,diff --git a/wezterm-gui/src/tab_icons.rs b/wezterm-gui/src/tab_icons.rsindex d6dae7b3..e5b70637 100644--- a/wezterm-gui/src/tab_icons.rs+++ b/wezterm-gui/src/tab_icons.rs@@ -56,47 +56,34 @@ thread_local! {/// The catalog as the settings currently describe it.pub(crate) fn catalog() -> Rc<Catalog> {let settings = native_settings::load_shared();- let (catalog, rebuilt) = CATALOG.with(|slot| {+ CATALOG.with(|slot| {let mut slot = slot.borrow_mut();if let Some((built_from, catalog)) = slot.as_ref() {if Arc::ptr_eq(built_from, &settings) {- return (Rc::clone(catalog), false);+ return Rc::clone(catalog);}}let catalog = Rc::new(Catalog::build(&settings.tab_icons, crate::i18n::tr));*slot = Some((settings, Rc::clone(&catalog)));- (catalog, true)- });- if rebuilt {- // The settings can change without `set_enabled` -- edited by hand,- // reloaded from disk, restored from a backup -- and the observer's- // switch has to follow the one the painters read.- mux::foreground_program::refresh_enabled();- }- catalog-}--/// How to draw the icon of the tab showing `pane`, or `None` when the user-/// turned tab icons off and the tab keeps its plain terminal mark.-pub(crate) fn resolve(pane: &dyn Pane) -> Option<ResolvedIcon> {- let catalog = catalog();- catalog.enabled.then(|| {- let agent = pane.agent_status().filter(|status| !status.ended);catalog- .card_for(- agent.as_ref().map(|status| status.agent_id.as_str()),- pane.foreground_program().as_ref(),- )- .resolved()})}+/// How to draw the icon of the tab showing `pane`.+pub(crate) fn resolve(pane: &dyn Pane) -> ResolvedIcon {+ let agent = pane.agent_status().filter(|status| !status.ended);+ catalog()+ .card_for(+ agent.as_ref().map(|status| status.agent_id.as_str()),+ pane.foreground_program().as_ref(),+ )+ .resolved()+}+/// How to draw a window tab's icon: always the terminal card, as a window-/// tab holds panes that may each run something else. `None` when the user-/// turned tab icons off.-pub(crate) fn resolve_window_tab() -> Option<ResolvedIcon> {- let catalog = catalog();- catalog.enabled.then(|| catalog.terminal_card().resolved())+/// tab holds panes that may each run something else.+pub(crate) fn resolve_window_tab() -> ResolvedIcon {+ catalog().terminal_card().resolved()}@@ -276,7 +263,7 @@ fn remove_unreferenced_svgs(settings: &NativeTabIconSettings) {/// top and darkens toward black at the bottom, and the rim -- one point on/// a 25pt icon -- does the same more strongly, so the edge reads as a bevel/// in the circle's own colour. The shadow is in its hue too.-const PLATE: TileStyle = TileStyle {+pub(crate) const PLATE: TileStyle = TileStyle {fill_top_lighten: 0.18,fill_bottom_darken: 0.13,rim_top_lighten: 0.42,@@ -419,20 +406,6 @@ fn entry<'a>(settings: &'a mut NativeTabIconSettings, id: &str) -> &'a mut Nativ&mut settings.cards[index]}-pub(crate) fn set_enabled(enabled: bool) -> Result<()> {- edit(|settings| settings.enabled = (!enabled).then_some(false))?;- mux::foreground_program::refresh_enabled();- Ok(())-}--/// Whether tab icons are on; the foreground program observer asks this.-pub(crate) fn enabled() -> bool {- native_settings::load_shared()- .tab_icons- .enabled- .unwrap_or(true)-}-/// Add a card of the user's own, wearing `svg` if one was just imported,/// and return its id -- or `None` when they already have as many as they/// may. The card and its SVG go in one save: a separate save in betweendiff --git a/wezterm-gui/src/termwindow/render/fancy_tab_bar.rs b/wezterm-gui/src/termwindow/render/fancy_tab_bar.rsindex 547716e3..7a5d0ab7 100644--- a/wezterm-gui/src/termwindow/render/fancy_tab_bar.rs+++ b/wezterm-gui/src/termwindow/render/fancy_tab_bar.rs@@ -848,25 +848,16 @@ impl crate::TermWindow {.context("window tab surface")?;let icon_y = row_y + (row_height.saturating_sub(icon_size) / 2);- // With tab icons on, the terminal card's circle, as the pane tabs- // draw it; the tab's status keeps its own place after it either way.- let icon_right = match crate::tab_icons::resolve_window_tab() {- Some(icon) => {- self.paint_tab_circle_icon(layers, &icon, tab_surface_y, button_size, false, None)?- }- None => {- let icon_x = self.ui_px(TAB_CONTENT_INSET);- self.paint_fancy_tab_icon(- layers,- SvgIcon::SquareTerminal,- icon_x,- icon_y,- icon_size,- foreground,- )?;- icon_x + icon_size- }- };+ // The terminal card's circle, as the pane tabs draw it; the tab's+ // status keeps its own place after it.+ let icon_right = self.paint_tab_circle_icon(+ layers,+ &crate::tab_icons::resolve_window_tab(),+ tab_surface_y,+ button_size,+ false,+ None,+ )?;let close_x = self.tab_close_button_x(tab_width, button_size, icon_size);let close_y = row_y + (row_height.saturating_sub(button_size) / 2);diff --git a/wezterm-gui/src/termwindow/render/pane.rs b/wezterm-gui/src/termwindow/render/pane.rsindex e546f8ea..11c83790 100644--- a/wezterm-gui/src/termwindow/render/pane.rs+++ b/wezterm-gui/src/termwindow/render/pane.rs@@ -1610,7 +1610,7 @@ impl crate::TermWindow {.map(|dot| (dot, surface));let icon = pane.as_ref()- .and_then(|pane| crate::tab_icons::resolve(pane.as_ref()));+ .map(|pane| crate::tab_icons::resolve(pane.as_ref()));let Some(icon) = icon else {let x = self.ui_px(TAB_CONTENT_INSET);let y = tab_y + (tab_height.saturating_sub(icon_size)) / 2;diff --git a/wezterm-mux-server-impl/src/web_relay.rs b/wezterm-mux-server-impl/src/web_relay.rsindex 1aaddb54..82ee5966 100644--- a/wezterm-mux-server-impl/src/web_relay.rs+++ b/wezterm-mux-server-impl/src/web_relay.rs@@ -3503,7 +3503,7 @@ mod tests {assert_eq!(custom.svg, "<svg id='mine'/>");assert_eq!(custom.circle, "#112233");let text = serde_json::to_string(&Reply::TabIcons(wire)).unwrap();- assert!(text.starts_with(r#"{"op":"tab-icons","enabled":true,"terminal":"terminal","cards":["#));+ assert!(text.starts_with(r#"{"op":"tab-icons","terminal":"terminal","cards":["#));}#[test]