Zalgorithm

Customize builtin Omarchy theme

Related to: notes / Omarchy

Omarchy update 3.3.0 moved the themes directory from ~/.config/omarchy/themes to ~/.local/share/omarchy. The general idea for customizing Omarchy is that dotfiles in ~/.config/ are for the user to customize, files in ~/.local/share/omarchy/ are not expected to be customized.1 Obviously, that’s not enforced, but I think having uncommitted changes in ~/.local/share/omarchy/ will prevent the entire directory from updating with omarchy-update.

Prior to Omarchy version 3.3.0 I’d edited the flexoki-light theme to use https://github.com/nuvic/flexoki-nvim/ instead of https://github.com/kepano/flexoki-neovim .

Rather than committing my changes to ~/.local/share/omarchy/themes/flexoki-light/neovim.lua, I copied my altered version of the theme to ~/.config/omarchy/themes/:

cp -a themes/flexoki-light/ ~/.config/omarchy/themes/flexoki-light-plus

I then restored ~/.local/share/omarchy/themes/flexoki-light/neovim.lua to its previous state:

git restore themes/flexoki-light/neovim.lua

Why have recent Omarchy updates worked when I had uncommitted changes in the local repo?

My concern was with the uncommitted changes in ~/.local/share/omarchy/, the updates to versions 3.3.0, 3.3.1, 3.3.2, and 3.3.3 would have failed to update the entire ~/.local/share/omarchy/ directory:

❯ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   themes/flexoki-light/neovim.lua

no changes added to commit (use "git add" and/or "git commit -a")

After having restored /flexoki-light/neovim.lua to its previous state, it seems that wasn’t the case though:

omarchy on  master
❯ git diff master..origin/master

  1. DHH, “The Omarchy Manual: Dotfiles,” https://learn.omacom.io/2/the-omarchy-manual/65/dotfiles↩︎

Tags: