Skip to content

Add native WezTerm support - #4836

Closed
iltumio wants to merge 6 commits into
omacom:devfrom
iltumio:wezterm-support
Closed

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

Conversation

@iltumio

@iltumio iltumio commented Mar 1, 2026 •

Copy link
Copy Markdown

Summary

  • Adds WezTerm as a natively supported terminal alongside Alacritty, Foot, Ghostty, and Kitty
  • Uses the centralized template theming system (default/themed/wezterm.lua.tpl) — no per-theme configs needed
  • Adds screensaver support with a dedicated config in default/wezterm/screensaver.lua
  • Wires WezTerm into omarchy-install-terminal and ships a migration so existing users get the config

Changes

  • config/wezterm/wezterm.lua — Default config matching Omarchy's terminal style (font, padding, decorations, keybindings). Loads theme colors dynamically via dofile() from the generated theme file, guarded against a nil/empty HOME and dofile errors so a missing or broken theme file never breaks the terminal.
  • default/themed/wezterm.lua.tpl — Theme template with {{ variable }} placeholders, processed by omarchy-theme-set-templates to generate a Lua colors table.
  • default/wezterm/screensaver.lua — Standalone screensaver config (black background, 18pt font, zero padding, hidden cursor).
  • bin/omarchy-install-terminal — Added wezterm as an allowed terminal (org.wezfurlong.wezterm.desktop), updated usage/help text and arg hints.
  • bin/omarchy-launch-screensaver — Added *wezterm* case using wezterm --config-file ... start --class org.omarchy.screensaver.
  • bin/omarchy-restart-terminal — Added wezterm config touch to trigger its built-in auto-reload on theme change.
  • migrations/1775804891.sh — Copies config/wezterm/wezterm.lua into ~/.config/wezterm/ for existing users if not already present.

Generated by OpenClaw via Opengate.sh

Copilot AI balanced review requested due to automatic review settings March 1, 2026 12:01

Copilot AI left a comment

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.

Pull request overview

Adds first-class WezTerm support to Omarchy’s terminal theming + screensaver launch flow, aligning WezTerm styling and behavior with existing Alacritty/Ghostty/Kitty defaults.

Changes:

  • Introduces a WezTerm default config that loads Omarchy’s current theme colors dynamically.
  • Adds a centralized WezTerm theme template (default/themed/wezterm.lua.tpl) to generate ~/.config/omarchy/current/theme/wezterm.lua.
  • Adds a dedicated WezTerm screensaver config and wires WezTerm into the screensaver launcher + terminal restart hook.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
default/wezterm/screensaver.lua Adds a minimal, black, “no chrome” WezTerm screensaver configuration.
default/themed/wezterm.lua.tpl Adds a template to generate WezTerm-compatible color tables from theme variables.
config/wezterm/wezterm.lua Adds the default WezTerm config with dynamic theme loading and Omarchy clipboard bindings.
bin/omarchy-restart-terminal Touches WezTerm config to trigger WezTerm auto-reload on theme changes.
bin/omarchy-launch-screensaver Adds a WezTerm branch to launch the screensaver using the new config file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread config/wezterm/wezterm.lua Resolved
Copilot AI review requested due to automatic review settings March 25, 2026 08:21

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iltumio

iltumio commented Apr 10, 2026

Copy link
Copy Markdown
Author

meanwhile I created this script https://gist.github.com/iltumio/50da77cfc37fc83b50e992b308c7d6f7

Copilot AI review requested due to automatic review settings May 5, 2026 08:29
@iltumio
iltumio force-pushed the wezterm-support branch from f9528a0 to 3ae4e3c Compare May 5, 2026 08:29

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 4 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iltumio
iltumio force-pushed the wezterm-support branch from 3ae4e3c to 1465400 Compare May 12, 2026 09:57
Copilot AI review requested due to automatic review settings June 5, 2026 09:22

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 4 out of 9 changed files in this pull request and generated 2 comments.

Comment thread migrations/1775804891.sh Resolved
Comment thread config/wezterm/wezterm.lua Resolved
@iltumio
iltumio force-pushed the wezterm-support branch from d41e0c6 to e8138d3 Compare June 5, 2026 09:24
Copilot AI review requested due to automatic review settings June 11, 2026 16:03

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 4 out of 10 changed files in this pull request and generated 2 comments.

Comment thread migrations/1775804891.sh Resolved
Comment thread config/wezterm/wezterm.lua Resolved
@farangkao

Copy link
Copy Markdown

