Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/omarchy-font-set
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ if [[ -f ~/.config/kitty/kitty.conf ]] || omarchy-cmd-present kitty; then
else
printf '\nfont_family %s\n' "$font_name" >>~/.config/kitty/kitty.conf
fi
sed --follow-symlinks -i -E "s/^[[:space:]]*(bold_font|italic_font|bold_italic_font)[[:space:]]+.*/\1 auto/" ~/.config/kitty/kitty.conf
pkill -USR1 kitty
fi

Expand Down
9 changes: 9 additions & 0 deletions test/shell.d/kitty-config-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ run_command omarchy-display-text-size 16
grep -qx 'font_size 12.0' "$kitty_config" || fail "size command handles absent config"
pass "font controls create missing Kitty overrides without restoring the theme include"

printf 'font_family Old Font\nbold_font auto\nbold_font Old Font\n italic_font Old Font\nbold_italic_font Old Font\n' >"$kitty_config"
run_command omarchy-font-set 'Test Font'
! grep -q 'Old Font' "$kitty_config" || fail "font command resets explicit faces when updating the family override"
cp "$ROOT/config/kitty/kitty.conf" "$kitty_config"
printf 'bold_font Old Font\n' >>"$kitty_config"
run_command omarchy-font-set 'Test Font'
grep -qx 'bold_font auto' "$kitty_config" || fail "font command resets explicit faces when adding the family override"
pass "font command resets explicit Kitty faces so they follow the new family"

# try-omarchy VMs put a wrapper named kitty on PATH that exits 127 until Kitty
# is installed, so a command on PATH is not enough: ask Kitty itself.
if "$ROOT/bin/omarchy-cmd-present" kitty && kitty --version >/dev/null 2>&1; then
Expand Down