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

Find out why a theme-set hook or a built-in retint step does nothing

omarchyomarchy-4hyprland
AUDITED Audited against its sources and confirmed accurate. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Read /usr/share/omarchy/bin/omarchy-theme-set and omarchy-hook on 4.0.4-1 and the quattro versions on 2026-10-05. omarchy-hook theme-set "$THEME_NAME" >/dev/null is exact. omarchy-hook runs bash "$hook" "$@" || echo "Hook failed: $hook" to stdout, skips *.sample, and ignores the shebang and the executable bit. THEME_NAME is lowercased with spaces turned into hyphens (it also strips <tags>). shell/plugins/background/Background.qml line 119 on 4.0.4 runs omarchy-theme-set "$theme" >/dev/null 2>&1 & exactly as quoted. run_parallel waits without checking status and is unchanged on quattro, where the only change to omarchy-hook is a guard against a slash in the hook name. Issue #10720 is open and states the same mechanism, the same Background.qml line and the same browser symptom, so it supports the record. omarchy-notification-send exists for the logging template. One upstream change does not alter the advice: on quattro (unreleased) the Style > Theme menu entry now opens the shell image picker, which calls omarchy-theme-set through Util.execArgv. When omarchy theme set runs in a terminal, a hook's own stderr does reach the terminal, so 'no error' in the symptom describes the picker path. Not exercised: the diagnostic loops, which would rerun the retint steps.

Symptom

I put a script in ~/.config/omarchy/hooks/theme-set.d/ and nothing happens on a theme change. No error, no notification, omarchy theme set exits 0. Or one app (Chromium, VS Code, tmux, GTK apps) stops following the theme while everything else retints, and the theme switch still reports success. A Python or zsh hook prints syntax errors like import: command not found when I run it through omarchy-hook by hand.

Cause

Failures at both levels of the theme pipeline are thrown away.

User hooks: omarchy-theme-set calls omarchy-hook theme-set "$THEME_NAME" >/dev/null. When a hook fails, omarchy-hook reports it with echo "Hook failed: $hook", which goes to stdout and so into /dev/null. The theme picker goes further: shell/plugins/background/Background.qml runs omarchy-theme-set "$theme" >/dev/null 2>&1 &, which also discards stderr. omarchy-hook runs every non-.sample file with bash "$hook" "$@", so the shebang line is ignored. A Python, zsh or fish script is parsed as bash and fails. The executable bit does not matter. The single argument is the theme name lowercased with spaces turned into hyphens (tokyo-night).

Built-in steps: run_parallel in omarchy-theme-set starts each post_theme_commands entry with bash -lc and waits on it without checking the exit status. There is no set -e or trap, so a failing omarchy-theme-set-browser, -vscode, -gnome or -tmux is treated as a success. This is upstream issue #10720, still open, and run_parallel is unchanged on quattro as of 2026-10-04.

Fix

Run the hook the way Omarchy does, with tracing, and read the output:


theme=$(cat ~/.local/state/omarchy/current/theme.name)
for h in ~/.config/omarchy/hooks/theme-set.d/*; do
  [[ -f $h && $h != *.sample ]] || continue
  echo "== $h"; bash -x "$h" "$theme"; echo "exit $?"
done

If the hook is not bash, keep a bash wrapper and exec the real interpreter from it:


cat > ~/.config/omarchy/hooks/theme-set.d/30-myhook.sh <<'EOF'
#!/bin/bash
exec python3 "$HOME/.local/bin/my_theme_hook.py" "$@"
EOF

Make future failures visible. Start each hook with a log line and send a notification on error:


#!/bin/bash
exec >>"$HOME/.local/state/omarchy/theme-hooks.log" 2>&1
echo "$(date -Is) theme=$1 hook=$0"
trap 'omarchy-notification-send "Theme hook failed" "$0 line $LINENO"' ERR
set -e
# ... your commands ...

Find which built-in retint step is failing by running each one the way run_parallel does:


for c in omarchy-theme-set-foot omarchy-theme-set-tmux omarchy-theme-set-gnome omarchy-theme-set-browser omarchy-theme-set-vscode omarchy-theme-set-obsidian omarchy-theme-set-keyboard; do
  bash -lc "$c" >/dev/null 2>/tmp/theme-step.err || { echo "FAILED: $c"; cat /tmp/theme-step.err; }
done

The error text that prints is the real fault to chase.

Verify

omarchy theme set <name> followed by tail ~/.local/state/omarchy/theme-hooks.log shows a line for each hook with its result, and the loop over the built-in steps prints no FAILED: line.

Sources

theme-set-hooks-fail-silently