From 4efaee457fe23a0fed8cc8c3c22d7fa19a3515b1 Mon Sep 17 00:00:00 2001 From: Andrew Gaspar Date: Tue, 16 Jun 2026 15:19:19 -0600 Subject: [PATCH] Add Wezterm auto-theming support Wire Wezterm into Omarchy's theming pipeline alongside alacritty, kitty, ghostty, and foot. - config/wezterm/wezterm.lua: base config that loads the current theme's colors via dofile from ~/.config/omarchy/current/theme/wezterm.lua, with the tab bar enabled (retro tab bar so themed colors apply fully) - default/themed/wezterm.lua.tpl: theme template emitting a config.colors table (including a themed tab_bar) from the shared colors.toml tokens, auto-rendered by the existing omarchy-theme-set-templates glob - omarchy-restart-terminal: touch wezterm.lua to trigger Wezterm's config auto-reload (it has no external reload signal like kitty/ghostty) Co-Authored-By: Claude Opus 4.8 (1M context) --- bin/omarchy-restart-terminal | 4 ++++ config/wezterm/wezterm.lua | 22 +++++++++++++++++++ default/themed/wezterm.lua.tpl | 40 ++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 config/wezterm/wezterm.lua create mode 100644 default/themed/wezterm.lua.tpl diff --git a/bin/omarchy-restart-terminal b/bin/omarchy-restart-terminal index d767879d18..81e7f02201 100755 --- a/bin/omarchy-restart-terminal +++ b/bin/omarchy-restart-terminal @@ -13,3 +13,7 @@ fi if pgrep -x ghostty >/dev/null; then killall -SIGUSR2 ghostty fi + +if [[ -f ~/.config/wezterm/wezterm.lua ]]; then + touch ~/.config/wezterm/wezterm.lua +fi diff --git a/config/wezterm/wezterm.lua b/config/wezterm/wezterm.lua new file mode 100644 index 0000000000..c1dc22c0a5 --- /dev/null +++ b/config/wezterm/wezterm.lua @@ -0,0 +1,22 @@ +local wezterm = require 'wezterm' +local config = wezterm.config_builder() + +config.font = wezterm.font('JetBrainsMono Nerd Font') +config.font_size = 9 +config.window_padding = { left = 14, right = 14, top = 14, bottom = 14 } +config.window_decorations = 'NONE' +config.audible_bell = 'Disabled' + +-- Use the retro tab bar so the Omarchy theme's tab_bar colors fully apply +config.enable_tab_bar = true +config.use_fancy_tab_bar = false +config.hide_tab_bar_if_only_one_tab = true + +-- Dynamic Omarchy theme colors (regenerated on every `omarchy theme set`) +local theme = wezterm.home_dir .. '/.config/omarchy/current/theme/wezterm.lua' +local ok, colors = pcall(dofile, theme) +if ok and colors then + config.colors = colors +end + +return config diff --git a/default/themed/wezterm.lua.tpl b/default/themed/wezterm.lua.tpl new file mode 100644 index 0000000000..f0e1c2ee12 --- /dev/null +++ b/default/themed/wezterm.lua.tpl @@ -0,0 +1,40 @@ +return { + foreground = "{{ foreground }}", + background = "{{ background }}", + cursor_bg = "{{ cursor }}", + cursor_border = "{{ cursor }}", + cursor_fg = "{{ background }}", + selection_fg = "{{ selection_foreground }}", + selection_bg = "{{ selection_background }}", + ansi = { + "{{ color0 }}", "{{ color1 }}", "{{ color2 }}", "{{ color3 }}", + "{{ color4 }}", "{{ color5 }}", "{{ color6 }}", "{{ color7 }}", + }, + brights = { + "{{ color8 }}", "{{ color9 }}", "{{ color10 }}", "{{ color11 }}", + "{{ color12 }}", "{{ color13 }}", "{{ color14 }}", "{{ color15 }}", + }, + tab_bar = { + background = "{{ background }}", + active_tab = { + bg_color = "{{ accent }}", + fg_color = "{{ background }}", + }, + inactive_tab = { + bg_color = "{{ background }}", + fg_color = "{{ foreground }}", + }, + inactive_tab_hover = { + bg_color = "{{ color0 }}", + fg_color = "{{ foreground }}", + }, + new_tab = { + bg_color = "{{ background }}", + fg_color = "{{ foreground }}", + }, + new_tab_hover = { + bg_color = "{{ color0 }}", + fg_color = "{{ foreground }}", + }, + }, +}