OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
omarchy-theming medium common DISPUTE

Stop `omarchy font set` from redirecting every font whose name contains "mono"

omarchyomarchy-4archhyprlandwayland
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The core mechanism is confirmed verbatim. bin/omarchy-font-set writes ~/.config/fontconfig/fonts.conf with exactly <test name="family" qual="any"><string>monospace</string></test> and <edit name="family" mode="prepend_first" binding="strong">. default/fontconfig/conf.avail/50-omarchy.conf confirms the caveat precisely: three generic rules using mode="assign" binding="strong" for sans-serif->Liberation Sans, serif->Liberation Serif, monospace->JetBrainsMono Nerd Font, and 50-omarchy sorts before 50-user. Two problems. (1) The fix is not durable, because omarchy-font-set REGENERATES fonts.conf from scratch (cat >"$fontconfig_file") on every font change, silently undoing the hand-edit, which the record never warns about. (2) '48-guessfamily.conf' could not be verified as a real fontconfig filename (upstream conf.d is not reachable and the man page does not enumerate it). The guess-generic-from-name behaviour is real but the filename should be discovered with fc-conflist, not asserted.

The cause above was rewritten on 2026-08-30 to match this note; the fix was corrected by the audit itself.
RISK

/etc/fonts/conf.d/50-omarchy.conf is package-owned. Editing it directly means your change is reverted on the next omarchy update / pacman -Syu, and pacman may leave a .pacnew. Prefer overriding in ~/.config/fontconfig/fonts.conf where possible. Also note that a later omarchy font set rewrites ~/.config/fontconfig/fonts.conf and undoes the alias fix.

Symptom

After omarchy font set "Monaspace Neon NF", apps that explicitly ask for a different monospace font get the wrong one. fc-match "JetBrainsMono Nerd Font", fc-match "Liberation Mono" and fc-match "Adwaita Mono" all return Monaspace Neon NF. Half the fonts listed by omarchy font list become unreachable, with no error anywhere.

Cause

Two rules combine. Fontconfig ships a generic-guessing rule that loads early and appends the generic monospace to the family list of any pattern whose *name contains the substring* mono, a name heuristic, not real monospace detection. (Confirm which file provides it on your system with fc-conflist. Do not assume a filename.) Then omarchy-font-set writes a ~/.config/fontconfig/fonts.conf rule with <test name="family" qual="any"><string>monospace</string></test> and mode="prepend_first" binding="strong", which matches that appended generic and inserts the chosen font at the *head* of the whole family list, ahead of what the app actually asked for. Families like Monaspace escape because their name does not contain mono, which is why the bug is invisible if you only test with Monaspace.

Fix

Bisect to confirm fontconfig is the source:


mv ~/.config/fontconfig/fonts.conf{,.off}
fc-match "Liberation Mono"     # -> Liberation Mono, correct
mv ~/.config/fontconfig/fonts.conf{.off,}
fc-match "Liberation Mono"     # -> hijacked again

Find the real filenames and load order on YOUR system rather than assuming 48-guessfamily.conf. The rule that appends a generic family based on the name containing mono ships under different filenames across fontconfig versions:


fc-conflist

**The critical gap in the original fix:** omarchy-font-set rewrites ~/.config/fontconfig/fonts.conf from scratch every time you set a font, so any hand-edit is thrown away the next time you pick a font in Style > Font. Make it durable with a font-set hook, which omarchy-font-set runs *after* it writes fonts.conf:


mkdir -p ~/.config/omarchy/hooks/font-set.d
cat > ~/.config/omarchy/hooks/font-set.d/20-font-alias.sh <<'EOF'
#!/bin/bash
font="$1"
[[ -n $font ]] || exit 0
mkdir -p ~/.config/fontconfig
cat > ~/.config/fontconfig/fonts.conf <<XML
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
  <alias binding="strong">
    <family>monospace</family>
    <prefer><family>$font</family></prefer>
  </alias>
</fontconfig>
XML
fc-cache -f
EOF
chmod +x ~/.config/omarchy/hooks/font-set.d/20-font-alias.sh
omarchy font set "Monaspace Neon NF"
fc-match "Liberation Mono"    # should now be Liberation Mono

**Confirmed caveat.** /etc/fonts/conf.d/50-omarchy.conf really does use mode="assign" binding="strong" on the three generics, and 50-omarchy sorts before 50-user, so the literal monospace token is replaced with JetBrainsMono Nerd Font before your file loads and the alias never fires:


<edit name="family" mode="assign" binding="strong">
  <string>JetBrainsMono Nerd Font</string>
</edit>

Do not edit that file in place. It is package-owned and omarchy update restores it. Copy it into the user tree where it sorts later and convert the three generic rules to alias/prefer:


mkdir -p ~/.config/fontconfig/conf.d
cp /etc/fonts/conf.avail/50-omarchy.conf ~/.config/fontconfig/conf.d/99-omarchy-generics.conf
# edit that copy: change each mode="assign" rule to an <alias><family>monospace</family><prefer>...</prefer></alias>
fc-cache -f
fc-match monospace

Verify

fc-match monospace returns your chosen font, while fc-match "Liberation Mono" returns Liberation Mono and fc-match "JetBrainsMono Nerd Font" returns JetBrainsMono Nerd Font.

Sources

omarchy-font-set-hijacks-named-mono-families