Describe the bug
omazed 2.0.1 no longer works on Omarchy 4. It cannot locate the current theme or parse its palette, so ~/.config/zed/themes/omazed.json is either never generated or generated with hardcoded fallback colors instead of the active theme's colors.
Environment
- OS: Arch Linux
- Omarchy: 4.0.0-1
- omazed: 2.0.1-1 (AUR)
- Zed: latest stable
Steps to reproduce
- Install omazed on an Omarchy 4 system.
- Run
omazed setup (or omazed sync).
- Apply any theme with
omarchy theme set <name>.
Actual behavior
omazed sync logs:
[WARN] Could not determine current Omarchy theme
because get_current_theme() returns empty — the file it reads (~/.config/omarchy/current/theme.name) no longer exists.
Even when a colors.toml is made reachable (e.g. by symlinking the legacy path), the generated theme has wrong ANSI colors. Only background, foreground and accent are picked up; every other color falls back to the generator's hardcoded defaults:
background: #101315 # correct (Solitude theme)
foreground: #cacccc # correct
accent: #798186 # correct
color0: #000000 # wrong (default)
color1: #ff4444 # wrong (default; should be #565d60)
color2: #44ff44 # wrong (default; should be #9fa5a9)
color3: #ffff44 # wrong (default; should be #d9dbdc)
...
Expected behavior
omazed sync and the theme-set hook should regenerate ~/.config/zed/themes/omazed.json from the active Omarchy theme's palette on Omarchy 4, matching the alacritty/terminal colors exactly.
Root cause
Two Omarchy 4 changes break omazed 2.0.1:
1. Theme state moved
Omarchy 4 migrated the "current theme" state from ~/.config/omarchy/current/ to ~/.local/state/omarchy/current/ (see /usr/share/omarchy/migrations/1781043107.sh). omazed still hardcodes:
OMARCHY_THEME_PATH="$HOME/.config/omarchy/current/theme"
get_current_theme() reads ~/.config/omarchy/current/theme.name
So the theme-name lookup fails and colors.toml/alacritty.toml are not found.
2. colors.toml key names changed
parse_colors_toml() only understands alacritty-style keys (color0..color15, selection_foreground, selection_background, cursor, accent, background, foreground). Omarchy 4's colors.toml uses named keys instead:
mode = "dark"
accent = "#798186"
selection = "#343d41"
muted = "#4b4e55"
background = "#101315"
foreground = "#cacccc"
red = "#565d60"
yellow = "#d9dbdc"
green = "#9fa5a9"
cyan = "#707070"
blue = "#798186"
magenta = "#aeaeae"
bright_red = "#de6145"
bright_yellow = "#c9c2b4"
bright_green = "#343d41"
bright_cyan = "#707070"
bright_blue = "#5d6367"
bright_magenta = "#9a9a9a"
The ANSI palette is therefore never populated and falls back to the defaults in finalize_palette_defaults().
3. (Minor) Light/dark detection
omazed checks for a light.mode file ($OMARCHY_THEME_PATH/light.mode) that Omarchy 4 no longer creates. Omarchy 4 stores mode = "dark" / mode = "light" inside colors.toml, so light themes are generated as dark.
Suggested fix
- Resolve the current theme from
~/.local/state/omarchy/current/theme and read the name from ~/.local/state/omarchy/current/theme.name, keeping a fallback to the legacy ~/.config/omarchy/current/ path for older Omarchy versions.
- Extend
parse_colors_toml() to map Omarchy 4's named keys to the internal color0..color15 variables (e.g. red -> color1, green -> color2, bright_red -> color9, muted -> color8, selection -> selection_background).
- Detect appearance from
mode = "light" in colors.toml instead of the light.mode file.
Local workaround
- Symlink
~/.config/omarchy/current -> ~/.local/state/omarchy/current (fixes the path).
- Patched copy of the generator at
~/.local/bin/omazed-generator.sh with the named-key mapping above.
- Small wrapper called from
~/.config/omarchy/hooks/theme-set that reads the state dir, derives appearance from mode = "light", and regenerates the theme.
Happy to open a PR with these fixes if that's welcome.
Describe the bug
omazed 2.0.1 no longer works on Omarchy 4. It cannot locate the current theme or parse its palette, so
~/.config/zed/themes/omazed.jsonis either never generated or generated with hardcoded fallback colors instead of the active theme's colors.Environment
Steps to reproduce
omazed setup(oromazed sync).omarchy theme set <name>.Actual behavior
omazed synclogs:because
get_current_theme()returns empty — the file it reads (~/.config/omarchy/current/theme.name) no longer exists.Even when a
colors.tomlis made reachable (e.g. by symlinking the legacy path), the generated theme has wrong ANSI colors. Onlybackground,foregroundandaccentare picked up; every other color falls back to the generator's hardcoded defaults:Expected behavior
omazed syncand thetheme-sethook should regenerate~/.config/zed/themes/omazed.jsonfrom the active Omarchy theme's palette on Omarchy 4, matching the alacritty/terminal colors exactly.Root cause
Two Omarchy 4 changes break omazed 2.0.1:
1. Theme state moved
Omarchy 4 migrated the "current theme" state from
~/.config/omarchy/current/to~/.local/state/omarchy/current/(see/usr/share/omarchy/migrations/1781043107.sh). omazed still hardcodes:OMARCHY_THEME_PATH="$HOME/.config/omarchy/current/theme"get_current_theme()reads~/.config/omarchy/current/theme.nameSo the theme-name lookup fails and
colors.toml/alacritty.tomlare not found.2. colors.toml key names changed
parse_colors_toml()only understands alacritty-style keys (color0..color15,selection_foreground,selection_background,cursor,accent,background,foreground). Omarchy 4'scolors.tomluses named keys instead:The ANSI palette is therefore never populated and falls back to the defaults in
finalize_palette_defaults().3. (Minor) Light/dark detection
omazed checks for a
light.modefile ($OMARCHY_THEME_PATH/light.mode) that Omarchy 4 no longer creates. Omarchy 4 storesmode = "dark"/mode = "light"insidecolors.toml, so light themes are generated as dark.Suggested fix
~/.local/state/omarchy/current/themeand read the name from~/.local/state/omarchy/current/theme.name, keeping a fallback to the legacy~/.config/omarchy/current/path for older Omarchy versions.parse_colors_toml()to map Omarchy 4's named keys to the internalcolor0..color15variables (e.g.red -> color1,green -> color2,bright_red -> color9,muted -> color8,selection -> selection_background).mode = "light"incolors.tomlinstead of thelight.modefile.Local workaround
~/.config/omarchy/current -> ~/.local/state/omarchy/current(fixes the path).~/.local/bin/omazed-generator.shwith the named-key mapping above.~/.config/omarchy/hooks/theme-setthat reads the state dir, derives appearance frommode = "light", and regenerates the theme.Happy to open a PR with these fixes if that's welcome.