Theme Helix with the current Omarchy theme (#5530)

Helix had no theme integration. Installing it from the menu just ran
omarchy-pkg-add and left the editor on whatever default theme it shipped
with, regardless of the active Omarchy palette.

This adds `default/themed/helix.toml.tpl` so the template
renderer produces a helix.toml on every theme switch, and
`omarchy-install-helix` that wires Helix up:
  - install the package
  - symlink `~/.config/helix/themes/omarchy.toml` at the rendered theme
  - seed a config.toml selecting that theme when the user has none

The install menu routes Helix through this script. omarchy-restart-helix
joins omarchy-theme-set and signals Helix with SIGUSR1 so theme changes
are live [[1]], the same way as other packages. Arch-based distros
package the binary as 'helix' rather than upstream 'hx', so the new
scripts target 'helix' and the installer ends with a hint about aliasing
'hx'.

[1]: https://docs.helix-editor.com/configuration.html
Ref: https://github.com/basecamp/omarchy/discussions/4986
This commit is contained in:
Luke Hsiao
2026-05-01 18:17:07 +02:00
committed by GitHub
parent 7f1071298c
commit 3ce6e98022
5 changed files with 167 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
# Install Helix and configure it to use the current Omarchy theme.
echo "Installing Helix..."
omarchy-pkg-add helix
mkdir -p ~/.config/helix/themes
# Symlink the rendered Omarchy theme so Helix tracks the active theme
ln -sf ~/.config/omarchy/current/theme/helix.toml ~/.config/helix/themes/omarchy.toml
# Only seed a config.toml if the user does not already have one
if [[ ! -f ~/.config/helix/config.toml ]]; then
cat >~/.config/helix/config.toml <<'EOF'
theme = "omarchy"
EOF
fi
# Ensure the symlink target exists for users whose current theme predates this template
if [[ ! -e ~/.config/omarchy/current/theme/helix.toml ]]; then
omarchy-theme-refresh
fi
echo -e "\nArch-based distros ship Helix as 'helix' rather than the upstream 'hx'. Alias 'hx' to 'helix' in your shell configuration if you prefer the shorter command."
+1 -1
View File
@@ -352,7 +352,7 @@ show_install_editor_menu() {
*Cursor*) install_and_launch "Cursor" "cursor-bin" "cursor" ;;
*Zed*) install_and_launch "Zed" "zed" "dev.zed.Zed" ;;
*Sublime*) install_and_launch "Sublime Text" "sublime-text-4" "sublime_text" ;;
*Helix*) install "Helix" "helix" ;;
*Helix*) present_terminal omarchy-install-helix ;;
*Emacs*) install "Emacs" "emacs-wayland" && systemctl --user enable --now emacs.service ;;
*) show_install_menu ;;
esac
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
# Reload Helix configuration (used by the Omarchy theme switching).
if pgrep -x helix >/dev/null; then
pkill -USR1 helix
fi
+1
View File
@@ -57,6 +57,7 @@ omarchy-restart-hyprctl
omarchy-restart-btop
omarchy-restart-opencode
omarchy-restart-mako
omarchy-restart-helix
# Change app-specific themes
omarchy-theme-set-gnome