Using omarchy-theme-hook for App Theming
How I use imbypass's modular theme hook system to auto-theme apps when switching Omarchy themes.
Using omarchy-theme-hook for App Theming
Omarchy has a solid theme system - run omarchy-theme-set and your terminal, waybar, and core apps update. But what about CAVA, tmux, hyprlock, eww widgets?
imbypass built omarchy-theme-hook to solve this. It's a modular system that auto-themes additional apps when you switch Omarchy themes.
How It Works
The main hook at ~/.config/omarchy/hooks/theme-set:
- Extracts colors from alacritty.toml
- Exports them as shell variables
- Runs every script in
~/.config/omarchy/hooks/theme-set.d/
You get variables like $primary_foreground, $normal_cyan, $bright_red - the full ANSI palette plus RGB versions.
What's Included
imbypass ships hooks for a lot of apps out of the box:
- Terminals: alacritty, kitty, ghostty
- Editors: zed, vscode, cursor, windsurf
- Browsers: firefox, chromium, zen
- Desktop: gtk, qt6ct, waybar, mako, walker, swayosd
- Apps: spotify, discord, steam, superfile, cava
The naming convention controls execution order: 10-* runs first (system stuff), 40-* runs later (user apps).
Adding Your Own
Create a script, make it executable:
#!/bin/bash
# ~/.config/omarchy/hooks/theme-set.d/40-apps-myapp.sh
cat > ~/.config/myapp/theme.conf << EOF
background=#${primary_background}
foreground=#${primary_foreground}
accent=#${normal_cyan}
EOF
success "MyApp theme synced"
Next theme switch runs it automatically.
My Setup
I've added hooks for:
- Tmux - Status bar colors applied directly to running sessions
- Hyprlock - Lock screen with SSOT color variables
- Eww - Desktop clock widget colors (SCSS variables)
- Kitty background - Syncs terminal background to wallpaper
I also modified the main hook to try multiple color sources (alacritty.toml, then kitty.conf, then waybar.css) and to continue on failure instead of stopping. Wanted more reliable color extraction for things like the qt6ct hook which uses change_shade() to generate base16-style color variations.
Fair warning: if you modify the main hook like I did, contributing back upstream gets harder. You'll need to refactor to match imbypass's patterns. He keeps it simple - just the 16 ANSI colors and that's it. I could probably make Claude behave and only build customizations using the naming conventions already there but wheres the fun in not overengineering and making things confusing so you forget what happened and break it later? lol
CAVA Contribution
I contributed the CAVA hook upstream - it creates an 8-color gradient using the theme's ANSI palette and auto-reloads running instances. It's now part of the main repo.
Links:
- omarchy-theme-hook by imbypass
- Omarchy