Skip to content

Add native wezterm support - #12808

Open
iltumio wants to merge 6 commits into
omacom:quattrofrom
iltumio:wezterm-support-quattro
Open

iltumio wants to merge 6 commits into
omacom:quattrofrom
iltumio:wezterm-support-quattro

Conversation

@iltumio

@iltumio iltumio commented Sep 21, 2026 •

Copy link
Copy Markdown

Add WezTerm as a supported terminal in Omarchy Quattro. Users can install it and select it as the default through the CLI or menu, with Omarchy theme colors, font changes, and screensaver support.

  • Add the default WezTerm configuration, theme template, and desktop entry with X-TerminalArg* keys for xdg-terminal-exec.
  • Reload WezTerm colors when the theme changes and update its configured font through omarchy-font-set.
  • Launch a separate WezTerm screensaver process per monitor and defer dismissal on focus loss until a screensaver has held focus, with a launch timeout.
  • Add a migration for existing WezTerm installations that supplies missing configuration and desktop entry files without replacing existing ones.

Supersedes #4836 for Omarchy Quattro.

Validation:

  • ./test/cli
  • bash test/shell.d/default-apps-test.sh
  • bash test/shell.d/menu-test.sh
  • git diff --check upstream/quattro...HEAD

All checks passed after rebasing onto quattro. Graphical screensaver behavior has not been reverified after the rebase.

@iltumio iltumio changed the title Wezterm support quattro Add native wezterm support Sep 21, 2026
@llstrk

llstrk commented Sep 23, 2026

Copy link
Copy Markdown

Source review found one clipboard integration issue in the newly supported default WezTerm launch.

Ordinary WezTerm windows miss the terminal clipboard shortcuts

The normal Super+Return launcher does not override the app ID, so WezTerm uses org.wezfurlong.wezterm. The existing terminal-tag rule matches wezterm, not that full class. Without the terminal tag, universal clipboard routing takes the non-terminal branch:

Shortcut Intended terminal chord Untagged WezTerm chord
Super+C Ctrl+Insert, copy Ctrl+C
Super+V Shift+Insert, paste Ctrl+V

This is a source-derived routing comparison, not an observed GUI test. The PR already binds the two Insert chords to WezTerm copy/paste, but ordinary default-class windows do not reach them. Explicitly classed org.omarchy.* windows are outside this finding.

Impact: Super+C can interrupt a foreground command instead of copying, and Super+V does not invoke the configured paste action.

Suggested change: Add org\\.wezfurlong\\.wezterm to the Lua regex in default/hypr/apps/terminals.lua, retaining wezterm if needed for other variants. The stale rule predates this PR, but the new supported default-terminal path exposes the mismatch.


Review information

Test scope: Source inspection at c77e26d7e055b5141be88248922a1a77cc171351, with upstream WezTerm/Hyprland source corroboration. No runtime tests, clipboard interaction, migration, theme/font reload, or multi-monitor screensaver validation was performed; installed package versions were not verified.

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Automated AI review: Astra Medium initial inspection, independent Opus 5.5 High and GPT 6 Sol Xhigh technical reviews, then Astra Medium synthesis and source-based verification of the retained finding.

@omarchybot omarchybot added enhancement New feature or request and removed enhancement New feature or request labels Sep 27, 2026
@jandrusk

jandrusk commented Oct 8, 2026

Copy link
Copy Markdown

Two things to fix before this can land:

Migration filename collision (blocking). migrations/1786961462.sh is also added by three other open PRs: #7258, #7363 and #7501. Migrations are tracked by filename, so whichever lands second gets skipped on machines that already ran the first. Regenerating the timestamp fixes it:

git mv migrations/1786961462.sh "migrations/$(date +%s).sh"

Terminal tag for the default class. As @llstrk noted, a plain Super+Return WezTerm window has class org.wezfurlong.wezterm, and the terminals.lua regex on quattro still only matches wezterm. So Super+C/V take the non-terminal branch. #13234 and #10841 both make that one-line fix. It'd be good to include it here (or depend on one of them), since this PR is what makes WezTerm a supported default.

Also related: #13841 adds WezTerm screensaver support separately, so it overlaps your omarchy-launch-screensaver/omarchy-screensaver changes.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 3/5

[Medium impact] The changes affect Omarchy users who install or use WezTerm.

Fix the failing menu and theme checks, and satisfy the migration-test rule before merging.

Findings

  1. P1 English menu entries are missing ▶
  2. P1 Theme template check fails ▶
  3. P2 Font changes break config links ▶
  4. P2 Migration suite violates test rules ▶

Summary

Adds WezTerm installation and default-terminal choices, desktop launch support, theme colors, font updates, and a migration for existing installations.

  • People can install WezTerm and choose it as their default terminal.
  • WezTerm follows Omarchy's colors when users switch themes.
  • WezTerm uses the font selected through Omarchy.
  • Existing WezTerm installs receive missing Omarchy setup files.

Reviews (4) · Last reviewed commit: "fix: escape WezTerm font names when upda..." · Reviewed by Greptile

Comment thread bin/omarchy-screensaver Resolved
Comment thread migrations/1791536351.sh Resolved
Comment thread bin/omarchy-font-set Resolved
@iltumio

