Skip to content

Add themes support for Zed Editor - #719

Closed
melonamin wants to merge 3 commits into
omacom:devfrom
melonamin:dev
Closed

melonamin wants to merge 3 commits into
omacom:devfrom
melonamin:dev

Conversation

@melonamin

@melonamin melonamin commented Aug 12, 2025 •

Copy link
Copy Markdown

Summmary

This PR adds theme support for the Zed editor, allowing Omarchy's theme system to seamlessly integrate with Zed.

What's Changed

  • 11 Zed theme files added:
    • Catppuccin (using official Macchiato variant)
    • Catppuccin Latte (using official theme)
    • Everforest
    • Gruvbox
    • Kanagawa
    • Matte Black
    • Nord
    • Osaka Jade
    • Ristretto
    • Rose Pine
    • Tokyo Night (using official theme)
  • Theme switching integration - Modified omarchy-theme-set to:
    • Create Zed theme symlinks when switching themes
    • Update Zed's settings.json for live theme reloading
    • Support both zed and zeditor command names
  • Installation support - Updated install/desktop/theme.sh to set up initial Zed theme links
  • Migration script - Added migration for existing installations to enable Zed support

Technical Details

  • In Zed selected themes use standardized name "Omarchy Current" for consistency
  • Live reloading via settings.json modification
  • Official themes used where available for better quality (Catppuccin Macchiato, Catpuccin Latte Tokyo Night)
  • Other themes generated from Alacritty color definitions using custom converter

Testing

  • Tested theme switching across all 11 themes
  • Verified live reloading works without restarting Zed
  • Confirmed migration script works for existing installations
  • Created test script for automated screenshot capture

Screenshots

Catppuccin

Catppuccin

Catppuccin Latte

Catppuccin_Latte

Everforest

Everforest

Gruvbox

Gruvbox

Kanagawa

Kanagawa

Matte Black

Matte_Black

Nord

Nord

Osaka Jade

Osaka_Jade

Ristretto

Ristretto

Rose Pine

Rose_Pine

Tokyo Night

Tokyo_Night

Screen Recording

theme_switching_process.mp4

@hamidriaz1998

Copy link
Copy Markdown

Hey @melonamin, thanks for the work here! A few small things I ran into during testing:

  1. json module doesn’t support comments — If settings.json contains any comments (i.e., JSONC), the Python json loader will fail and, when the file is overwritten, it gets reset to just:
{
  "theme": "Omarchy Current"
}
  1. In bin/omarchy-theme-set, lines 43 and 45 reference $THEME_PATH, but I believe they should be using $CURRENT_THEME_DIR.
  2. After switching themes, I observed that Zed doesn’t always reload the theme automatically. As a workaround I ran this to add a newline at the end triggering a reload:
sed -i '$a\' ~/.config/zed/themes/omarchy-current.json

Let me know what you think—happy to help test any fixes or improvements!

… - add touch command to ensure settings reload
@melonamin

Copy link
Copy Markdown
Author

@hamidriaz1998 thanks!

  1. Good catch, I totally forgot that Zed settings are JSONC, replaced python script with sed
  2. I think this is about semantics, now? Because $THEME_PATH is the theme we're switching to.
  3. I didn't face any issues with Zed picking up the changes, but added touch just in case

Let me know if you face any other issues!

@hamidriaz1998

Copy link
Copy Markdown
  1. I think this is about semantics, now? Because $THEME_PATH is the theme we're switching to.

@melonamin
In omarchy-theme-set script:

THEMES_DIR="$HOME/.config/omarchy/themes/"
CURRENT_THEME_DIR="$HOME/.config/omarchy/current/theme"

# Update theme symlinks
ln -nsf "$THEME_PATH" "$CURRENT_THEME_DIR"

This creates a symlink to the currently selected theme's directory.
We can take advantage of that by creating the Zed symlink once, like so:

if (command -v zed &>/dev/null || command -v zeditor &>/dev/null) && [[ -f "$CURRENT_THEME_DIR/zed.json" ]]; then
  mkdir -p ~/.config/zed/themes
  ln -nsf "$CURRENT_THEME_DIR/zed.json" ~/.config/zed/themes/omarchy-current.json

With this approach, ~/.config/zed/themes/omarchy-current.json will always point to the active theme via CURRENT_THEME_DIR, so there’s no need to recreate the Zed symlink every time the theme changes.

but added touch just in case

I tried touchas well, but in my testing it didn’t trigger a reload.
sed worked reliably for me.

@melonamin

Copy link
Copy Markdown
Author

@hamidriaz1998 thanks, now I see what you mean, this is indeed better.

@hamidriaz1998

Copy link
Copy Markdown

@melonamin I am just curious, how did you migrate these themes to zed?

@melonamin

Copy link
Copy Markdown
Author

A couple were copied directly from Zed Themes; they rest were generated from Omarchy Alacrity themes
https://gist.github.com/melonamin/650adaa0f460da1112ced797f71a6d6c

If this gets merged, theme authors can use this script to quickly add support.

@dhh

dhh commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Appreciate this, but I don't want to carry theme support for all the optional editors. I could see this existing as a separate package of some sort, though. We've talked about potentially doing plugins. But by default, themeing is only for the default apps.

@dhh dhh closed this Aug 13, 2025
@melonamin

Copy link
Copy Markdown
Author

@dhh Understandable! I'll enjoy proper Zed themes on my own until we have a plugin manager.

@irae

irae commented Dec 1, 2025

Copy link
Copy Markdown

Appreciate this, but I don't want to carry theme support for all the optional editors. I could see this existing as a separate package of some sort, though. We've talked about potentially doing plugins. But by default, themeing is only for the default apps.

Doesn't this defeat the purpose of having Zed in the Editor category on Omarchy installer?

To have no integration anyone could install Zed from pacman instead. A post install script to do theme integration would be nice. And it is also better security-wise, as I trust Omarchy built-in installer (and potential post install script) more than I trust https://github.com/APS6/omazed, for instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants