Skip to content

feat: add a hyde deployment metafile and split the wezterm config - #5

Merged
kRHYME7 merged 1 commit into
HyDE-Project:mainfrom
RAprogramm:wezterm-hyde-dot
Jul 29, 2026
Merged

feat: add a hyde deployment metafile and split the wezterm config#5
kRHYME7 merged 1 commit into
HyDE-Project:mainfrom
RAprogramm:wezterm-hyde-dot

Conversation

@RAprogramm

@RAprogramm RAprogramm commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Follow-up to HyDE-Project/HyDE#1874, where @kRHYME7 suggested hosting the WezTerm config here and letting HyDE consume dots.toml over the branch archive.

dots.toml at the root declares the WezTerm dot. Paths are written without the archive's top-level directory, since the installer strips it when the archive contains a single root.

wezterm/hyde.lua is new: HyDE's defaults behind require("hyde").config(). wezterm/wezterm.lua becomes the three-line entry point that calls it, so an update can replace the defaults without touching what the user edited.

Two fixes carried over from that PR:

  • The scheme is selected only once hyde.toml exists. Naming a missing scheme makes WezTerm log color_scheme="wallbash" but that scheme was not found on every start, which is what a fresh install looks like before the first theme switch.
  • config_builder() is called through a guard, so a build that predates it gets a plain table instead of an error.

The template's target line moves from ${HOME}/.config to ${confDir}, matching the other templates HyDE ships.

Checked against WezTerm 20260117 with wezterm --config-file … show-keys: clean with the palette present and with it absent. dots.toml parses, the rendered template parses as TOML with the scheme name and eight ansi colours in place.

Summary by CodeRabbit

  • New Features

    • Added HyDE deployment support for WezTerm, including automatic theme synchronization and configuration updates.
    • Added a shared default WezTerm configuration with font, appearance, tab, scrolling, and behavior settings.
    • Preserved wezterm.lua as a user-owned entry point.
  • Documentation

    • Updated setup instructions for HyDE installation and manual configuration.
    • Documented theme propagation, automatic reloads, and configuration references.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds HyDE deployment metadata for WezTerm, introduces a managed defaults module, delegates wezterm.lua to it, updates Wallbash theme generation, and documents HyDE and manual installation paths.

Changes

HyDE WezTerm integration

Layer / File(s) Summary
Deployment and theme path
dots.toml, wezterm/wezterm.dcol
Defines sync and preserve deployment rules and targets the generated hyde.toml under the configured WezTerm directory.
Managed defaults and entry point
wezterm/hyde.lua, wezterm/wezterm.lua, wezterm/README.md
Adds replaceable HyDE defaults with theme watching, conditional Wallbash colors, font and UI settings; delegates the user entry point to hyde.config() and documents setup and customization.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant HyDE
  participant Wallbash
  participant WezTerm
  HyDE->>Wallbash: Deploy wezterm.dcol
  Wallbash->>WezTerm: Generate hyde.toml
  WezTerm->>WezTerm: Reload watched configuration
Loading

Possibly related issues

  • HyDE-Project/HyDE#1869 — Covers HyDE-managed WezTerm defaults, preserved user configuration, Wallbash theming, deployment metadata, and automatic reload support.

Poem

I’m a bunny with config to share,
HyDE plants themes with gentle care.
Wallbash paints the terminal bright,
WezTerm reloads its colors right.
User settings stay safe and near—
Hop, hop, a tidy setup here!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: adding a HyDE deployment metafile and splitting WezTerm configuration.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kRHYME7
kRHYME7 merged commit a67cebf into HyDE-Project:main Jul 29, 2026
1 check was pending

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@wezterm/hyde.lua`:
- Line 20: Replace the manually reconstructed config_dir in hyde.lua with
WezTerm’s resolved wezterm.config_dir value, ensuring palette checks and file
watching use the directory containing the active configuration loaded via
--config-file or WEZTERM_CONFIG_FILE.

In `@wezterm/README.md`:
- Around line 48-49: Update the two WezTerm reference links in the README from
the obsolete wezfurlong.org/wezterm/config URLs to their corresponding
wezterm.org/config URLs, preserving the existing link labels and anchors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 80921921-1faa-4d42-bb48-baefddf804ab

📥 Commits

Reviewing files that changed from the base of the PR and between c81e311 and bfdcde2.

📒 Files selected for processing (5)
  • dots.toml
  • wezterm/README.md
  • wezterm/hyde.lua
  • wezterm/wezterm.dcol
  • wezterm/wezterm.lua

Comment thread wezterm/hyde.lua

local M = {}

local config_dir = (os.getenv("XDG_CONFIG_HOME") or (os.getenv("HOME") .. "/.config")) .. "/wezterm"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | rg '(^|/)wezterm/|hyde\.lua$|hyde\.toml$|wezterm' || true

echo "== hyde.lua =="
if [ -f wezterm/hyde.lua ]; then
  cat -n wezterm/hyde.lua
else
  fd -a 'hyde\.lua$' . | while read -r f; do echo "--- $f"; cat -n "$f"; done
fi

echo "== wezterm config files =="
git ls-files wezterm | sort

Repository: HyDE-Project/terminal-emulators

Length of output: 3569


🌐 Web query:

WezTerm Lua config_dir command line --config-file WEZTERM_CONFIG_FILE documentation

💡 Result:

In WezTerm, you can specify a custom configuration file via the command line or environment variable, and access the configuration directory path within your Lua configuration. Command Line and Environment Configuration You can override WezTerm's default configuration file resolution using the following methods: 1. --config-file CLI Argument: You can specify a custom configuration file by using the --config-file flag when launching WezTerm [1][2]. Example: wezterm --config-file /path/to/my-config.lua 2. WEZTERM_CONFIG_FILE Environment Variable: Setting this environment variable will also direct WezTerm to use the specified file as your configuration [1][3]. Note that configuration specified via the --config CLI argument (for individual key/value overrides) will always override the values provided in your configuration file, even if that file is reloaded [1][4]. Accessing the Directory in Lua Within your wezterm.lua configuration file, you can access the path of the directory containing the loaded configuration file using the wezterm.config_dir constant [5]. Example usage: local wezterm = require 'wezterm' wezterm.log_info('The configuration directory is: '.. wezterm.config_dir) This constant is useful for modularizing your configuration, such as requiring other Lua files located in the same directory as your main wezterm.lua [3].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== wezterm.lua outline =="
ast-grep outline wezterm/wezterm.lua --view expanded || true

echo "== wezterm.lua relevant content =="
cat -n wezterm/wezterm.lua

echo "== hyde.lua usages =="
rg -n "config\\(|require\\(\"hyde\"\\)|hyde\\.toml|config_dir" wezterm -S

Repository: HyDE-Project/terminal-emulators

Length of output: 1632


🌐 Web query:

wezterm --config-file config_dir lua "local file"

💡 Result:

To use a specific configuration file with WezTerm, you can use the --config-file command-line argument. This flag overrides the standard configuration file resolution logic [1][2]. Usage syntax: wezterm --config-file /path/to/your/config.lua If you are referring to the wezterm.config_file variable within a Lua configuration script, this variable provides the absolute path to the configuration file that WezTerm is currently using [3]. It is part of the wezterm module and can be accessed as follows: local wezterm = require 'wezterm' print(wezterm.config_file) Similarly, wezterm.config_dir provides the path to the directory containing that configuration file [3]. These are often useful when you need to reference other files (such as themes or helper scripts) relative to your main configuration file.

Citations:


Use WezTerm’s resolved configuration directory.

This reconstruction ignores configurations loaded via --config-file or WEZTERM_CONFIG_FILE, so hyde.lua checks/watches the built-in wezterm/hyde.toml instead of the palette relative to the actual config directory. Use wezterm.config_dir, which points to the directory containing the loaded configuration file.

Proposed fix
-local config_dir = (os.getenv("XDG_CONFIG_HOME") or (os.getenv("HOME") .. "/.config")) .. "/wezterm"
+local config_dir = wezterm.config_dir
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
local config_dir = (os.getenv("XDG_CONFIG_HOME") or (os.getenv("HOME") .. "/.config")) .. "/wezterm"
local config_dir = wezterm.config_dir
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wezterm/hyde.lua` at line 20, Replace the manually reconstructed config_dir
in hyde.lua with WezTerm’s resolved wezterm.config_dir value, ensuring palette
checks and file watching use the directory containing the active configuration
loaded via --config-file or WEZTERM_CONFIG_FILE.

Comment thread wezterm/README.md
Comment on lines +48 to +49
- [WezTerm configuration files](https://wezfurlong.org/wezterm/config/files.html)
- [WezTerm colour schemes](https://wezfurlong.org/wezterm/config/appearance.html#defining-a-color-scheme-in-a-separate-file)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the WezTerm reference links.

Both wezfurlong.org/wezterm/config/... URLs currently return 404; the official pages are now under wezterm.org/config/.... ()

Proposed fix
-- [WezTerm configuration files](https://wezfurlong.org/wezterm/config/files.html)
-- [WezTerm colour schemes](https://wezfurlong.org/wezterm/config/appearance.html#defining-a-color-scheme-in-a-separate-file)
+- [WezTerm configuration files](https://wezterm.org/config/files.html)
+- [WezTerm colour schemes](https://wezterm.org/config/appearance.html#defining-a-color-scheme-in-a-separate-file)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [WezTerm configuration files](https://wezfurlong.org/wezterm/config/files.html)
- [WezTerm colour schemes](https://wezfurlong.org/wezterm/config/appearance.html#defining-a-color-scheme-in-a-separate-file)
- [WezTerm configuration files](https://wezterm.org/config/files.html)
- [WezTerm colour schemes](https://wezterm.org/config/appearance.html#defining-a-color-scheme-in-a-separate-file)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wezterm/README.md` around lines 48 - 49, Update the two WezTerm reference
links in the README from the obsolete wezfurlong.org/wezterm/config URLs to
their corresponding wezterm.org/config URLs, preserving the existing link labels
and anchors.

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.

2 participants