/ de-omarchy / bin / omarchy-install-editor-helix
swadhinbiswas Initial de-omarchy: Omarchy UI layer for Arch-based distros · 8/22/2026
9f393b2
29 lines · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

# omarchy:summary=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 "$HOME/.local/state/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 $HOME/.local/state/omarchy/current/theme/helix.toml ]]; then
  omarchy-theme-refresh
fi

# Arch-based distros ship Helix as 'helix' rather than the upstream 'hx'.
if ! grep -q '^alias hx="helix"' ~/.bashrc 2>/dev/null; then
  echo 'alias hx="helix"' >>~/.bashrc
fi