mux: disable the lag indicator by default

I'd like to push that into the status bar, so nudge people towards
that in the docs for this.

There is a config option to restore it. I'd like to ultimately
remove that though.

refs: https://github.com/wez/wezterm/discussions/2542
This commit is contained in:
Wez Furlong committed 2022-09-22 06:46:56 -07:00
1 parent 07675d5d57
commit a0afe9c5ae
8 files changed
+67 -2

No files matched your search

+7
View File
@@ -71,6 +71,13 @@ pub struct SshDomain {
#[dynamic(default = "default_local_echo_threshold_ms")]
pub local_echo_threshold_ms: Option<u64>,
/// Show time since last response when waiting for a response.
/// It is recommended to use
/// <https://wezfurlong.org/wezterm/config/lua/pane/get_metadata.html#since_last_response_ms>
/// instead.
#[dynamic(default)]
pub overlay_lag_indicator: bool,
/// The path to the wezterm binary on the remote host
pub remote_wezterm_path: Option<String>,
+7
View File
@@ -85,6 +85,13 @@ pub struct TlsDomainClient {
/// The path to the wezterm binary on the remote host
pub remote_wezterm_path: Option<String>,
/// Show time since last response when waiting for a response.
/// It is recommended to use
/// <https://wezfurlong.org/wezterm/config/lua/pane/get_metadata.html#since_last_response_ms>
/// instead.
#[dynamic(default)]
pub overlay_lag_indicator: bool,
}
impl TlsDomainClient {
+8
View File
@@ -53,6 +53,13 @@ pub struct UnixDomain {
/// Don't use default_local_echo_threshold_ms() here to
/// disable the predictive echo for Unix domains by default.
pub local_echo_threshold_ms: Option<u64>,
/// Show time since last response when waiting for a response.
/// It is recommended to use
/// <https://wezfurlong.org/wezterm/config/lua/pane/get_metadata.html#since_last_response_ms>
/// instead.
#[dynamic(default)]
pub overlay_lag_indicator: bool,
}
impl Default for UnixDomain {
@@ -68,6 +75,7 @@ impl Default for UnixDomain {
write_timeout: default_write_timeout(),
local_echo_threshold_ms: None,
proxy_command: None,
overlay_lag_indicator: false,
}
}
}
+6
View File
@@ -69,6 +69,12 @@ As features stabilize some brief notes about them will accumulate here.
zoomed, only that pane would be returned by those methods.
* macOS: CTRL-modified keys are now routed to the IME
[#2435](https://github.com/wez/wezterm/pull/2435)
* multiplexer: The lag indicator that gets overlaid on the pane content
when waiting a long time for a response now defaults to disabled. It is
recommended that you [put it into your status
bar](config/lua/pane/get_metadata.md), but you may re-enable the old way
using `overlay_lag_indicator = true` in the appropriate domain
configuration.
#### Updated
* Bundled Nerd Font Symbols font to v2.2.2
+10
View File
@@ -130,3 +130,13 @@ return {
},
}
```
*Since: nightly builds only*
The lag indicator now defaults to disabled. It is recommended to display
the lag information in your status bar using [this
example](pane/get_metadata.md).
If you prefer to have the information overlaid on the content area, then
you can set `overlay_lag_indicator = true`, but note that I'd like to
remove that functionality in the future.
+10
View File
@@ -91,3 +91,13 @@ return {
},
}
```
*Since: nightly builds only*
The lag indicator now defaults to disabled. It is recommended to display
the lag information in your status bar using [this
example](pane/get_metadata.md).
If you prefer to have the information overlaid on the content area, then
you can set `overlay_lag_indicator = true`, but note that I'd like to
remove that functionality in the future.
+18 -1
View File
@@ -24,6 +24,7 @@ pub struct ClientInner {
pub local_domain_id: DomainId,
pub remote_domain_id: DomainId,
pub local_echo_threshold_ms: Option<u64>,
pub overlay_lag_indicator: bool,
remote_to_local_window: Mutex<HashMap<WindowId, WindowId>>,
remote_to_local_tab: Mutex<HashMap<TabId, TabId>>,
remote_to_local_pane: Mutex<HashMap<PaneId, PaneId>>,
@@ -139,6 +140,14 @@ impl ClientDomainConfig {
}
}
pub fn overlay_lag_indicator(&self) -> bool {
match self {
ClientDomainConfig::Unix(unix) => unix.overlay_lag_indicator,
ClientDomainConfig::Tls(tls) => tls.overlay_lag_indicator,
ClientDomainConfig::Ssh(ssh) => ssh.overlay_lag_indicator,
}
}
pub fn label(&self) -> String {
match self {
ClientDomainConfig::Unix(unix) => format!("unix mux {}", unix.socket_path().display()),
@@ -167,6 +176,7 @@ impl ClientInner {
local_domain_id: DomainId,
client: Client,
local_echo_threshold_ms: Option<u64>,
overlay_lag_indicator: bool,
) -> Self {
// Assumption: that the domain id on the other end is
// always the first created default domain. In the future
@@ -178,6 +188,7 @@ impl ClientInner {
local_domain_id,
remote_domain_id,
local_echo_threshold_ms,
overlay_lag_indicator,
remote_to_local_window: Mutex::new(HashMap::new()),
remote_to_local_tab: Mutex::new(HashMap::new()),
remote_to_local_pane: Mutex::new(HashMap::new()),
@@ -457,8 +468,14 @@ impl ClientDomain {
.downcast_ref::<Self>()
.ok_or_else(|| anyhow!("domain {} is not a ClientDomain", domain_id))?;
let threshold = domain.config.local_echo_threshold_ms();
let overlay_lag_indicator = domain.config.overlay_lag_indicator();
let inner = Arc::new(ClientInner::new(domain_id, client, threshold));
let inner = Arc::new(ClientInner::new(
domain_id,
client,
threshold,
overlay_lag_indicator,
));
*domain.inner.borrow_mut() = Some(Arc::clone(&inner));
Self::process_pane_list(inner, panes, primary_window_id)?;
+1 -1
View File
@@ -753,7 +753,7 @@ impl RenderableState {
}
};
if idx == inner.dimensions.physical_top {
if inner.client.overlay_lag_indicator && idx == inner.dimensions.physical_top {
if inner.is_tardy() {
let status = format!(
"wezterm: {:.0?}⏳since last response",