iltumio commented Oct 9, 2026

Copy link
Copy Markdown
Author

Addressed the three Greptile findings:

  • Fixed in ec16821: keep focus-loss protection active for the launcher's full lifetime, including the final monitor restore.
  • Fixed in 89219e5: supply a missing wezterm.lua even when its directory exists, preserving existing user files.
  • Fixed in 847c37e: escape font names for Lua and sed, and handle previously escaped names on later updates.

Validation: focused screensaver, migration, and font regression tests; existing Kitty font-control tests (native Kitty parser skipped because Kitty is not installed); CLI suite; Bash syntax and diff checks. Also verified two fullscreen WezTerm screensaver windows and effects on the running two-monitor session.

@ekrako

ekrako commented Nov 14, 2026

Copy link
Copy Markdown

Opened a repaired follow-up at #18939: #18939.

It carries this PR's WezTerm support and existing fixes forward onto current quattro, resolves the conflicts, and preserves @iltumio's commit attribution. It also fixes missing-config handling during installation, preserves alternate user configuration locations and custom desktop entries, propagates package installation failures, and updates the English menu catalog and theme/test integration. The terminal-based screensaver commits are omitted because quattro now uses the native Wayland screensaver.

The new PR includes inspected runtime screenshots and validation details. Focused checks pass; it also documents the unrelated broad-suite failures and the graphical acceptance checks that remain unverified. We could not update this branch because the authenticated account lacks push permission, so this PR itself has not been changed or closed.

iltumio and others added 6 commits November 15, 2026 09:40
Ships the default config, the themed color template, and a desktop entry
carrying the X-TerminalArg* keys the packaged one lacks, so xdg-terminal-exec
can pass WezTerm a command, an app id, and a directory.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@iltumio
iltumio force-pushed the wezterm-support-quattro branch from fe4e167 to a08e1e7 Compare November 15, 2026 08:42
"setup.default.terminal.foot": {"icon":"","label":"Foot","checked":"[[ \"$(omarchy-default-terminal)\" == \"foot\" ]]","action":"omarchy-default-terminal foot"},
"setup.default.terminal.ghostty": {"icon":"","label":"Ghostty","checked":"[[ \"$(omarchy-default-terminal)\" == \"ghostty\" ]]","action":"omarchy-default-terminal ghostty"},
"setup.default.terminal.kitty": {"icon":"","label":"Kitty","checked":"[[ \"$(omarchy-default-terminal)\" == \"kitty\" ]]","action":"omarchy-default-terminal kitty"},
"setup.default.terminal.wezterm": {"icon":"","label":"WezTerm","checked":"[[ \"$(omarchy-default-terminal)\" == \"wezterm\" ]]","action":"omarchy-default-terminal wezterm"},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 English menu entries are missing

The two new WezTerm rows have no matching entries in default/i18n/en/menu.json. i18n-test.sh requires every menu row to appear there, so these additions fail the English catalog check. Add entries for both setup.default.terminal.wezterm and install.terminal.wezterm; translations can follow separately.

@@ -0,0 +1,31 @@
return {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Theme template check fails

The new wezterm.lua.tpl is absent from both lists in theme-staging-test.sh, so its check of every template fails. The theming guide also requires new terminal templates to be added to INSTALLED_THEME_DENIED. Classify wezterm.lua in the test and update the required list. The existing *.lua guard already blocks downloaded Lua files, so this is not a new code-execution hole.

File Used: docs/theming.md (source)

Comment thread bin/omarchy-font-set
# Escape the Lua string first, then the sed replacement. Match escaped quotes
# too, so another font change can replace a previously escaped name in full.
wezterm_font_name=$(printf '%s' "$font_name" | sed 's/[\\"]/\\&/g; s/[\\&/]/\\&/g')
sed -i -E "s/wezterm\\.font\\(\"([^\"\\\\]|\\\\.)*\"/wezterm.font(\"$wezterm_font_name\"/g" ~/.config/wezterm/wezterm.lua

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Font changes break config links

If wezterm.lua is a symlink into a dotfiles directory, changing the font replaces that link with a regular file because this uses plain sed -i. The target keeps the old font, and later edits to it no longer reach the active config. Use --follow-symlinks, as the Kitty branch does.

Suggested change
sed -i -E "s/wezterm\\.font\\(\"([^\"\\\\]|\\\\.)*\"/wezterm.font(\"$wezterm_font_name\"/g" ~/.config/wezterm/wezterm.lua
sed --follow-symlinks -i -E "s/wezterm\\.font\\(\"([^\"\\\\]|\\\\.)*\"/wezterm.font(\"$wezterm_font_name\"/g" ~/.config/wezterm/wezterm.lua

Comment on lines +19 to +22
run_migration() {
env HOME="$test_home" OMARCHY_PATH="$ROOT" PATH="$mock_bin:$PATH" \
bash -euo pipefail "$ROOT/migrations/1791536351.sh" >/dev/null
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Migration suite violates test rules

This adds a dedicated migration test, contrary to the explicit AGENTS.md rule: “No test for a migration.” Remove this suite before merging and check the migration against a temporary home while developing it. If its logic needs lasting test coverage, move that logic into a bin/ command and test that command.

File Used: AGENTS.md (source)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants