* Give built-in plugins an honest on/off state Every built-in reported itself enabled no matter what. A bar widget said "enabled" while sitting nowhere near the bar, and disabling a built-in service silently did nothing, because enabled meant "listed in plugins[]" and a built-in never is. Nothing surfaced that, since the only caller listing plugins was the CLI. For a widget, on and off is its place in the bar, so listPlugins reports layout membership -- what enable/disable actually toggles. For everything else built in, loading by default is the right behaviour to keep, so switching one off is recorded the other way round, in disabledPlugins[]. shell.json still carries only the deviation from the defaults: the key is dropped the moment nothing is switched off, leaving a config that never disabled anything byte-identical. isEnabled still answers a separate question -- whether the component loads at all -- and deliberately does not follow a widget out of the bar. omarchy.menu is both a widget and the menu itself, so tying the two together would let taking its button off the bar lock the menu out of the shell, with no way back that isn't the CLI. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Manage plugins from Setup > Plugins Plugins were CLI-only. Setup > Plugins now offers Enable, Disable, Add, and Remove, each list living in the menu itself so picking a row acts on it. Enable and Disable cover the built-ins as well as anything installed -- the bar widgets you can put in the bar, the services and overlays you can switch off. Remove is limited to plugins the user installed, since a built-in has no checkout to delete, and stays hidden until there is one. Whole-bar replacements are left out; those are chosen under Style. Enabling a bar widget asks for a section first, because enabling alone drops it on the right and the only way to move it was a follow-up bar plugin move. The CLI asks the same question after its own add, so both paths place a widget the same way. Add and Remove run in a terminal: one needs a git URL and shows the trust warning before cloning, the other deletes a checkout and prints where it backed it up. Providers grew two hooks for this. placementFor turns a row into a submenu instead of an action, and volatile re-runs the enumeration when its submenu is entered -- picking from these lists is what changes them, and rows a provider no longer returns now drop out instead of lingering forever. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Trim the plugin menu after review Menu.qml carried its own shellQuote while already importing Util and calling Util.shellQuote a few lines up; two copies of the same escaping is one place for a future fix to miss. isDisabled walked the array by hand to compare values it writes itself, and dropDisabled was an eight-line helper with one caller. Two bugs came out of the same pass. A whole-bar replacement belongs under Style rather than these lists, but the exclusion sat in the shared row builder, so a third-party bar could be installed and never removed -- Remove would show an empty list under a guard that said something was there. The exclusion now sits on the two lists that mean it. Rows are keyed by id, and distinct plugin ids can slugify alike: acme.foo, acme_foo and acme-foo all give acme-foo. The merge keeps the first row per id, so the rest simply vanished from the list with nothing to say why. Row ids are now made distinct before merging. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Pick a plugin the way we pick a theme Setup > Plugins listed plugins as menu rows, which needed three providers, a placement submenu, a volatile-refresh hook and a row-swap in the merge. Only Font and Apps are built that way. Theme, Background, Unlock, Timezone and Keybindings all pipe a list into omarchy-menu-select instead, which is one action string and a small script -- so that is what these use now. The trade is search: a plugin name is no longer findable from the root prompt. Neither is a theme name or a timezone, and Enable Plugin still is, so the loss sits where the rest of the menu already puts it. Two pieces of the row machinery stay, because they are worth having for the lists that remain. A volatile provider re-runs when its submenu is entered, so a font installed since the shell started now shows up without restarting it, and rows a provider stops returning drop out. Row ids are still made distinct before merging: Fira Code and Fira-Code both slug to fira-code, and a repeated id was silently dropped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Let a picked option carry an icon Moving the plugin lists onto omarchy-menu-select cost them their glyphs: the select mode has always hardcoded an empty icon, which is why Timezone and Keybindings have none either. An option may now lead with one, as "<glyph><TAB><label>". The menu shows the glyph, filters on the label, and hands the label back, so a caller never strips a glyph off its own selection and a list of plain strings behaves exactly as before. The plugin picker uses it for the puzzle glyph on each plugin and the align glyphs on the sections, which also regain the capitals they lost when the section names were passed through raw. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Switch bars by enabling one A bar option was kept out of Enable and Disable on the grounds that picking which bar to run belongs under Style -- but nothing under Style ever offered it, so an installed bar could be added and removed and never actually put to use. The menu was guarding a door to a room that was never built. Enabling one is the switch. setEnabled already assigns bar.id for a bar option, so a bar has always replaced the one before it; only the picker's filter stood in the way. Dropping it costs nothing else, because enabled for a bar option means active: the bar in use is the one row absent from Enable, every other installed bar is one pick away, and the built-in is just another entry, so going back to it is enabling Bar. Disable keeps the exclusion. That is the one verb a bar cannot answer -- there is no off, only a successor -- and offering it would have listed the built-in bar on a stock system, where turning it off deletes a bar.id that was never set and nothing happens. A bar carries the bar glyph rather than the puzzle one, so a row that replaces the whole bar does not read like one more widget to switch on, and enable now says "Now using X as the bar" instead of "Enabled X", which understated a whole-bar swap in both the enable and the freshly-added path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Refuse a plugin that declares a kind it cannot load A kind is a promise to supply something to load, and the shell reads that something from a fixed key: entryPoints.bar to draw a bar, entryPoints.menu to open a menu. Nothing checked the promise. A manifest could claim kinds ["bar"] with no bar entry point, pass validation, install, and enable -- and then the bar would fall back to the built-in and the widget would be skipped, leaving a plugin that does nothing, explained only by a console.warn nobody reads. Our own plugins have been held to this table by plugins-test.sh all along. This holds third-party ones to the same table, at add and update time, where there is still someone to tell. A kind outside the table is left alone rather than guessed at, so a shell that learns a new kind does not need this list updated first. The cost is that a misspelled kind still installs quietly. omarchy-plugin-validate had no tests; it has some now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Act on the plugin whose row was picked The picker showed a name and then looked that name up again across every plugin, filtered set or not, taking the first match. Two plugins can share a name: cloning one keeps the name it was cloned from, so the documented `omarchy plugin clone omarchy.clock local.clock` leaves two plugins called Clock. Enable listed the clone -- the built-in was already enabled, so only the clone was eligible -- and then enabled omarchy.clock, moving the built-in widget instead. Remove listed the clone and tried to delete a built-in that has no checkout to delete. A row now carries its id alongside its label, and the id is read back off the row that was picked instead of being derived from the name a second time. Where a name is not unique among the rows on offer, the label carries the id too, so two rows that would both say Clock can be told apart at all -- which they could not before, whichever one the pick resolved to. The verb prompt only ever sees the first two fields, so the menu shows what it always did. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Never ask a bar where to sit in the bar A manifest may declare both bar and bar-widget, and validation accepts it. The picker saw bar-widget, asked for a section, and passed it to enable. setEnabled takes bar as the dominant kind: it writes bar.id and returns, adding nothing to any layout, so the move that followed had no widget to find and failed -- after the bar had already been switched. A partial success with an error on the way out. Bar wins ahead of bar-widget now, in the picker and in the placement prompt `plugin add --enable` asks, so a bar is enabled without a placement it cannot use. The CLI refuses a placement on a bar outright, before the bar is switched rather than after, since `omarchy plugin enable <bar> --section left` could reach the same half-applied state without going through either. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Only replacement, no off * Add default placement for bar widgets * Simplify plugin menu actions * Document plugin placement behavior * Allow dropping widgets in empty bar space * Treat plugin dependencies as runtime invariants * Reject duplicate plugin ids on add --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
15 KiB
omarchy-shell
A single long-running Quickshell instance
that hosts the Omarchy desktop. The bar, panels, overlays, menus, and
services all run inside as plugins. IPC is the canonical way for CLIs
to talk to a running shell — omarchy-shell-ipc auto-starts it on
first call.
Plugin manifest
{
"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" }
}
kinds (a manifest may declare more than one):
| Kind | What it is |
|---|---|
bar-widget |
Component the active bar drops into a section |
bar |
Full bar option that can replace omarchy.bar |
panel |
Floating window (e.g. OSD) |
overlay |
Fullscreen overlay (e.g. background picker) |
menu |
Summoned menu surface |
service |
Headless singleton, no UI |
Only one full bar option is active at a time. The built-in omarchy.bar is
used when bar.id is omitted or when a selected third-party bar cannot load.
Panels, overlays, and menus are loaded when summoned. Plugins can set
keepLoaded: true to survive between summons. First-party services are
loaded at startup.
Full schema: shell/services/PluginRegistry.qml.
Installing a third-party plugin
A plugin is a git repo with a manifest.json at its root. Adding one
clones it straight into ~/.config/omarchy/plugins/<id>/; updating is a
fast-forward pull:
omarchy plugin add https://github.com/acme/omarchy-weather.git
omarchy plugin update --all # fetches, shows a diff, fast-forwards
omarchy plugin remove acme.weather
Setup › Plugins offers Enable, Disable, Add, and Remove. Enable and Disable include built-ins as well as installed plugins. Remove is limited to installed plugins, since a built-in has no checkout to delete. Add and Remove open a terminal so their warning, confirmation, and output stay visible.
For a bar widget, on and off means its place in the bar. Everything else is
loaded by default when it is built in, so shell.json records only the
deviation: a third-party plugin you added under plugins[], a built-in you
switched off under disabledPlugins[]. A full bar has no off state: enabling
one replaces the active bar, and it is therefore never offered under Disable.
Bar widgets may set barWidget.defaultSection to left, center, or right;
widgets that omit it default to center.
Plugins run as unsandboxed code inside omarchy-shell. Adding warns you
before cloning, plugins land disabled so you can review the code before
omarchy plugin enable, and updates show a diff before touching anything.
Commands prompt when run bare in a terminal and run unattended when given
arguments — add --yes to skip every prompt (the path for scripts and agents).
You can still install by hand: drop a plugin into
~/.config/omarchy/plugins/<id>/, run omarchy plugin rescan, then
omarchy plugin enable <id>. A bar widget starts in its declared default
section and can be moved with omarchy bar plugin move; enabling a full bar
replaces the one in use.
The lower-level IPC methods remain available through omarchy-shell shell ....
IPC
The shell exposes a shell target plus extra targets registered by
individual plugins (bar, image-selector, …).
| Method | Effect |
|---|---|
ping |
health check |
summon <id> <payloadJson> |
load + open a plugin |
hide <id> |
close a previously-summoned |
toggle <id> <payloadJson> |
summon if closed, hide if open |
call <id> <method> <arg> |
call an already-loaded plugin |
rescanPlugins |
re-walk plugin dirs and hot-reload plugin code |
reloadConfig |
reload shell.json |
setPluginEnabled <id> <"true"|…> |
flip enabled bit (ok / unknown) |
listPlugins |
JSON of every discovered plugin |
setPluginEnabled takes a string; only literal "true" enables.
shell.json
{
"version": 1,
"idle": {
"screensaver": 150,
"lock": 300
},
"bar": {
"id": "omarchy.bar",
"position": "top",
"transparent": false,
"centerAnchor": "calendar",
"fontFamily": "JetBrainsMono Nerd Font",
"layout": {
"left": [ { "id": "omarchy.menu" } ],
"center": [ { "id": "omarchy.clock", "format": "HH:mm" } ],
"right": [ { "id": "omarchy.audio" } ]
}
},
"plugins": [
{ "id": "community.weather-extra" }
]
}
Rules:
- The active bar option is
bar.id. Omit it or set it toomarchy.barfor the built-in bar; set it to a plugin whose manifest declareskind: "bar"to replace the full bar. - Every plugin instance is one entry —
bar.layout.<section>for bar widgets,plugins[]for everything else. - Settings are inline on the entry. No
config:sub-object, no merge layers. - Built-in bar widget ids are namespaced (
omarchy.clock,omarchy.audio, …). The migration rewrites older ids such asClockandAudioPanelforward. - Third-party enabled ⇔ present; for full bar options that means
bar.id. First-party non-bar plugins are always enabled. allowMultiple: truein the manifest permits multiple instances.idle.screensaverandidle.lockare seconds since user idle began.version: 1is required.
config/omarchy/shell.json describes the fresh-install state. When no
user shell.json exists, defaults are used verbatim. Once the user
customizes, shell.json is canonical — there is no deep-merge.
Theme tokens
See theming.md for the full theme/template workflow,
including generated *.tpl files, gradient helpers, and shell border syntax.
Themes ship colors in themes/<name>/colors.toml and surface roles +
sizing in themes/<name>/shell.toml. Defaults are generated from
default/themed/shell.toml.tpl; a theme may also drop a hand-written
shell.toml next to its colors.toml to replace the generated file.
colors.toml uses foreground and background for the foundational
text/background palette, exposed to QML as Color.foreground and
Color.background.
The shell exposes these tokens to QML via two singletons in
qs.Commons:
Color— palette (foreground,background,accent,urgent) and per-surface roles (Color.bar.*,Color.popups.*,Color.tooltip.*,Color.notifications.*,Color.menu.*,Color.launcher.*,Color.imagePicker.*,Color.polkit.*,Color.lock.*). Clipboard and emojis shareColor.menu.*.Style— structural tokens (cornerRadius), shared interactive state tokens/helpers, spacing (Style.spacing.*/Style.space(px)), the type scale (Style.font.*), and bar dimensions (Style.bar.sizeHorizontal/Style.bar.sizeVertical).Border— border-spec helpers for QML surfaces. Use withBorderSurfacefromqs.Uiwhen a border should honor shell theme gradients or per-side widths.Color.<section>.borderis only the flat-color fallback for code that cannot render a real border.
Interactive states
[controls] standardizes reusable control chrome (buttons, dropdowns,
tab strips, etc.) around four states: normal, hover-cursor, focus,
and selected. State colors and border tokens accept palette roles
(foreground, accent, urgent, background) or hex strings; border
values may also be gradients. Fill alpha applies to the state color;
border alpha applies to the state's border token.
Surfaces like [menu], [launcher], and [image-picker] define
their own selected-* tokens and do not inherit from [controls].
[controls] only governs the shared button/dropdown chrome.
| State | Color token | Fill alpha | Border token | Border width | Border alpha |
|---|---|---|---|---|---|
| Normal idle chrome | normal-color |
normal-fill-alpha |
normal-border |
normal-border-width |
normal-border-alpha |
| Hover / keyboard cursor | hover-cursor-color |
hover-cursor-fill-alpha |
hover-cursor-border |
hover-cursor-border-width |
hover-cursor-border-alpha |
| Qt activeFocus | focus-color |
focus-fill-alpha |
focus-border |
focus-border-width |
focus-border-alpha |
| Persistent selected/current | selected-color |
selected-fill-alpha |
selected-border |
selected-border-width |
selected-border-alpha |
The template ships focus-* adjacent to hover-cursor-* with the same
values so mouse hover, keyboard cursor, and tab focus read identically.
Themes that want focus to stand out override the focus-* keys.
Border widths are the theme-level on/off switches for state borders; set
a width to 0 to keep the fill while removing that state border. The
default keeps selected borders off globally (selected-border-width = 0); explicitly bordered controls keep their normal border when selected.
[controls]
# Accent-tinted cursor/focus, foreground-tinted selected state.
hover-cursor-color = "accent"
focus-color = "accent"
selected-color = "foreground"
focus-border = "rgba(33ccffee) rgba(00ff99ee) 45deg"
# Keep selected fills but remove selected-state borders.
selected-border-width = 0
Momentary fills use pressed-fill-alpha for button press feedback and
selection-fill-alpha for text selection. Themes may also provide
pressed-color or selection-color; they fall back to hover-cursor and
foreground respectively.
The section was previously named [style]. Hand-written theme
shell.toml files using the old name still apply — the parser accepts
both [controls] and [style].
Spacing
[spacing] scale multiplies the shell's shared margins, gaps, padding,
control sizes, and panel dimensions. The default is 1.0; values above
1.0 create more breathing room while values below 1.0 make controls
dense. By default scale-with-font = true, so increasing [font] base-size also scales buttons, popup widths, row heights, and panel
padding proportionally.
[spacing]
scale = 1.15
scale-with-font = true # grow controls and panels with [font] base-size
QML components should prefer semantic tokens where possible:
| Token | Default use |
|---|---|
Style.spacing.controlPaddingX / controlPaddingY |
Button and tooltip padding |
Style.spacing.inputPaddingY |
Text-field vertical padding |
Style.spacing.controlHeight / popupRowHeight |
Dropdown and number-field row heights |
Style.spacing.dropdownWidth / searchableDropdownWidth / numberFieldWidth |
Default field widths |
Style.spacing.searchablePopupMinHeight |
Minimum searchable dropdown popup height |
Style.spacing.controlGap |
Gap between icon and label inside controls |
Style.spacing.labelGap |
Label-to-control and compact list gaps |
Style.spacing.rowGap / rowPaddingX |
Form rows and list row content |
Style.spacing.panelGap / panelPadding |
Panel section spacing and interior padding |
Style.spacing.popupPadding |
Popout interior padding |
Popout placement deliberately follows Hyprland's general:gaps_out
(Style.gapsOut) so panels align with tiled windows. Use a theme's
hyprland.lua to change that outer alignment; [spacing] controls the
interior breathing room.
For one-off proportional constants, use Style.space(px) to preserve the
old default at scale 1.0 and base-size = 12 while still responding to
the theme scale and font scale. Use Style.spaceReal(px) only for
fractional geometry that should not be rounded, such as bar widget text
margins. Themes can override any semantic token directly in [spacing],
e.g.:
[spacing]
scale = 1.0
panel-padding = 22
row-gap = 10
Typography
[font] base-size is the rem root for the scale. Every
Style.font.<token> derives from it via a fixed multiplier, so
bumping base-size rescales the whole shell proportionally:
| Token | Multiplier | Default |
|---|---|---|
Style.font.caption |
0.833 | 10 |
Style.font.bodySmall |
0.917 | 11 |
Style.font.body |
1.0 | 12 |
Style.font.subtitle |
1.083 | 13 |
Style.font.title |
1.167 | 14 |
Style.font.heading |
1.333 | 16 |
Style.font.display |
2.0 | 24 |
Style.font.displayLarge |
2.333 | 28 |
Style.font.iconSmall |
bodySmall | 11 |
Style.font.icon |
title | 14 |
Style.font.iconLarge |
1.5 | 18 |
A theme can either scale everything by tweaking base-size:
[font]
base-size = 13 # roomier
…or pin individual tokens for stylistic emphasis without affecting the rest of the scale:
[font]
base-size = 12
heading = 20
display-large = 36
Recognized override keys: base-size, caption, body-small,
body, subtitle, title, heading, display, display-large,
icon-small, icon, icon-large.
base-size has no upper clamp; the shell only floors it at 1px to
avoid nonsensical zero/negative sizes. Per-token overrides aren't clamped
either. The shell font family is the fontconfig monospace alias —
themes don't set it, the user does via omarchy font set <name>.
Bar size
[bar] size-horizontal / size-vertical set the cross-axis dimension
of top/bottom and left/right bars respectively, measured at the default
12px font base. By default scale-with-font = true, so increasing
[font] base-size also increases the bar's cross-axis size:
[bar]
scale-with-font = true
size-horizontal = 26 # top/bottom bar height at base-size 12
size-vertical = 28 # left/right bar width at base-size 12
Set scale-with-font = false to keep those bar sizes as fixed pixels.
Custom bar modules
If a full plugin is overkill, declare a one-off module inline in
bar.layout.<section>:
{ "id": "vpn", "type": "command", "exec": "~/.config/omarchy/bar/scripts/vpn-status",
"interval": 5, "tooltip": "VPN", "onClick": "nm-connection-editor" }
Output is plain text or Waybar-style JSON ({ "text": ..., "tooltip": ..., "class": ... }).
For a custom QML widget:
{ "id": "gpu", "type": "qml" }
Then ~/.config/omarchy/bar/modules/gpu.qml (or set source to point
elsewhere). The module is an Item and receives bar, moduleName,
settings properties. bar exposes foreground / background /
urgent / fontFamily / position / vertical / barSize, plus
run(cmd), shellQuote(v), showTooltip(t, s) / hideTooltip(t),
requestPopout(o) / releasePopout(o).