From 96f1585b103162b042e2593567884dfcbe32ca21 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 5 Apr 2023 07:29:28 -0700 Subject: [PATCH] wezterm cli list: add is_active and is_zoomed fields to json output is_active is true if the pane is considered to be the active pane within its containing tab. If you want to reason about the focused pane regardless of tab, `wezterm cli list-clients` has that pane_id. refs: https://github.com/wez/wezterm/issues/3413 --- wezterm/src/cli/list.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wezterm/src/cli/list.rs b/wezterm/src/cli/list.rs index e393a0c29..b7f422d1a 100644 --- a/wezterm/src/cli/list.rs +++ b/wezterm/src/cli/list.rs @@ -136,6 +136,8 @@ struct CliListResultItem { top_row: usize, tab_title: String, window_title: String, + is_active: bool, + is_zoomed: bool, } impl CliListResultItem { @@ -151,6 +153,8 @@ impl CliListResultItem { physical_top, left_col, top_row, + is_active_pane, + is_zoomed_pane, size: TerminalSize { rows, @@ -188,6 +192,8 @@ impl CliListResultItem { top_row, tab_title: tab_title.to_string(), window_title: window_title.to_string(), + is_active: is_active_pane, + is_zoomed: is_zoomed_pane, } } }