Task Guides¶
Deeper instructions for specific kinds of work live in agents/skills/. Read the matching guide before starting:
agents/skills/command-metadata.md- adding or changing commands inbin/agents/skills/install-scripts.md- working underinstall/or on system/user setup commandsagents/skills/mise-tools.md- adding or changing mise-managed toolsagents/skills/shell-dev.md- editing the Quickshell desktop undershell/agents/skills/icon-font.md- adding branded glyphs todefault/fonts/omarchy/omarchy.ttfagents/skills/acceptance-tests.md- writing or running graphical acceptance tests undertest/acceptance.d/agents/skills/oligarchy-tests.md- full omarchy tests that run in qemu to validate behavioragents/skills/motion.md- adding or changing any animation or transition inshell/agents/skills/visual-verification.md- verifying any change with a visual effect in the running UIagents/skills/migrations.md- creating or changing migrations undermigrations/agents/skills/upstream-sync.md- syncing this fork with upstream Omarchy (bin/upstream-sync,default/upstream.toml)
Documentation Layout¶
Three documentation trees, split by genre and audience:
agents/skills/- task procedure ("do this when doing X"), for anyone working on the codebasedocs/- reference on how the system is shaped (file layout, update pipeline, theming, shell architecture), for anyone working on the codebase; skills link here for depthmanual/- end-user documentation for using Omarchy, published; never codebase internals
Brand¶
Product identity lives in default/brand.toml. default/bash/brand.sh loads it. bin/rebrand is the conversion tool.
To rename the project, edit [identity], set [previous] to the identity you are leaving, and run bin/rebrand. Dry-run is the default. bin/rebrand --apply rewrites filenames and text. bin/rebrand --check fails if the previous id remains outside [preserve].
[preserve] is the conflict list: upstream URLs, package names, and Discord channels that are not this fork. [substitute] is for exact strings that should move, such as this repo's clone URL. Binary files are renamed, not rewritten.
Upstream sync¶
This fork diverges from upstream Omarchy and keeps up with it. bin/upstream-sync merges upstream onto a sync branch (status, plan, merge, decline, check, finish), default/upstream.toml is the policy (what to follow, the fork-owned paths, what to decline), and .upstream/ledger.tsv records every upstream change taken or declined, and why. An agent following agents/skills/upstream-sync.md makes the calls, daily via .github/workflows/upstream-sync.yml (on when the repo variable UPSTREAM_SYNC_ENABLED is true), and opens one pull request that a person merges.
Source stays in upstream's naming so syncs stay mergeable; bin/rebrand applies the brand to builds. Don't run bin/rebrand --apply on the tree.
Layers¶
A product built on this framework (bashOS is the first) adds its own setup as a layer: install/layers/<name>/system.sh and user.sh, copied in by the product's build and run last by the installer. Nothing lives under install/layers/ in this repo. docs/layers.md is the contract; change the framework there rather than inside a layer.
Style¶
- In markdown documents (
plans/,docs/,manual/), write full lines — no hard wrapping at 80 columns; break only at structural boundaries like headings and list items - Two spaces for indentation, no tabs
- Use bash 5 conditionals: use
[[ ]]for string/file tests and(( ))for numeric tests - In
[[ ]], don't quote variables, but do quote string literals when comparing values (e.g.,[[ $branch == "dev" ]]) - Prefer
(( ))over numeric operators inside[[ ]](e.g.,(( count < 50 )), not[[ $count -lt 50 ]]) - Prefer a full
if/elseconditional for simple two-path control flow; don't rely onexecorexitin one branch to make following statements unreachable - For strings/paths with spaces, quote them instead of escaping spaces with
\(e.g.,"$APP_DIR/Disk Usage.desktop", not$APP_DIR/Disk\ Usage.desktop) - Shebangs must use
#!/bin/bashconsistently (never#!/usr/bin/env bash). A security-sensitive entrypoint may use the exact#!/bin/bash -pform only when it must suppressBASH_ENVand exported-function startup injection before its first command; that exception must be explained at the boundary and covered by a regression that rejects an ordinary Bash launch with a decoy-pargument. - Scripts under
install/andmigrations/may be sourced and intentionally omit shebangs
Command Naming¶
All commands start with omarchy-. Prefixes indicate purpose.
The authoritative list of user-facing command groups lives in bin/omarchy in GROUP_DESCRIPTIONS. Keep GROUP_DESCRIPTIONS updated when adding a new command prefix users are meant to browse to.
A group whose commands are all # omarchy:hidden=true gets no entry. That table drives the top-level group listing on its own, so an entry there advertises the group even when every command in it is hidden. apply- and provision- are deliberately absent for that reason; both still route, and omarchy <group> still prints a group header without one.
Common prefixes include:
cmd-- check if commands exist, misc utility commandscapture-- screenshots, screen recordings, and other capture toolspkg-- 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
Do not maintain a second exhaustive prefix list here. Consult GROUP_DESCRIPTIONS when selecting or checking a command group so this guidance does not drift from the router.
Runtime Environment¶
$OMARCHY_PATHis set at the top level by the uwsm session environment and is always available to Omarchy runtime code.- Commands in
bin/and Quickshell QML should rely on$OMARCHY_PATH/Quickshell.env("OMARCHY_PATH"); do not derive fallback paths fromHOME,Quickshell.shellDir, or re-export/defaultOMARCHY_PATHmanually.
Platforms¶
Omarchy runs on x86 and aarch64 (ARM). A platform name is the CPU architecture, then a hardware family only when that family needs handling of its own:
x86- every x86_64 machineaarch64- every ARM machine without a family of its own (Raspberry Pis and ARM VMs today)aarch64-apple- Apple Silicon Macsaarch64-qualcomm- Snapdragon laptopsaarch64-n1x- NVIDIA N1x laptopsaarch64-gb10- NVIDIA GB10 desktops (DGX Spark, ASUS Ascent GX10)
A new family is named aarch64-<family> (e.g. aarch64-qualcomm, aarch64-n1x) and is added only once it needs code of its own, so aarch64* always means ARM. omarchy-hw-platform prints the most specific name. Use these exact names wherever a platform is named: package lists, pacman template directories, image manifests, dispatch registration, tests and docs. Never introduce generic, arm64, apple-silicon or other spellings; the old apple-silicon, generic-aarch64 and generic are read only for compatibility with older image builders.
Ask a helper; don't read uname -m or the device tree in feature code:
omarchy-hw-x86/omarchy-hw-aarch64- the CPU architecture. Use them for binary and ABI availability: a package with no aarch64 build, an x86 guest VM, multilib.omarchy-hw-aarch64-apple,omarchy-hw-aarch64-qualcomm,omarchy-hw-aarch64-n1x,omarchy-hw-aarch64-gb10(one per family) - built onomarchy-hw-platform, image-build aware. Use them for hardware behaviour that the whole family shares; a single model's quirks stay behindomarchy-hw-matchon its DMI name, or behindomarchy-hw-match-device-treeon its device-tree compatible string where models share a DMI name.omarchy-hw-apple-siliconandomarchy-hw-n1xare hidden aliases kept for the omarchy-mac packages and older N1x images; don't use them in new code.
Where platform code lives:
- Packages:
install/omarchy-base.packagesfor everyone,install/omarchy-aarch64.packagesfor every ARM machine,install/omarchy-<platform>.packagesfor one family, and base packages with no aarch64 build ininstall/omarchy-x86_64-only.packages.omarchy-pkg-defaultscomposes them. - Pacman templates:
default/pacman/for x86,default/pacman/<platform>/for each ARM platform. - Hardware setup:
install/hardware/<vendor-or-family>/, gated by a predicate.install/hardware/apple/holds Intel Mac quirks; Apple Silicon's own setup ships in the omarchy-mac packages. - Boot chains Omarchy can't drive generically: a platform package behind
omarchy-lifecycle-dispatch(docs/lifecycle-dispatch.md). Platforms that boot Limine with UKIs like x86 keep the generic path.
The experience should be the same on every platform. When a package or feature is missing or broken on one, the default is to get it fixed upstream (an aarch64 build, a bug report, a patch to the maintainer) and leave the gap visible meanwhile, not to paper over it. When asked for a platform workaround, say so and propose the upstream fix first. Hiding a menu entry or skipping a package is fine only for things that can't exist there (an x86 guest VM, an x86-only proprietary binary). Alternative packages and platform-only replacements are a last resort, used only when upstream can't or won't fix it, with the reason written next to the code.
Privileged Commands¶
- Follow the "Privilege Escalation" section of
default/agents/skills/omarchy/SKILL.md. It draws thesudo/pkexecline by whether the caller has a terminal to enter a password in, and the repo's own scripts follow it.
Git¶
- Commits should be atomic: include only one coherent change or fix, and do not mix unrelated work.
- Commit messages should be succinct and describe the change being made.
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 packages (don't use these if you can just useomarchy-pkg-add/omarchy-pkg-drop)omarchy-pkg-add- install packages from the configured pacman repos, Omarchy's included; useomarchy-pkg-aur-addfor AUR packagesomarchy-pkg-drop- remove packages; use this instead of rawpacman -R*omarchy-notification-send- send desktop notifications; do not callnotify-senddirectlyomarchy-hw-asus-rog- detect ASUS ROG hardware (and similarhw-*commands)
Commands installed by Omarchy's default package set are runtime invariants. Invoke them directly; do not add defensive omarchy-cmd-present / omarchy-cmd-missing checks around them. Use command-presence helpers only for genuinely optional dependencies or code that can run before the default package set is installed.
Exceptions are allowed for migration and package-helper scripts where the helper may not be available yet, where the helper itself is being implemented, or where direct package-manager behavior is required.
Background Work¶
- Long-running code (the shell, daemons, watchers) reacts to events instead of polling with a timer. Polling is the last resort, for state with no change signal;
agents/skills/shell-dev.mdlists the event sources and the push-refresh pattern. test/shell.d/shell-idle-spawn-test.shfails when an idle shell starts any process, and other tests hold the router, menu guards and theme switch to budgets; see "Performance guards" indocs/testing.md.
Menu¶
- The menu definition lives in
default/omarchy/omarchy-menu.jsonc;docs/menu.mdcovers the schema, guards, and providers. - Do not add
aliasesto new menu entries. Aliases are reserved for established alternate names users already type, kept for compatibility.
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, red/green/yellow/blue/magenta/cyan and bright_* variants)
Tests¶
Run focused automated tests for the area you changed; docs/testing.md covers how the suites are shaped. Current test entry points:
./test/all- aggregate runner for CLI and shell tests; it intentionally does not run graphical acceptance tests./test/cli- CLI routing, command metadata, theme helpers, and safe dispatch coverage./test/shell- all Omarchy shell tests undertest/shell.d/
How to run them without wasting runs:
- Run the files for what you changed directly:
bash test/shell.d/<area>-test.sh. A change inside one plugin or command runs that area's files (andi18n-test.shwhen catalog strings changed), not./test/shell. - Run
./test/shellor./test/allonly when the change reaches shared code (shell/Commons/,base-test.sh, the runners, a widely usedbin/helper), and then once, at the end. - Always write the whole output to a log file and read it from there:
bash test/shell.d/<area>-test.sh >/tmp/<area>.log 2>&1. Never pipe a test run straight throughgrep,headortail: what they drop is gone, and getting it back costs a whole run../test/shellkeeps every file's log and prints the directory at the end; read a failure from its log. - Run a test again only after changing something it covers. Never rerun to see output, to confirm a pass, or in the hope that a failure goes away.
- For a failure in a file you did not touch, run that one file once on the base branch (in a worktree, or with
git stash). If it fails there too, it was already broken: report it and leave it out of this change. - Tests that use the live session (
require_compositor,shell-idle-spawn-test.sh) read the real desktop, so the user working at it can fail them. One that fails in a full run and passes alone is session noise: say so; do not loop on it.
When to add a test. A test earns its place only by catching a regression nothing else would; every one costs a maintainer to read and everyone a slower suite. Before writing one, name the breakage it would catch. If the answer is "someone edits the line I just added", don't write it.
- No test for a small declarative change: a menu row, a config value, a package-list entry, a string, a rename. Those need no test of their own, and certainly not a new file.
- Don't restate the implementation: grepping the source or config for the string you just added, asserting a value equals itself, or re-reading the file you edited to confirm the edit is there.
- A test must fail without your change. Revert the fix, or reason it through, and check that the test goes red for the reason the change exists. One that stays green guards nothing.
- Don't test your own stub. If a fake binary or fixture the test writes provides the behaviour under test, nothing real is tested.
- No change-detectors: snapshots of large output, file lists, or exact counts that break whenever someone adds an unrelated entry.
- Extend the area's existing test file (
git grepthe command or function undertest/) rather than adding a new*-test.sh, and follow its style. - Keep tests in proportion to the change. A few lines of change rarely justify more than a few lines of test, and usually none.
- No test for a migration. It runs once and is frozen once it ships; test logic it needs by moving that logic into a
bin/command. - Do test real logic: parsing, routing, a guard on hardware without the feature, the edge case a fix handles. A bug fix with logic in it gets the one test that fails on the base branch and passes with the fix.
New Omarchy shell tests should live in test/shell.d/*-test.sh so ./test/shell picks them up automatically. Source test/shell.d/base-test.sh for shared root-path discovery, assertions, and Node test helpers.
The graphical acceptance suite runs in a disposable VM, not in the active development session; see agents/skills/acceptance-tests.md.
Visual changes must be verified in the running UI in addition to automated tests; follow agents/skills/visual-verification.md.
Refresh Pattern¶
To copy a default config to user config with automatic backup:
This copies $OMARCHY_PATH/config/hypr/hyprland.lua to ~/.config/hypr/hyprland.lua. The argument is interpolated into both paths and only checked with [[ -e ]], so pass a plain relative path: a name containing .. resolves and copies, landing outside ~/.config rather than being rejected.