Omarchy
repository·quattro·Indexed 12 days ago
https://github.com/basecamp/omarchyA modern, opinionated Linux distribution and desktop environment hosted within a single Quickshell instance. It features a plugin-based architecture for UI components and background services, including a highly customizable bar that supports custom Command and QML modules, a dedicated CLI for plugin management, and a suite of first-party plugins for system monitoring, notifications, and connectivity.
What's inside Omarchy
- Omarchy is a modern, opinionated Linux distribution created by DHH. For more detailed information, documentation, and resources, visit the official website at omarchy.org.
Overview of the Omarchy shell architecture
quattroThe
omarchy-shellis a single, long-running Quickshell instance that hosts the entire Omarchy desktop environment. Instead of running separate processes for the bar, background switcher, panels, and overlays, everything runs as a plugin inside this single shell process.Benefits of the single-shell model:
- Shared Services: Singletons and services live once in memory rather than once per process.
- Low Latency: Summoning a panel is a lightweight IPC call to an existing process, avoiding the cold start of a new
quickshellinstance. - Extensibility: Third-party plugins can be loaded from disk without modifying the core Omarchy source code.
Note on Omarchy 4.0 upgrades
quattroUpgrading to Omarchy 4.0 is handled via a specific command, not the standard migration runner. Do not write compatibility migrations for old installer layouts; those transitions should be implemented within thebin/omarchy-upgrade-to-quattrocommand.Understand First-party Plugins
quattroFirst-party plugins are built-in components that ship with Omarchy and are automatically discovered by the shell at startup.
Key Characteristics:
- Discovery: They use the standard
manifest.jsoncontract but are flagged with__isFirstParty: true. - Lifecycle: Non-bar plugins are enabled by default unless explicitly listed in the
disabledPlugins[]configuration. Services and 'keep-loaded' panels mount at startup, while other panels, overlays, and menus load on demand. - Bar Behavior:
omarchy.baris the default bar. It only becomes inactive if another plugin withkind: "bar"is selected. - Storage: While first-party plugins reside in the system directory, user-installed plugins are located at
~/.config/omarchy/plugins/<plugin-id>/.
- Discovery: They use the standard
Understand the Omarchy file layout and package structure
quattroOmarchy uses a two-package system to manage the transition from system-level configuration to user-level runtime environments:
omarchypackage: Contains runtime binaries (/usr/bin/omarchy-*), installation/finalization scripts, migrations, themes, and the Quickshell desktop. It depends onomarchy-settings.omarchy-settingspackage: Contains everything required before the main package installs. This includes/etc/skel/defaults, system-wide/etc/drop-ins, fonts, branding, bootloader (limine) and snapshot (snapper) configurations, and debug binaries (omarchy-debug,omarchy-debug-idle,omarchy-upload-log).
User Home Directory ($HOME) Population Layers
- Seed:
omarchy-settingsprovides static defaults via/etc/skel/. These are copied to$HOMEonly during user creation (viauseradd -m). - Finalize:
omarchy-finalize-userruns once per user to handle tasks requiring$HOMEexpansion, runtime detection, or environment variables like$OMARCHY_PATH. - Resync:
omarchy-reinstall-configsis a destructive command used by existing users to reset their configurations back to the shipped defaults.
How speaker tunings interact with the audio graph
quattroUnderstanding the audio routing is critical for developers working with Omarchy audio components:
- Volume Control: Volume lives downstream of the tuning. The tuning acts as a virtual sink that becomes the default output. Changing the system volume alters the level going into the processing.
omarchy-audio-output-sinkis used to resolve the physical sink through any DSP layers. - Sink Visibility: The physical speaker sink is hidden from the user to prevent bypassing the tuning.
omarchy-audio-sink-availabilityreports it as unavailable, andomarchy-audio-output-switchskips it. - Stream Movement: To prevent audio processing from being accidentally moved to headphones or causing feedback loops, the tuning sets
node.dont-move.omarchy-audio-output-set-defaultis designed to only move streams that carry anapplication.name.
- Volume Control: Volume lives downstream of the tuning. The tuning acts as a virtual sink that becomes the default output. Changing the system volume alters the level going into the processing.
Understand the Omarchy environment bootstrap process
quattroOmarchy uses a single source of truth for environment variables, specifically
OMARCHY_PATHand a dev-link-awarePATH, located at/usr/share/omarchy/default/bash/env-bootstrap.Key Behaviors
OMARCHY_PATH: Defaults to/usr/share/omarchy. If a developer usesomarchy-dev-link, this value is updated via/etc/omarchy.confto point to the development checkout.PATH: Prepends$OMARCHY_PATH/binto the systemPATHonly ifOMARCHY_PATHis not the production/usr/share/omarchypath. This allows developers to run local versions of omarchy binaries.sudocompatibility: To ensuresudo omarchy-*works for unreleased binaries in a dev environment,omarchy-dev-linkwrites a drop-in to/etc/sudoers.d/omarchy-dev-pathwhich updates thesecure_path.
Sourcing Points
The bootstrap script is sourced by:
/etc/profile.d/omarchy.sh(system login shells)/etc/skel/.bashrc(interactive shells)/usr/share/uwsm/env.d/10-omarchy(Hyprland via uwsm)/usr/share/omarchy/default/bash/envs(SSH / non-login bash)
How omarchy handles system-owned /etc files via etc-overrides/
quattroTo avoid file conflicts with upstream Arch packages, Omarchy does not install directly over certain files in
/etc/(e.g.,.bashrc,nsswitch.conf,os-release).Instead, these files are stored in
/usr/share/omarchy/etc-overrides/. Theomarchy-settingspackage usespost_installorpost_upgradescriptlets tocp -fthese files into their proper locations in/etc/.Note: Any manual edits made to these files by the user will be overwritten whenever
omarchy-settingsis upgraded.How omarchy-shell and plugins work together
quattroThe
omarchy-shellis a long-running Quickshell instance that hosts the Omarchy desktop environment. All desktop components—including the bar, panels, overlays, menus, and services—are implemented as plugins.Plugins are categorized by
kinds, which determine how the shell manages them:bar-widget: A component that the active bar drops into a specific section (left,center, orright).bar: A full bar option that can replace the built-inomarchy.bar. Only one full bar is active at a time.panel: A floating window (e.g., an On-Screen Display).overlay: A fullscreen overlay (e.g., a background picker).menu: A summoned menu surface.service: A headless singleton with no UI, typically loaded at startup.
Panels, overlays, and menus are loaded when summoned, but plugins can set
keepLoaded: trueto remain in memory between summons. First-party services are loaded automatically at startup.{ "schemaVersion": 1, "id": "my.org.cool-clock", "name": "Cool clock", "version": "1.0.0", "author": "You", "description": "A clock that does cool things", "kinds": ["bar-widget"], "entryPoints": { "barWidget": "Widget.qml" } }Understand the Omarchy migration model
quattroOmarchy migrations are one-time repair scripts used when package updates require state changes that
pacmancannot manage (e.g., modifying~/.config, user systemd units, or database state).Key characteristics:
- Location: Scripts are stored in
migrations/*.sh. - Execution: They run as the current user via
omarchy-migrate. - Per-user state: Completion is tracked per-user in
~/.local/state/omarchy/migrations/<migration filename>. This means every user on a machine must run the migrations individually. - Idempotency Requirement: Migrations must be idempotent. If a migration performs a machine-wide repair, it must detect if that repair was already completed by another user and skip the operation to avoid side effects.
- Location: Scripts are stored in
Understand the Omarchy shell configuration and persisted state
quattroOmarchy uses a single user configuration file to manage all customizations, including layout, per-entry settings, and the list of enabled plugins.
Important Behavior:
- If
~/.config/omarchy/shell.jsondoes not exist, the shell uses shipped defaults. - Once you customize anything,
shell.jsonbecomes the authoritative source. The shell does not deep-merge defaults back into your custom file; it uses your file as-is.
File Locations:
~/.config/omarchy/shell.json: Stores full layout, per-entry settings, and enabled plugin list.~/.config/omarchy/plugins/<id>/: Directory for user-provided third-party plugin source files.
{ "version": 1, "idle": { "screensaver": 150, "lock": 300 }, "bar": { "id": "omarchy.bar", "position": "top", "transparent": false, "centerAnchor": "omarchy.clock", "layout": { "left": [ { "id": "omarchy.menu" }, { "id": "omarchy.workspaces" } ], "center": [ { "id": "omarchy.clock", "format": "HH:mm" } ], "right": [ { "id": "omarchy.audio" } ] } }, "plugins": [] }- If
Requirements and best practices for tuning graphs
quattroWhen designing a
filter-chain.conf, adhere to these two critical rules to prevent hardware damage or audio artifacts:- End in a limiter: Ensure all peaks stay below 0 dBFS with sufficient headroom.
- Respect driver limits: Do not boost frequencies that the physical drivers cannot deliver. For example, the XPS 14 tuning cuts 40 Hz by ~18 dB to avoid distortion caused by excessive excursion.
Compatibility Note: EasyEffects cannot coexist with an Omarchy tuning. Because EasyEffects reroutes streams to its own sink, it will bypass the tuning's filter-chain. The
omarchy audio tuning oncommand will refuse to run if EasyEffects is active.