@iltumio : i love wezterm, i'm wondering, your addition to Omarchy, does rely on already installed Wezterm, as far i could see.
The Problem is that currently wezterm seems not to have an official arch package.
There is the nightly build (which i use) and the git way.
But those options would be a bit flaky for the standard user.
There is the flatpak way, but for a terminal, i think the prefered way is a native installation-

Or do you know of any other more official way for the installation of wezterm?

Copilot AI review requested due to automatic review settings August 12, 2026 17:23

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 4 out of 10 changed files in this pull request and generated no new comments.

Suppressed comments (1)

migrations/1775804891.sh:7

  • Existing users' current theme is an already-generated snapshot, so adding the template does not create ~/.config/omarchy/current/theme/wezterm.lua during upgrade. This migration installs a config that silently falls back to WezTerm defaults until the user manually changes themes. Reapply the recorded current theme here (without changing the background) so WezTerm is themed immediately.
if [[ ! -f ~/.config/wezterm/wezterm.lua ]]; then
  mkdir -p ~/.config/wezterm
  cp "$OMARCHY_PATH/config/wezterm/wezterm.lua" ~/.config/wezterm/wezterm.lua

Copilot AI review requested due to automatic review settings August 12, 2026 17:30
@iltumio

iltumio commented Aug 12, 2026

Copy link
Copy Markdown
Author

Review follow-up pushed in 0f63ba25: added start --always-new-process so each monitor receives an independent WezTerm GUI process, and replaced direct notify-send use with omarchy-notification-send. The existing single-call pcall(dofile, ...) fix remains in place. All remaining review threads were replied to and resolved; the migration shebang requests conflict with the Omarchy sourced-migration convention, and theme-load logging is intentionally out of scope because missing theme files are a valid bootstrap state. Validation: git diff --check, Bash/Lua syntax, WezTerm CLI parsing, and test/omarchy-cli-test.sh all pass.

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 4 out of 10 changed files in this pull request and generated no new comments.

Suppressed comments (1)

migrations/1775804891.sh:7

  • The migration copies a config that loads current/theme/wezterm.lua, but it never regenerates the already-active theme, so existing users will fall back to WezTerm's default colors until they manually switch or refresh themes. Refresh the theme after installing the config; the tmux template migration uses the same pattern in migrations/1770638893.sh:8.
if [[ ! -f ~/.config/wezterm/wezterm.lua ]]; then
  mkdir -p ~/.config/wezterm
  cp "$OMARCHY_PATH/config/wezterm/wezterm.lua" ~/.config/wezterm/wezterm.lua
fi

Add wezterm as a supported terminal with config, screensaver, theme
template, and restart integration matching the existing pattern for
Alacritty, Ghostty, and Kitty.
iltumio and others added 5 commits August 17, 2026 17:07
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The screensaver failed to appear (or vanished within ~1s) on multi-monitor
setups using wezterm:

- Launcher: `wezterm start` is a mux client; firing one per monitor in quick
  succession races inside the running wezterm-gui server and often spawns zero
  windows. Use `wezterm-gui` instead, which spawns the GUI directly and is
  reliable across monitors.

- omarchy-screensaver: the focus-based dismiss (upstream facae82) runs a global
  pkill, so during the launcher's per-monitor focus shuffle a not-yet-focused
  instance tears down every instance. Ignore focus loss for a short startup grace
  window; once all instances are up the focus check is stable and still dismisses
  on real activity / when hyprlock takes over. This part fixes a general
  multi-monitor issue independent of wezterm.

Also simplify wezterm theme-color loading to a single pcall(dofile).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 17, 2026 15:08

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 4 out of 10 changed files in this pull request and generated no new comments.

Suppressed comments (1)

migrations/1775804891.sh:7

  • This migration uses bash-specific syntax ([[ ... ]]) but doesn’t declare an interpreter. If this script is executed directly (or invoked by a runner that uses /bin/sh), it can fail. Add a bash shebang at the top (and optionally strict mode like set -euo pipefail) to ensure consistent execution.
echo "Add WezTerm terminal support"

# Copy WezTerm config to user's ~/.config if not already present
if [[ ! -f ~/.config/wezterm/wezterm.lua ]]; then
  mkdir -p ~/.config/wezterm
  cp "$OMARCHY_PATH/config/wezterm/wezterm.lua" ~/.config/wezterm/wezterm.lua
fi

@iltumio

iltumio commented Sep 21, 2026

Copy link
Copy Markdown
Author

replaced by #12808 due to the migration to omarchy quattro

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants