Skip to content

Keep terminal font size on this machine, not in the shared config - #11487

Open
seanpk wants to merge 11 commits into
omacom:quattrofrom
seanpk:feat/machine-local-overlays
Open

seanpk wants to merge 11 commits into
omacom:quattrofrom
seanpk:feat/machine-local-overlays

Conversation

@seanpk

@seanpk seanpk commented Sep 12, 2026

Copy link
Copy Markdown

Grok (xAI), writing with Sean.

Two machines sharing a desktop config fight over terminal font size. Changing size on a laptop rewrites Ghostty, Kitty, Foot, and Alacritty files that then show up as Incoming on the desktop. omarchy font set also forces Foot back to size 9, so a laptop that wants 11 cannot keep it.

How

Family stays in the shared terminal configs. Size moves to per-machine overlay files that omarchy font size and omarchy display text size write. Kitty's user template stays a single active theme include; size goes in local.conf and is globincluded at runtime so it does not fight the system default in /etc/xdg/kitty/kitty.conf. omarchy font set updates Foot's family without clobbering this machine's overlay size.

A migration copies any in-file size onto the overlays and strips it from the shared files. Optional hypr/input.local.lua is loaded when present so touchpad (and similar) overrides can stay off the shared input.lua the same way.

Where

  • bin/omarchy-font-size, bin/omarchy-font-set, bin/omarchy-display-text-size
  • config/{ghostty,kitty,foot,alacritty}/ and config/hypr/hyprland.lua
  • migrations/1789224260.sh
  • test/shell.d/font-size-test.sh, test/shell.d/kitty-config-test.sh

Test plan

  • bash test/shell.d/font-size-test.sh
  • bash test/shell.d/kitty-config-test.sh
  • omarchy font size 11 on one machine does not change the shared Ghostty/Kitty/Foot/Alacritty files beyond the include line
  • omarchy display text size 16 still scales shell + GTK, and writes terminal size to the overlays
  • omarchy font set "JetBrainsMono Nerd Font" leaves an existing Foot overlay size alone

@llstrk

llstrk commented Oct 1, 2026

Copy link
Copy Markdown

Automated AI review

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

Outcome: The migration breaks Foot on existing installs, and Kitty never loads its overlay.

Foot include lands in [text-bindings]

On existing installs include= is appended under [text-bindings]; Foot reads it only in [main]. Impact: after migrating, foot -C exits 230 and Foot, the default terminal, drops to 8 pt.

Suggested change: Write [main] before a ~/.config/foot/local.ini include.

Reproducer (fails at 5c0251e)

Reproducer: Migration appends Foot's include= inside [text-bindings]

The heredoc is config/foot/foot.ini as shipped before this PR (unchanged on quattro), which is what existing installs have. The final foot -C step runs only when Foot is installed; the awk check fails first.

Save as test/shell.d/font-size-foot-migration-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-foot-migration-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config/foot" "$home/.local/state/omarchy/current/theme" "$tmpdir/bin"
: >"$home/.local/state/omarchy/current/theme/foot.ini"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
printf '#!/bin/bash\necho "JetBrainsMono Nerd Font"\n' >"$tmpdir/bin/omarchy-font-current"
chmod +x "$tmpdir/bin/"*

# config/foot/foot.ini as shipped before this PR (what existing installs have).
cat >"$home/.config/foot/foot.ini" <<'INI'
[main]
include=~/.local/state/omarchy/current/theme/foot.ini
term=xterm-256color
font=JetBrainsMono Nerd Font:size=9
pad=14x14
initial-window-mode=windowed
workers=0

[scrollback]
lines=10000
multiplier=7.0

[cursor]
style=block
blink=no

[key-bindings]
clipboard-copy=Control+Insert Control+Shift+c XF86Copy
primary-paste=none
clipboard-paste=Shift+Insert Control+Shift+v XF86Paste

[text-bindings]
# Send Shift+Return as CSI-u so TUIs can distinguish it from Return.
\x1b[13;2u=Shift+Return
# Send Alt+Shift+Return as CSI-u so tmux can match M-S-Enter.
\x1b[13;4u=Mod1+Shift+Return
INI

HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" \
  bash -euo pipefail "$ROOT/migrations/1789224260.sh" >/dev/null

section=$(awk '/^\[/ { s = $0 } /^include=.*foot\/local\.ini/ { print s }' "$home/.config/foot/foot.ini")
[[ $section == "[main]" ]] ||
  fail "migration adds the Foot overlay include to [main]" "include landed in section: $section"

if command -v foot >/dev/null; then
  HOME="$home" XDG_CONFIG_HOME="$home/.config" foot -C ||
    fail "migrated Foot config passes foot --check-config"
fi
pass "migrated Foot config includes the overlay from [main]"

Actual output at the PR head (exit 1):

include landed in section: [text-bindings]
not ok - migration adds the Foot overlay include to [main]

Positive control: the same test passes (exit 0) against a diagnostic copy of the head with this change to bin/omarchy-font-size (not part of the PR):

@@ -67,14 +67,14 @@
 
   mkdir -p "$(dirname "$kitty_shared")"
   if [[ ! -f $kitty_shared ]]; then
-    printf 'globinclude ~/.config/kitty/local.conf\n' >"$kitty_shared"
+    printf 'globinclude local.conf\n' >"$kitty_shared"
   elif ! grep -qE '^[[:space:]]*globinclude[[:space:]]+.*kitty/local\.conf' "$kitty_shared" &&
     ! grep -qE '^[[:space:]]*include[[:space:]]+.*kitty/local\.conf' "$kitty_shared"; then
-    printf '\nglobinclude ~/.config/kitty/local.conf\n' >>"$kitty_shared"
+    printf '\nglobinclude local.conf\n' >>"$kitty_shared"
   fi
 
   if [[ -f $foot_shared ]] && ! grep -Fq 'foot/local.ini' "$foot_shared"; then
-    printf '\ninclude=%s\n' "${XDG_CONFIG_HOME:-$HOME/.config}/foot/local.ini" >>"$foot_shared"
+    sed -i "/^font=/a include=${XDG_CONFIG_HOME:-$HOME/.config}/foot/local.ini" "$foot_shared"
   fi
 
   if [[ -f $alacritty_shared ]] && ! grep -Fq 'alacritty/local.toml' "$alacritty_shared"; then
ok - migrated Foot config includes the overlay from [main]

Alternative fix, also checked: appending a fresh [main] header before the line (printf '\n[main]\ninclude=%s\n' ...) to the stock pre-PR foot.ini, with the size already stripped. foot -d info -C exit 0 (sandbox HOME /tmp/h):

info: main.c:451: version: 1.28.0 (Sep 03 2026, branch 'makepkg') +pgo +ime +graphemes +toplevel-tag +blur -assertions
info: main.c:458: arch: Linux x86_64/64-bit
info: main.c:475: locale: C.UTF-8
info: config.c:3730: loading configuration from /tmp/h/.config/foot/foot.ini
info: config.c:944: imported sub-configuration from /tmp/h/.local/state/omarchy/current/theme/foot.ini
info: config.c:944: imported sub-configuration from /tmp/h/.config/foot/local.ini

Foot's own parser on the stock pre-PR foot.ini after running the migration (migration exit 0; then foot -d info -C, Foot 1.28.0, sandbox HOME /tmp/h), exit 230:

info: main.c:451: version: 1.28.0 (Sep 03 2026, branch 'makepkg') +pgo +ime +graphemes +toplevel-tag +blur -assertions
info: main.c:458: arch: Linux x86_64/64-bit
info: main.c:475: locale: C.UTF-8
info: config.c:3730: loading configuration from /tmp/h/.config/foot/foot.ini
info: config.c:944: imported sub-configuration from /tmp/h/.local/state/omarchy/current/theme/foot.ini
 err: config.c:2044: /tmp/h/.config/foot/foot.ini:28: [text-bindings].include: /tmp/h/.config/foot/local.ini: not a valid XKB key name: /tmp/h/.config/foot/local.ini

The migration has also stripped :size=9 from the shared font= line, so with the overlay not loaded Foot falls back to its built-in 8 pt (config_font_parse in Foot's config.c sets pt_size = 8.0 when the pattern has no size).

Kitty rejects the globinclude path

Kitty expands ~ and pathlib glob rejects the absolute pattern. Impact: Kitty shows a config error and ignores omarchy font size.

Suggested change: Use globinclude local.conf, also in the duplicate check.

Reproducer (fails at 5c0251e)

Reproducer: Kitty never loads kitty/local.conf

Requires Kitty (the test skips without it, like the existing native check in kitty-config-test.sh). Run here with the Kitty 0.49.2 x86_64 release bundle (Python 3.14); the Arch kitty package uses the system Python 3.14, whose pathlib raises the same error.

Save as test/shell.d/font-size-kitty-native-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-kitty-native-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

if ! "$ROOT/bin/omarchy-cmd-present" kitty; then
  pass "Kitty not installed; skipping native overlay check"
  exit 0
fi

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config/kitty" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
chmod +x "$tmpdir/bin/pgrep"

cp "$ROOT/config/kitty/kitty.conf" "$home/.config/kitty/kitty.conf"
HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" omarchy-font-size 13 >/dev/null

# Load the config the way Kitty does at startup: system defaults, then the user file.
output=$(HOME="$home" kitty +runpy '
import sys
from kitty.config import load_config
errors = []
opts = load_config(sys.argv[1], sys.argv[2], accumulate_bad_lines=errors)
print(opts.font_size)
for e in errors:
    print("bad line:", e.line, "->", type(e.exception).__name__ + ":", e.exception)
' "$ROOT/etc/xdg/kitty/kitty.conf" "$home/.config/kitty/kitty.conf" 2>/dev/null)

[[ $output == "13.0" ]] || fail "Kitty applies the size from kitty/local.conf" "$output"
pass "Kitty applies the size from kitty/local.conf"

Actual output at the PR head (exit 1):

9.0
bad line: globinclude ~/.config/kitty/local.conf -> NotImplementedError: Non-relative patterns are unsupported
not ok - Kitty applies the size from kitty/local.conf

Positive control: the same test passes (exit 0) against a diagnostic copy of the head with this change to bin/omarchy-font-size (not part of the PR):

@@ -67,14 +67,14 @@
 
   mkdir -p "$(dirname "$kitty_shared")"
   if [[ ! -f $kitty_shared ]]; then
-    printf 'globinclude ~/.config/kitty/local.conf\n' >"$kitty_shared"
+    printf 'globinclude local.conf\n' >"$kitty_shared"
   elif ! grep -qE '^[[:space:]]*globinclude[[:space:]]+.*kitty/local\.conf' "$kitty_shared" &&
     ! grep -qE '^[[:space:]]*include[[:space:]]+.*kitty/local\.conf' "$kitty_shared"; then
-    printf '\nglobinclude ~/.config/kitty/local.conf\n' >>"$kitty_shared"
+    printf '\nglobinclude local.conf\n' >>"$kitty_shared"
   fi
 
   if [[ -f $foot_shared ]] && ! grep -Fq 'foot/local.ini' "$foot_shared"; then
-    printf '\ninclude=%s\n' "${XDG_CONFIG_HOME:-$HOME/.config}/foot/local.ini" >>"$foot_shared"
+    sed -i "/^font=/a include=${XDG_CONFIG_HOME:-$HOME/.config}/foot/local.ini" "$foot_shared"
   fi
 
   if [[ -f $alacritty_shared ]] && ! grep -Fq 'alacritty/local.toml' "$alacritty_shared"; then
ok - Kitty applies the size from kitty/local.conf

The control's duplicate check (grep -qE '...kitty/local\.conf') would also need updating for the relative form; it was not changed in the control.

Migration gives every terminal one size

It copies the first size found (Ghostty first) to every overlay. Impact: the stock Ghostty 9 overrides Alacritty's size = 12.

Suggested change: Migrate each terminal's own size.

Reproducer (fails at 5c0251e)

Reproducer: Migration replaces a terminal's own size with Ghostty's

Every install is seeded with all four terminal configs, so the stock Ghostty value (9) is read first even when the user only uses, and only customized, another terminal.

Save as test/shell.d/font-size-migration-per-terminal-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-migration-per-terminal-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config/ghostty" "$home/.config/alacritty" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
printf '#!/bin/bash\necho "JetBrainsMono Nerd Font"\n' >"$tmpdir/bin/omarchy-font-current"
chmod +x "$tmpdir/bin/"*

# Every install is seeded with all four terminal configs. This user only uses
# Alacritty and set its size to 12; the unused Ghostty config still has the stock 9.
printf 'font-family = "JetBrainsMono Nerd Font"\nfont-size = 9\n' >"$home/.config/ghostty/config"
cat >"$home/.config/alacritty/alacritty.toml" <<'TOML'
general.import = [ "~/.local/state/omarchy/current/theme/alacritty.toml" ]

[font]
normal = { family = "JetBrainsMono Nerd Font", style = "Regular" }
size = 12
TOML

HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" \
  bash -euo pipefail "$ROOT/migrations/1789224260.sh" >/dev/null

grep -qx 'size = 12' "$home/.config/alacritty/local.toml" ||
  fail "migration keeps Alacritty's own size" "$(cat "$home/.config/alacritty/local.toml")"
pass "migration keeps Alacritty's own size"

Actual output at the PR head (exit 1):

# Machine-local Alacritty overrides. Not part of the shared desktop config.
[font]
size = 9
not ok - migration keeps Alacritty's own size
More: Foot's overlay overrides the shared family

Foot has one font= key, and the later font= in local.ini replaces the shared one. omarchy-font-size writes the family from omarchy-font-current, not from foot.ini. Impact: a family set by hand in foot.ini, or synced from another machine, is overridden by this machine's overlay, contrary to "Family is shared" in theming.md.

Suggested change: Take the family from the shared foot.ini font= line when writing local.ini, or document that Foot's overlay carries the family.

Reproducer (fails at 5c0251e)

Reproducer: Migration replaces a custom Foot family

omarchy-font-current is stubbed to stand in for fc-match monospace on a stock install.

Save as test/shell.d/font-size-foot-family-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-foot-family-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config/foot" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
# Stands in for `fc-match monospace` on a stock install.
printf '#!/bin/bash\necho "JetBrainsMono Nerd Font"\n' >"$tmpdir/bin/omarchy-font-current"
chmod +x "$tmpdir/bin/"*

printf '[main]\nfont=Iosevka Term:size=11\n' >"$home/.config/foot/foot.ini"

HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" \
  bash -euo pipefail "$ROOT/migrations/1789224260.sh" >/dev/null

# Foot reads local.ini after foot.ini, and a later font= replaces the whole font list.
grep -qx 'font=Iosevka Term:size=11' "$home/.config/foot/local.ini" ||
  fail "migration keeps Foot's own family and size" "$(cat "$home/.config/foot/local.ini")"
pass "migration keeps Foot's own family and size"

Actual output at the PR head (exit 1):

# Machine-local Foot overrides. Not part of the shared desktop config.
font=JetBrainsMono Nerd Font:size=11
not ok - migration keeps Foot's own family and size
More: Migration replaces symlinked configs with regular files

The migration's sed -i calls for Ghostty, Foot and Alacritty lack --follow-symlinks (Kitty's has it). Impact: stow-style links become regular files, and the dotfiles copies keep the old size.

Suggested change: Use sed --follow-symlinks -i for all four.

Reproducer (fails at 5c0251e)

Reproducer: Migration replaces a symlinked shared config with a regular file

Same layout as a stow-style dotfile repo.

Save as test/shell.d/font-size-symlink-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-symlink-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config/ghostty" "$home/dotfiles" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
printf '#!/bin/bash\necho "JetBrainsMono Nerd Font"\n' >"$tmpdir/bin/omarchy-font-current"
chmod +x "$tmpdir/bin/"*

# Dotfile manager layout: ~/.config/ghostty/config is a symlink into a synced repo.
printf 'font-family = "JetBrainsMono Nerd Font"\nfont-size = 11\n' >"$home/dotfiles/ghostty-config"
ln -s ../../dotfiles/ghostty-config "$home/.config/ghostty/config"

HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" \
  bash -euo pipefail "$ROOT/migrations/1789224260.sh" >/dev/null

[[ -L $home/.config/ghostty/config ]] ||
  fail "migration keeps the dotfile symlink" "dotfiles copy now: $(tr '\n' '|' <"$home/dotfiles/ghostty-config")"
pass "migration keeps the dotfile symlink"

Actual output at the PR head (exit 1):

dotfiles copy now: font-family = "JetBrainsMono Nerd Font"|font-size = 11||config-file = ?"~/.config/ghostty/local"|
not ok - migration keeps the dotfile symlink
More: A trailing space aborts the migration queue

font-size = 11 is read as 11 , omarchy-font-size rejects it, and the migration exits 1. Impact: omarchy-migrate stops with later migrations pending. A TOML inline comment (size = 12 # laptop) does the same when Alacritty is the first config with a size.

Suggested change: Trim whitespace and comments when reading, and fall back to 9 instead of failing.

Reproducer (fails at 5c0251e)

Reproducer: Trailing whitespace after a size aborts the migration

omarchy-migrate runs each migration with bash -euo pipefail and stops at the first failure, so the later migrations stay pending too.

Save as test/shell.d/font-size-migration-whitespace-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-migration-whitespace-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config/ghostty" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
printf '#!/bin/bash\necho "JetBrainsMono Nerd Font"\n' >"$tmpdir/bin/omarchy-font-current"
chmod +x "$tmpdir/bin/"*

# Trailing space after the value.
printf 'font-family = "JetBrainsMono Nerd Font"\nfont-size = 11 \n' >"$home/.config/ghostty/config"

if ! HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" \
  bash -euo pipefail "$ROOT/migrations/1789224260.sh" >/dev/null; then
  fail "migration tolerates trailing whitespace after the size"
fi
grep -qx 'font-size = 11' "$home/.config/ghostty/local" || fail "migration keeps size 11"
pass "migration tolerates trailing whitespace after the size"

Actual output at the PR head (exit 1):

Font size must be a number, got: 11 
not ok - migration tolerates trailing whitespace after the size

Reproducer: inline comment (fails at 5c0251e)

Reproducer: A TOML inline comment after the size aborts the migration

Reached only when no earlier source (overlays, Ghostty, Kitty, Foot) has a size; here the home has only an Alacritty config.

Save as test/shell.d/font-size-migration-inline-comment-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-migration-inline-comment-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config/alacritty" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
printf '#!/bin/bash\necho "JetBrainsMono Nerd Font"\n' >"$tmpdir/bin/omarchy-font-current"
chmod +x "$tmpdir/bin/"*

# Only an Alacritty config, with a TOML inline comment after the size.
cat >"$home/.config/alacritty/alacritty.toml" <<'TOML'
general.import = [ "~/.local/state/omarchy/current/theme/alacritty.toml" ]

[font]
size = 12 # laptop
TOML

if ! HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" \
  bash -euo pipefail "$ROOT/migrations/1789224260.sh" >/dev/null; then
  fail "migration tolerates a TOML inline comment after the size"
fi
pass "migration tolerates a TOML inline comment after the size"

Actual output at the PR head (exit 1):

Font size must be a number, got: 12 # laptop
not ok - migration tolerates a TOML inline comment after the size
More: Overlays are rewritten whole

write_size rewrites the overlays, and omarchy-font-set the Foot one, with cat >, while their headers invite other machine-local overrides. Impact: a line such as window-padding-x = 4 is lost on the next size change, including from omarchy display text size.

Suggested change: Replace only the size line, or label the files as fully managed.

Reproducer (fails at 5c0251e)

Reproducer: omarchy font size discards other lines in the overlay

The shipped header calls the file machine-local overrides.

Save as test/shell.d/font-size-overlay-rewrite-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-overlay-rewrite-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config/ghostty" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
chmod +x "$tmpdir/bin/"*

cp "$ROOT/config/ghostty/config" "$home/.config/ghostty/config"
cp "$ROOT/config/ghostty/local" "$home/.config/ghostty/local"
printf 'window-padding-x = 4\n' >>"$home/.config/ghostty/local"

HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" omarchy-font-size 12 >/dev/null

grep -qx 'window-padding-x = 4' "$home/.config/ghostty/local" ||
  fail "font size change keeps other machine-local settings" "$(cat "$home/.config/ghostty/local")"
pass "font size change keeps other machine-local settings"

Actual output at the PR head (exit 1):

# Machine-local Ghostty overrides. Not part of the shared desktop config.
font-size = 12
not ok - font size change keeps other machine-local settings
More: Alacritty import insertion after a trailing comma

For a general.import array ending in ,, the inserted entry produces ,,. Impact: the result is invalid TOML, so Alacritty cannot load the config.

Suggested change: Strip a trailing comma before joining.

Reproducer (fails at 5c0251e)

Reproducer: Overlay import insertion produces invalid TOML after a trailing comma

Edge case: only when the user's general.import array ends with a trailing comma and lacks the overlay entry.

Save as test/shell.d/font-size-alacritty-import-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-alacritty-import-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config/alacritty" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
chmod +x "$tmpdir/bin/"*

# Multi-line import list with a trailing comma (the style this PR ships), without the overlay entry.
cat >"$home/.config/alacritty/alacritty.toml" <<'TOML'
general.import = [
  "~/.local/state/omarchy/current/theme/alacritty.toml",
]

[font]
normal = { family = "JetBrainsMono Nerd Font", style = "Regular" }
TOML

HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" omarchy-font-size 12 >/dev/null

python3 -c 'import sys, tomllib; tomllib.load(open(sys.argv[1], "rb"))' "$home/.config/alacritty/alacritty.toml" ||
  fail "alacritty.toml is still valid TOML after adding the overlay import" "$(sed -n 1,4p "$home/.config/alacritty/alacritty.toml")"
pass "alacritty.toml is still valid TOML after adding the overlay import"

Actual output at the PR head (exit 1):

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import sys, tomllib; tomllib.load(open(sys.argv[1], "rb"))
                         ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/tomllib/_parser.py", line 141, in load
    return loads(s, parse_float=parse_float)
  File "/usr/lib/python3.14/tomllib/_parser.py", line 182, in loads
    pos = key_value_rule(src, pos, out, header, parse_float)
  File "/usr/lib/python3.14/tomllib/_parser.py", line 411, in key_value_rule
    pos, key, value = parse_key_value_pair(src, pos, parse_float)
                      ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/tomllib/_parser.py", line 454, in parse_key_value_pair
    pos, value = parse_value(src, pos, parse_float)
                 ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/tomllib/_parser.py", line 707, in parse_value
    return parse_array(src, pos, parse_float)
  File "/usr/lib/python3.14/tomllib/_parser.py", line 509, in parse_array
    pos, val = parse_value(src, pos, parse_float)
               ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/tomllib/_parser.py", line 740, in parse_value
    raise TOMLDecodeError("Invalid value", src, pos)
tomllib.TOMLDecodeError: Invalid value (at line 2, column 57)
general.import = [
  "~/.local/state/omarchy/current/theme/alacritty.toml",, "~/.config/alacritty/local.toml"]

[font]
not ok - alacritty.toml is still valid TOML after adding the overlay import
More: Alacritty configs without `general.import` lose their size

ensure_includes adds the overlay import only when the file contains the text general.import (bin/omarchy-font-size:81). Impact: a hand-written config using a [general] table with import = [...], or no import, gets no overlay import while the migration still deletes its size line, so Alacritty falls back to its built-in 11.25.

Suggested change: Handle those forms too, or keep the shared size when no import was added.

Reproducer (fails at 5c0251e)

Reproducer: Alacritty config with a [general] table loses its size

The migration writes the size to local.toml but adds no import for it (ensure_includes only edits files containing the text general.import), and still deletes the shared size line. Alacritty then uses its built-in 11.25 (alacritty/src/config/font.rs). A config with no import at all behaves the same (checked in a separate sandbox run, not written as a test).

Save as test/shell.d/font-size-alacritty-general-table-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-alacritty-general-table-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config/alacritty" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
printf '#!/bin/bash\necho "JetBrainsMono Nerd Font"\n' >"$tmpdir/bin/omarchy-font-current"
chmod +x "$tmpdir/bin/"*

# Same import as the stock file, written as a [general] table instead of a dotted key.
cat >"$home/.config/alacritty/alacritty.toml" <<'TOML'
[general]
import = [ "~/.local/state/omarchy/current/theme/alacritty.toml" ]

[font]
size = 12
TOML

HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" \
  bash -euo pipefail "$ROOT/migrations/1789224260.sh" >/dev/null

python3 - "$home/.config/alacritty/alacritty.toml" <<'PY' || fail "Alacritty still gets size 12 after the migration" "$(cat "$home/.config/alacritty/alacritty.toml")"
import sys, tomllib
d = tomllib.load(open(sys.argv[1], "rb"))
imports = d.get("general", {}).get("import", [])
assert d.get("font", {}).get("size") == 12 or "~/.config/alacritty/local.toml" in imports, imports
PY
pass "Alacritty still gets size 12 after the migration"

Actual output at the PR head (exit 1):

Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
AssertionError: ['~/.local/state/omarchy/current/theme/alacritty.toml']
[general]
import = [ "~/.local/state/omarchy/current/theme/alacritty.toml" ]

[font]
not ok - Alacritty still gets size 12 after the migration
More: No range check on the size

Impact: omarchy font size 0 and 500 are accepted and written to all four terminals.

Suggested change: Reject values outside a sane range.

Reproducer (fails at 5c0251e)

Reproducer: omarchy font size accepts 0

The size check in omarchy-font-size only tests the number format (^[0-9]+([.][0-9]+)?$) and has no range, so 0 is accepted and written; 500 was accepted the same way in a separate sandbox run. omarchy display text size itself only passes 7 to 15.

Save as test/shell.d/font-size-validation-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-validation-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
mkdir -p "$home/.config" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
chmod +x "$tmpdir/bin/"*

if HOME="$home" XDG_CONFIG_HOME="$home/.config" PATH="$tmpdir/bin:$ROOT/bin:$PATH" omarchy-font-size 0 >/dev/null 2>&1; then
  fail "omarchy font size rejects 0" "$(cat "$home/.config/ghostty/local")"
fi
pass "omarchy font size rejects 0"

Actual output at the PR head (exit 1):

# Machine-local Ghostty overrides. Not part of the shared desktop config.
font-size = 0
not ok - omarchy font size rejects 0
More: `font-size-test.sh` signals running terminals

The test runs the real omarchy-font-set without stubbing pkill. Impact: it sends pkill -USR1 kitty and pkill -SIGUSR2 ghostty to the developer's session; kitty-config-test.sh already stubs pkill.

Suggested change: Stub pkill in this test too.

Probe output at 5c0251e (the PR's test itself passes)

Reproducer: font-size-test.sh signals the developer's running terminals

test/shell.d/font-size-test.sh stubs pgrep and several Omarchy helpers but not pkill, and the real omarchy-font-set it calls runs pkill -USR1 kitty and pkill -SIGUSR2 ghostty unconditionally when those configs exist (they do in the test HOME). Probe: put a logging pkill ahead of the system one on PATH and run the PR's test.

mkdir -p /tmp/logbin
printf '#!/bin/bash\necho "pkill $*" >>/tmp/pkill.log\nexit 0\n' >/tmp/logbin/pkill
chmod +x /tmp/logbin/pkill
PATH="/tmp/logbin:$PATH" bash test/shell.d/font-size-test.sh
cat /tmp/pkill.log

Actual output at the PR head (test exit 0):

ok - stock terminal configs leave size to the local overlay
ok - font size defaults to 9 when no overlay exists
ok - omarchy font size 11 writes every terminal overlay
ok - omarchy font size ensures shared configs include the overlays
ok - omarchy font set does not clobber this machine's Foot size
ok - migration moves in-file font size onto the overlay
pkill -USR1 kitty
pkill -SIGUSR2 ghostty

Without the logging stub, those two calls reach every Kitty and Ghostty process of the user running the tests (a config reload). kitty-config-test.sh already stubs pkill; adding pkill to the stub list in font-size-test.sh fixes it.

More: `XDG_CONFIG_HOME` handling is inconsistent

Overlays are written under ${XDG_CONFIG_HOME:-$HOME/.config}, but the Ghostty, Kitty and Alacritty include lines hardcode ~/.config, and the migration and omarchy-font-set read shared files from ~/.config. Impact: with a non-default XDG_CONFIG_HOME, those includes point at files that are not written, and Ghostty silently skips its optional include and keeps its default size.

Suggested change: Use one convention for both.

Reproducer (fails at 5c0251e)

Reproducer: with a non-default XDG_CONFIG_HOME, Ghostty's include points away from the overlay

omarchy-font-size writes the overlay under ${XDG_CONFIG_HOME:-$HOME/.config}, but the include line it relies on is config-file = ?"~/.config/ghostty/local", which Ghostty expands from $HOME. The optional ? makes Ghostty skip the missing file silently. When Ghostty is installed the test reads Ghostty's effective value; otherwise it checks the include target on disk.

Save as test/shell.d/font-size-xdg-config-home-test.sh in a checkout of the PR head (5c0251e) and run bash test/shell.d/font-size-xdg-config-home-test.sh. It uses the repository's base-test.sh helpers and a temporary HOME and XDG_CONFIG_HOME; nothing outside the temporary directory is touched.

#!/bin/bash

set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/base-test.sh"

tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
home="$tmpdir/home"
xdg="$tmpdir/xdg"
mkdir -p "$home" "$xdg/ghostty" "$tmpdir/bin"
printf '#!/bin/bash\nexit 1\n' >"$tmpdir/bin/pgrep"
chmod +x "$tmpdir/bin/"*

# XDG_CONFIG_HOME points somewhere other than ~/.config; Ghostty loads $XDG_CONFIG_HOME/ghostty/config.
# 15 differs from Ghostty's Linux default (12), so the effective value shows which file won.
cp "$ROOT/config/ghostty/config" "$xdg/ghostty/config"
HOME="$home" XDG_CONFIG_HOME="$xdg" PATH="$tmpdir/bin:$ROOT/bin:$PATH" omarchy-font-size 15 >/dev/null

if command -v ghostty >/dev/null; then
  size=$(HOME="$home" XDG_CONFIG_HOME="$xdg" ghostty +show-config --changes-only=false 2>/dev/null | sed -n 's/^font-size = //p')
  [[ $size == 15 ]] || fail "Ghostty applies the size omarchy font size wrote" "effective font-size: $size"
fi

include=$(sed -n 's/^config-file = ?"\(.*ghostty\/local\)"$/\1/p' "$xdg/ghostty/config")
target=${include/#\~/$home}
[[ -f $target ]] ||
  fail "Ghostty's overlay include points at the overlay omarchy font size wrote" \
    "include: $include (missing); overlay written: \$XDG_CONFIG_HOME/ghostty/$(ls "$xdg/ghostty" | grep -x local)"
pass "Ghostty's overlay include points at the overlay omarchy font size wrote"

Actual output at the PR head with Ghostty 1.3.1 on PATH (exit 1):

effective font-size: 12
not ok - Ghostty applies the size omarchy font size wrote

Actual output at the PR head without Ghostty on PATH (exit 1):

include: ~/.config/ghostty/local (missing); overlay written: $XDG_CONFIG_HOME/ghostty/local
not ok - Ghostty's overlay include points at the overlay omarchy font size wrote
More: `hypr/input.local.lua` loader

The loader is unrelated to the PR title and undocumented, and with no migration it reaches existing installs only when they refresh or reset hyprland.lua. It builds the path from os.getenv("XDG_CONFIG_HOME") or ..., so an empty XDG_CONFIG_HOME gives /hypr/input.local.lua; default/hypr/paths.lua handles that case. From source; not reproduced.

Suggested change: Use require("default.hypr.paths").config_home, and move this to its own PR or document it.

More: Documentation

The overlay files sit in the same directories as the shared files, so "does not ride along when you sync" holds only if the sync excludes them. omarchy display text size also still writes [font] base-size to the shared shell.toml.

Suggested change: Name the four overlay files as the ones to exclude from sync.

Details

Verified

  • Ghostty follows the overlay: ghostty +show-config gives font-size = 11 before the migration, 11 after it, and 14 after omarchy font size 14.
  • Foot with the PR's shipped foot.ini passes foot -C and imports local.ini.
  • omarchy display text size set, report and reset write and report the overlay size, and omarchy font set keeps the Foot overlay size.
  • Rerunning the migration leaves the files unchanged.
  • Both PR tests pass at the head and in a local merge with the quattro tip; 37 related shell test files show the same results at the tip and the merge.

Optional notes

  • font-size-test.sh runs the append path only on a foot.ini whose sole section is [main], and never checks where the line lands. The Foot reproducer above fails at the head and would cover it.
  • kitty-config-test.sh checks Kitty text only, and its native check never loads local.conf, so both tests pass with real Kitty. The Kitty reproducer above fails at the head and would cover it.

Related open PRs

Migration order: 1789224260.sh sorts before 12 migrations already on quattro. omarchy-migrate tracks each file separately, so it still runs.


Review information

Test scope: Source and sandbox tests at 5c0251e; config parsers only, no windows.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@jandrusk

Copy link
Copy Markdown

Thanks for working on this. The Oct 1 review's main finding still applies at the current head (5c0251e): on existing installs, the migration appends Foot's include= under whatever section comes last ([text-bindings]), and Foot only honours include in [main]. That breaks foot -C and drops the default terminal to the fallback size. Writing a [main] header before the include, or inserting it right after the existing [main] section, would fix it.

Small one too: the migration reads and edits the main configs at $HOME/.config/... but writes the overlays at ${XDG_CONFIG_HOME:-$HOME/.config}/.... With a custom XDG_CONFIG_HOME those point at different trees. Using one base for both would avoid that.

@seanpk
seanpk force-pushed the feat/machine-local-overlays branch from 5c0251e to c10daef Compare October 24, 2026 13:35
@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 0/5 · Do not merge yet: the migration can lose a saved size or leave Foot with a missing include, and earlier terminal bugs remain.RetriggerView in GreptileConfidence Score: 0/5

[Medium impact] The changes affect terminal sizing and input customization in Omarchy desktop setups.

Do not merge yet: the migration can lose a saved size or leave Foot with a missing include, and earlier terminal bugs remain.

Findings

  1. P1 Saved Alacritty size gets overwritten ▶
  2. P1 Foot loads a missing file ▶
  3. P1 Comments break Alacritty imports ▶
  4. P1 Alacritty size changes do nothing ▶
  5. P1 Foot keeps the old family ▶
  6. P2 Tests repeat the config contents ▶
  7. P2 Tests follow a frozen migration ▶
  8. P2 Font tests repeat setup ▶
  9. P2 Test indentation breaks repository rules ▶

Summary

Moves terminal font sizes into separate files for each machine.

  • Terminal font sizes stay on each machine while font families stay shared.
  • Hyprland can load input settings kept on one machine.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Display text size] --> B[omarchy-font-size]
  C[Font size command] --> B
  B --> D[Write machine-local terminal files]
  B --> E[Ensure shared configs include local files]
  F[Migration] --> G[Read old shared sizes]
  G --> D
  F --> E
  F --> H[Remove migrated shared sizes]
Loading

Reviews (10) · Last reviewed commit: "Expect display text size to write termin..." · Reviewed by Greptile

Comment thread bin/omarchy-font-size Resolved
Comment thread bin/omarchy-font-size Resolved
Comment thread bin/omarchy-font-size Outdated
Comment on lines +379 to +380
def tokens(inner):
return [part.strip() for part in inner.split(",") if part.strip()]

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 Comments break Alacritty imports

alacritty_import splits the import array on commas and joins it onto one line. A valid array ending with "theme.toml", # theme and a closing bracket on the next line becomes invalid: the comment now swallows the closing bracket. Both the migration and size command can break a working config this way. Preserve comments and line breaks when adding the import.

Comment thread bin/omarchy-font-size
abs_end = start + imported.end(1)
finish(tokens(imported.group(1)), abs_start, abs_end)

raise SystemExit(0 if mode == "apply" else 1)

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 Alacritty size changes do nothing

If an Alacritty config has no import array, alacritty_import apply returns success without adding one. The command writes the new size to local.toml, but Alacritty never loads it. This also breaks omarchy display text size, which previously changed the shared size directly. Create an import array when none exists instead of silently skipping the terminal.

Comment thread bin/omarchy-font-set Outdated
Comment on lines +60 to +68
# Foot's one font= key replaces the whole list, so the overlay keeps this
# family. Replace only that line; other machine-local settings stay.
if [[ -f $foot_local ]]; then
size=$(sed -n 's/^[[:space:]]*font[[:space:]]*=.*:size=\([0-9.][0-9.]*\).*/\1/p' "$foot_local" | head -1 || true)
size=${size:-9}
size=${size%.0}
if grep -qE '^[[:space:]]*font[[:space:]]*=' "$foot_local"; then
tmp=$(mktemp)
awk -v line="font=$font_name:size=$size" '

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 Foot keeps the old family

Foot's local file now stores the family as well as the size. Changing the family updates only the current machine's local file. When another machine receives the shared foot.ini, its old local family still overrides the new shared family. Avoid keeping a separate family copy that only the local omarchy-font-set call refreshes.

Comment thread bin/omarchy-font-size Resolved
Comment thread test/shell.d/font-size-overlay-test.sh Outdated
Comment on lines +25 to +27
run_migration() {
HOME="$1" XDG_CONFIG_HOME="$2" PATH="$bin:$ROOT/bin:$PATH" \
bash -euo pipefail "$ROOT/migrations/1789224260.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 Tests follow a frozen migration

The new tests run 1789224260.sh directly and assert its results. The migration guide prohibits migration tests under test/; tests should exercise reusable logic in a command instead. Replace these calls with tests of the helper's operations, including the same pattern in font-size-test.sh. This requirement must be met before merging.

File Used: agents/skills/migrations.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread bin/omarchy-font-size Resolved
@seanpk

seanpk commented Oct 24, 2026

Copy link
Copy Markdown
Author

I'm Grok, an AI assistant from xAI, writing this with Sean.

@dhh @ryanrhughes Rebased onto quattro. The head is 8d9b550. The font size lives in the per-machine overlay. Foot's include is in [main] after the shared font line, and Kitty's globinclude is local.conf.

Comment thread test/shell.d/font-size-overlay-test.sh Resolved
@seanpk
seanpk force-pushed the feat/machine-local-overlays branch from 8d9b550 to bb856ce Compare November 5, 2026 07:37
Comment thread bin/omarchy-font-size Resolved
Comment thread bin/omarchy-font-size Resolved
Comment thread bin/omarchy-font-set Resolved

set -euo pipefail

source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"

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 tests repeat setup

This adds another font-size test file even though font-size-test.sh and kitty-config-test.sh cover these commands. AGENTS.md requires extending the area’s existing test file rather than adding another *-test.sh. Move these cases into the existing tests to avoid another copy of the setup and fixtures. This repository requirement must be satisfied before merging.

File Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@seanpk
seanpk force-pushed the feat/machine-local-overlays branch from bb856ce to c781594 Compare November 22, 2026 01:39
Comment thread migrations/1789224260.sh Resolved
Comment thread bin/omarchy-font-set Resolved
@omarchybot omarchybot added enhancement New feature or request and removed enhancement New feature or request labels Nov 22, 2026
Comment thread migrations/1789224260.sh Resolved
@seanpk
seanpk force-pushed the feat/machine-local-overlays branch from 857f94e to 0d99957 Compare November 23, 2026 14:43
Comment thread bin/omarchy-font-size Resolved
Comment thread test/shell.d/font-size-overlay-test.sh Resolved
@seanpk

seanpk commented Nov 23, 2026

Copy link
Copy Markdown
Author

I'm Grok, an AI assistant from xAI, writing this with Sean.

The stock overlays the upgrade copies, which ship at size 9, no longer hide a size already saved in the shared config, and omarchy font set keeps a Foot fallback that comes after a comma. An overlay that already has other settings and no size of its own now receives the shared size, and a size already on that file stays. A stock Foot overlay takes the shared family when that line has no size, so JetBrainsMono at size 9 does not replace it. An Alacritty [font] header with a trailing comment stays one table.

The head is e974ac4.

Comment thread bin/omarchy-font-size Resolved
Comment thread bin/omarchy-font-size Resolved
import sys, tomllib
font = tomllib.load(open(sys.argv[1], "rb")).get("font", {})
if font.get("size") != 12:
raise SystemExit(repr(font))

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 Test indentation breaks repository rules

The new Python check uses four spaces before raise SystemExit(repr(font)), but AGENTS.md requires two-space indentation. Use two spaces here. This repository requirement must be satisfied before merging.

File Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@greptile-apps

greptile-apps Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

Family stays in the synced Ghostty/Kitty/Foot/Alacritty files.
Size moves to optional local overlays that omarchy font size and
omarchy display text size write. omarchy font set no longer forces
Foot to size 9.

Co-Authored-By: Grok <noreply@x.ai>
seanpk and others added 10 commits December 1, 2026 09:12
Foot only honors include= in [main], and Kitty rejects an absolute
globinclude, so the move to per-machine sizes broke the default
terminal and never reached Kitty. Each terminal keeps its own size
and Foot family, symlinks are edited in place, and a size that is
not a number no longer blocks later migrations.

Co-Authored-By: Grok <grok@x.ai>
Foot's later font= replaces an include that lands above it, so the
saved size never took effect. Shared includes under $HOME are written
with ~, and the restart notices come from the font catalog.

Co-Authored-By: Grok <grok@x.ai>
AGENTS.md wants numeric tests in (( )), not [[ ]].

Co-Authored-By: Grok <grok@x.ai>
The size belongs on the first font. A list such as
"JetBrainsMono Nerd Font:size=12, Noto Color Emoji:size=10" was losing
the primary size and reporting the emoji size instead. Reading and
writing now stay on that first entry, and changing the family keeps
the fallbacks.

The restart reminder passed the translated sentence as the glyph, so
omarchy-notification-send exited before sending it. It now matches
omarchy-font-set: a glyph, then the headline.

The CLI assertion expects the fallback to remain on the shared line.
The upgrade copies the new overlay files, at size 9, before the
migration runs. Reading that overlay then replaced a saved size and
deleted the shared line. The migration now reads the shared size and
writes it only when the overlay is missing or still the packaged file.

After that strip, Foot's shared line is "font=Old, Emoji:size=10".
omarchy font set stopped at the first colon, so the fallback became
the new family's size. The family now ends at a colon or a comma.

Co-Authored-By: Grok <grok@x.ai>
An overlay with other machine settings and no size was left alone,
and the migration then deleted the shared size. It now copies that
size onto a file that has none. A size the user already set stays.

A stock Foot overlay is JetBrainsMono at size 9. Foot loads that
after the shared line, so a shared family with no size was replaced.
The stock file is rewritten from the shared family.

An Alacritty [font] header with a trailing comment stays that table.
A second [font] made the overlay invalid TOML.

Co-Authored-By: Grok <grok@x.ai>
…with the helper

The migration was dated 2026-09-12, before quattro's later migrations, so it
would not run on an already-updated install. AGENTS.md also requires
omarchy-cmd-present instead of command -v.

Co-Authored-By: Grok <grok@x.ai>
An overlay with font.size = 11 was missed by the size= and [font]
checks, so a size change appended a second [font] table and made
the TOML invalid. The existing dotted key is updated instead.

The helper's Python blocks now use two-space indentation, as
AGENTS.md requires.

Co-Authored-By: Grok Bot <grok@x.ai>
It was dated before quattro's later migrations, so it would not run
on an already-updated install.

Co-Authored-By: Grok Bot <grok@x.ai>
omarchy display text size already writes terminal size to the
machine-local overlays. The helper test still looked for the size
in the shared, symlinked configs.

Co-Authored-By: Grok Bot <grok@x.ai>
@seanpk
seanpk force-pushed the feat/machine-local-overlays branch from efdf9a5 to b544840 Compare December 1, 2026 14:16
@seanpk

seanpk commented Dec 1, 2026

Copy link
Copy Markdown
Author

I'm Grok Bot, writing this with Sean. This branch is rebased on current quattro, and the two Greptile points are addressed. Sean thinks it is ready to merge.

Comment thread migrations/1796134380.sh
ghostty) grep -qE '^[[:space:]]*font-size[[:space:]]*=' "$overlay" ;;
kitty) grep -qE '^[[:space:]]*font_size[[:space:]]' "$overlay" ;;
foot) grep -qE '^[[:space:]]*font[[:space:]]*=[^,]*:size=[0-9.]' "$overlay" ;;
alacritty) grep -qE '^[[:space:]]*size[[:space:]]*=' "$overlay" ;;

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 Saved Alacritty size gets overwritten

The migration misses an existing font.size = 11 in Alacritty's local.toml, because overlay_has_size only checks bare size keys. If the shared file has size = 14, the migration replaces this machine's chosen 11 with 14. The readers in omarchy-font-size also miss dotted keys, even though its writer supports them. Recognize both forms when reading and preserving sizes.

Knowledge Base Used: Migration framework

Comment thread migrations/1796134380.sh
Comment on lines +68 to +72
if [[ -z $size ]]; then
if [[ $term == foot ]] && overlay_is_stock "$term"; then
size=9
else
return 0

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 Foot loads a missing file

For an existing Foot config with [main] and font=Iosevka Term, but no local.ini, this branch skips creating the local file. The later --includes-only call still adds a required include=.../foot/local.ini. Ordinary updates do not create these user files first, so users get a config error when they next open Foot. Create the local file before adding its include, even when the shared font has no explicit size.

Knowledge Base Used: Migration framework

Comment on lines +18 to +20
# Default stock configs must not pin a size in the shared file.
if grep -q '^font-size' "$home/.config/ghostty/config"; then
fail "ghostty default config has no font-size"

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 Tests repeat the config contents

These assertions only check that the shipped terminal configs contain no size setting. AGENTS.md prohibits tests for small config changes and tests that re-read edited configs to confirm their contents. Remove this block and keep the tests that exercise the commands with real inputs. This repository requirement must be satisfied before merging.

File Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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.

4 participants