mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
2.0 KiB
2.0 KiB
Style
- Two spaces for indentation, no tabs
- Use Bash syntax for conditionals:
[[ -f $file ]], not[ -f "$file" ]
Command Naming
All commands start with omarchy-. Prefixes indicate purpose:
cmd-- check if commands exist, misc utility commandspkg-- package management helpershw-- hardware detection (return exit codes for use in conditionals)refresh-- copy default config to user's~/.config/restart-- restart a componentlaunch-- open applicationsinstall-- install optional softwaresetup-- interactive setup wizardstoggle-- toggle features on/offtheme-- theme managementupdate-- update components
Helper Commands
Use these instead of raw shell commands:
omarchy-cmd-missing/omarchy-cmd-present- check for commandsomarchy-pkg-missing/omarchy-pkg-present- check for packagesomarchy-pkg-add- install packages (handles both pacman and AUR)omarchy-hw-asus-rog- detect ASUS ROG hardware (and similarhw-*commands)
Config Structure
config/- default configs copied to~/.config/default/themed/*.tpl- templates with{{ variable }}placeholders for theme colorsthemes/*/colors.toml- theme color definitions (accent, background, foreground, color0-15)
Refresh Pattern
To copy a default config to user config with automatic backup:
omarchy-refresh-config hypr/hyprlock.conf
This copies ~/.local/share/omarchy/config/hypr/hyprlock.conf to ~/.config/hypr/hyprlock.conf.
Migrations
To create a new migration, run omarchy-dev-add-migration --no-edit. This creates a migration file named after the unix timestamp of the last commit.
Migration format:
- No shebang line
- Start with an
echodescribing what the migration does
Example:
echo "Disable fingerprint in hyprlock if fingerprint auth is not configured"
if omarchy-cmd-missing fprintd-list || ! fprintd-list "$USER" 2>/dev/null | grep -q "finger"; then
sed -i 's/fingerprint:enabled = .*/fingerprint:enabled = false/' ~/.config/hypr/hyprlock.conf
fi