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
window: x11 and wayland follow the preferred appearance
RoversX5786cf919713
diff --git a/window/src/os/wayland/connection.rs b/window/src/os/wayland/connection.rsindex 80b1eb01..d2a3890e 100644--- a/window/src/os/wayland/connection.rs+++ b/window/src/os/wayland/connection.rs@@ -47,7 +47,17 @@ impl WaylandConnection {}pub(crate) fn advise_of_appearance_change(&self, appearance: crate::Appearance) {- for win in self.wayland_state.borrow().windows.borrow().values() {+ // Collected first: `appearance_changed` dispatches an event, and a+ // handler that closes a window would reach back into this same map.+ let windows: Vec<_> = self+ .wayland_state+ .borrow()+ .windows+ .borrow()+ .values()+ .cloned()+ .collect();+ for win in windows {win.borrow_mut().appearance_changed(appearance);}}@@ -177,6 +187,12 @@ impl ConnectionOps for WaylandConnection {}fn get_appearance(&self) -> Appearance {+ // Ahead of everything else: an appearance the application was asked to+ // present is the answer, and skipping the rest spares the main thread+ // a blocking D-Bus round trip on every read.+ if let Some(appearance) = crate::connection::preferred_appearance() {+ return appearance;+ }match promise::spawn::block_on(crate::os::xdg_desktop_portal::get_appearance()) {Ok(Some(appearance)) => return appearance,Ok(None) => {}diff --git a/window/src/os/x11/connection.rs b/window/src/os/x11/connection.rsindex a9a5b535..03601582 100644--- a/window/src/os/x11/connection.rs+++ b/window/src/os/x11/connection.rs@@ -235,6 +235,12 @@ impl ConnectionOps for XConnection {}fn get_appearance(&self) -> Appearance {+ // Ahead of everything else: an appearance the application was asked to+ // present is the answer, and skipping the rest spares the main thread+ // a blocking D-Bus round trip on every read.+ if let Some(appearance) = crate::connection::preferred_appearance() {+ return appearance;+ }match promise::spawn::block_on(crate::os::xdg_desktop_portal::get_appearance()) {Ok(Some(appearance)) => return appearance,Ok(None) => {}@@ -497,7 +503,10 @@ impl XConnection {}pub(crate) fn advise_of_appearance_change(&self, appearance: crate::Appearance) {- for win in self.windows.borrow().values() {+ // Collected first: `appearance_changed` dispatches an event, and a+ // handler that closes a window would reach back into this same map.+ let windows: Vec<_> = self.windows.borrow().values().cloned().collect();+ for win in windows {win.lock().unwrap().appearance_changed(appearance);}}diff --git a/window/src/os/x_and_wayland.rs b/window/src/os/x_and_wayland.rsindex d41b14fd..a8d3b325 100644--- a/window/src/os/x_and_wayland.rs+++ b/window/src/os/x_and_wayland.rs@@ -160,6 +160,12 @@ impl Connection {}pub(crate) fn advise_of_appearance_change(&self, appearance: Appearance) {+ // Resolved here rather than at each caller: the xdg-desktop-portal+ // watcher reports what the *system* changed to, which is not what the+ // windows should be told while the application has been asked to+ // present something else. Both that watcher and `reapply_appearance`+ // arrive through this one method.+ let appearance = crate::connection::preferred_appearance().unwrap_or(appearance);log::trace!("Appearance changed to {appearance:?}");match self {Self::X11(x) => x.advise_of_appearance_change(appearance),@@ -211,6 +217,13 @@ impl ConnectionOps for Connection {}}+ fn reapply_appearance(&self) {+ // Neither backend can recolour a window frame it does not draw, so+ // this exists to tell the windows -- and through them the config+ // reload -- that the appearance they should paint for has changed.+ self.advise_of_appearance_change(self.get_appearance());+ }+fn beep(&self) {match self {Self::X11(x) => x.beep(),