From 42a46b7b435456923cd2a466051098d661f690c7 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Tue, 10 Feb 2026 23:13:28 +0800 Subject: [PATCH] examples: Start WezTerm maximized so that the installer won't be resized. --- modules/rosenthal/examples/niri.kdl | 7 +++---- modules/rosenthal/examples/wezterm.lua | 12 ++++++++++++ modules/rosenthal/services/desktop.scm | 2 ++ 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 modules/rosenthal/examples/wezterm.lua diff --git a/modules/rosenthal/examples/niri.kdl b/modules/rosenthal/examples/niri.kdl index 4750395..30cd2c0 100644 --- a/modules/rosenthal/examples/niri.kdl +++ b/modules/rosenthal/examples/niri.kdl @@ -639,14 +639,13 @@ debug { honor-xdg-activation-with-invalid-serial } -// Needed for Emacs in the installer. +// Emacs has a window height > 100% whening using CSD. prefer-no-csd -// Needed for WezTerm in the installer. +// Keep WezTerm maximized so that the installer won't be resized. window-rule { match app-id="org.wezfurlong.wezterm" - default-column-width { proportion 0.5; } - default-window-height { proportion 1.0; } + open-maximized true } // Background color to match the wallpaper. diff --git a/modules/rosenthal/examples/wezterm.lua b/modules/rosenthal/examples/wezterm.lua new file mode 100644 index 0000000..e66cb05 --- /dev/null +++ b/modules/rosenthal/examples/wezterm.lua @@ -0,0 +1,12 @@ +-- Keep WezTerm maximized so that the installer won't be resized. +-- https://wezterm.org/config/lua/gui-events/gui-startup.html +local wezterm = require 'wezterm' +local mux = wezterm.mux +local config = {} + +wezterm.on('gui-startup', function(cmd) + local tab, pane, window = mux.spawn_window(cmd or {}) + window:gui_window():maximize() +end) + +return config diff --git a/modules/rosenthal/services/desktop.scm b/modules/rosenthal/services/desktop.scm index ce63d2b..fbfcefb 100644 --- a/modules/rosenthal/services/desktop.scm +++ b/modules/rosenthal/services/desktop.scm @@ -679,6 +679,8 @@ set-keymap us dvorak -o ctrl:nocaps\n") ,(local-file "../examples/noctalia-shell/shell-state.json")) (".config/noctalia/settings.json" ,(local-file "../examples/noctalia-shell/settings.json")) + (".config/wezterm/wezterm.lua" + ,(local-file "../examples/wezterm.lua")) (".config/xfce4/helpers.rc" ,(plain-file "helpers.rc" "TerminalEmulator=open-wezterm-here\n"))