Replace bar-settings with unified settings plugin

Consolidates bar-settings into a single 'settings' plugin with sidebar
categories: Defaults, Style, Bar, System, Plugins. Updates supporting
commands (omarchy-launch-settings, omarchy-style-corners-quickshell,
omarchy-theme-list-with-previews, omarchy-hyprland-monitor-scaling-set)
and refreshes sidebar glyphs to Nerd Font icons.
This commit is contained in:
Ryan Hughes
2026-05-14 02:25:05 -04:00
parent e54648dfd5
commit c7da0f74aa
27 changed files with 3023 additions and 1596 deletions
+5 -30
View File
@@ -1,20 +1,15 @@
#!/bin/bash
# omarchy:summary=Cycle focused Hyprland monitor scaling through 1x, 1.25x, 1.6x, 2x, 3x, and 4x
# omarchy:args=[--reverse]
# omarchy:examples=omarchy-hyprland-monitor-scaling-cycle | omarchy-hyprland-monitor-scaling-cycle --reverse
MONITOR_INFO=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true)')
ACTIVE_MONITOR=$(echo "$MONITOR_INFO" | jq -r '.name')
CURRENT_SCALE=$(echo "$MONITOR_INFO" | jq -r '.scale')
WIDTH=$(echo "$MONITOR_INFO" | jq -r '.width')
HEIGHT=$(echo "$MONITOR_INFO" | jq -r '.height')
REFRESH_RATE=$(echo "$MONITOR_INFO" | jq -r '.refreshRate')
CURRENT_SCALE=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .scale')
# Cycle through monitor/GDK scale pairs: 1 → 1.25 → 1.6 → 2 → 3 → 4 → 1 (or reverse with --reverse)
SCALES=(1 1.25 1.6 2 3 4)
GDK_SCALES=(1 1.25 1.75 2 3 4)
# Find the index of the scale closest to the current one (Hyprland may
# snap fractional scales to nearby values, so we can't match exactly)
# snap fractional scales to nearby values, so we can't match exactly).
CURRENT_IDX=$(awk -v s="$CURRENT_SCALE" -v list="${SCALES[*]}" 'BEGIN {
n = split(list, arr, " ")
best = 0; best_diff = 1e9
@@ -31,24 +26,4 @@ else
NEW_IDX=$(( (CURRENT_IDX + 1) % ${#SCALES[@]} ))
fi
NEW_SCALE=${SCALES[$NEW_IDX]}
NEW_GDK_SCALE=${GDK_SCALES[$NEW_IDX]}
hyprctl eval "hl.monitor({ output = \"$ACTIVE_MONITOR\", mode = \"${WIDTH}x${HEIGHT}@${REFRESH_RATE}\", position = \"auto\", scale = $NEW_SCALE })" >/dev/null
# Persist to monitors.lua if the user still has Omarchy's generic catch-all
# defaults, so the scale survives reboots.
MONITOR_LUA="$HOME/.config/hypr/monitors.lua"
if [[ -f $MONITOR_LUA ]] && grep -q '^local omarchy_monitor_scale = ' "$MONITOR_LUA"; then
sed -i -E \
-e "s|^local omarchy_monitor_scale = .*|local omarchy_monitor_scale = ${NEW_SCALE}|" \
-e "s|^local omarchy_gdk_scale = .*|local omarchy_gdk_scale = ${NEW_GDK_SCALE}|" \
"$MONITOR_LUA"
elif [[ -f $MONITOR_LUA ]] && grep -Eq '^hl\.monitor\(\{ output = "", mode = "preferred", position = "auto", scale = ("auto"|[0-9.]+) \}\)' "$MONITOR_LUA"; then
sed -i -E \
-e "s|^(hl\.monitor\(\{ output = \"\", mode = \"preferred\", position = \"auto\", scale = )([^ ]+)( \}\))|\\1${NEW_SCALE}\\3|" \
-e 's|^hl\.env\("GDK_SCALE", ".*"\)|hl.env("GDK_SCALE", "'"$NEW_GDK_SCALE"'")|' \
"$MONITOR_LUA"
fi
notify-send -u low "󰍹 Display scaling set to ${NEW_SCALE}x"
exec omarchy-hyprland-monitor-scaling-set "${SCALES[$NEW_IDX]}"
+45
View File
@@ -0,0 +1,45 @@
#!/bin/bash
# omarchy:summary=Set focused Hyprland monitor scaling to a specific value
# omarchy:args=<1|1.25|1.6|2|3|4>
# omarchy:examples=omarchy-hyprland-monitor-scaling-set 1.6 | omarchy-hyprland-monitor-scaling-set 2
NEW_SCALE="$1"
case "$NEW_SCALE" in
1) NEW_GDK_SCALE=1 ;;
1.25) NEW_GDK_SCALE=1.25 ;;
1.6) NEW_GDK_SCALE=1.75 ;;
2) NEW_GDK_SCALE=2 ;;
3) NEW_GDK_SCALE=3 ;;
4) NEW_GDK_SCALE=4 ;;
*)
echo "Usage: omarchy-hyprland-monitor-scaling-set <1|1.25|1.6|2|3|4>" >&2
exit 1
;;
esac
MONITOR_INFO=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true)')
ACTIVE_MONITOR=$(echo "$MONITOR_INFO" | jq -r '.name')
WIDTH=$(echo "$MONITOR_INFO" | jq -r '.width')
HEIGHT=$(echo "$MONITOR_INFO" | jq -r '.height')
REFRESH_RATE=$(echo "$MONITOR_INFO" | jq -r '.refreshRate')
hyprctl eval "hl.monitor({ output = \"$ACTIVE_MONITOR\", mode = \"${WIDTH}x${HEIGHT}@${REFRESH_RATE}\", position = \"auto\", scale = $NEW_SCALE })" >/dev/null
# Persist to monitors.lua if the user still has Omarchy's generic catch-all
# defaults, so the scale survives reboots.
MONITOR_LUA="$HOME/.config/hypr/monitors.lua"
if [[ -f $MONITOR_LUA ]] && grep -q '^local omarchy_monitor_scale = ' "$MONITOR_LUA"; then
sed -i -E \
-e "s|^local omarchy_monitor_scale = .*|local omarchy_monitor_scale = ${NEW_SCALE}|" \
-e "s|^local omarchy_gdk_scale = .*|local omarchy_gdk_scale = ${NEW_GDK_SCALE}|" \
"$MONITOR_LUA"
elif [[ -f $MONITOR_LUA ]] && grep -Eq '^hl\.monitor\(\{ output = "", mode = "preferred", position = "auto", scale = ("auto"|[0-9.]+) \}\)' "$MONITOR_LUA"; then
sed -i -E \
-e "s|^(hl\.monitor\(\{ output = \"\", mode = \"preferred\", position = \"auto\", scale = )([^ ]+)( \}\))|\\1${NEW_SCALE}\\3|" \
-e 's|^hl\.env\("GDK_SCALE", ".*"\)|hl.env("GDK_SCALE", "'"$NEW_GDK_SCALE"'")|' \
"$MONITOR_LUA"
fi
notify-send -u low "󰍹 Display scaling set to ${NEW_SCALE}x"
-8
View File
@@ -1,8 +0,0 @@
#!/bin/bash
# omarchy:summary=Launch the Omarchy bar customizer
# omarchy:group=launch
# omarchy:name=bar-settings
# omarchy:examples=omarchy launch bar-settings
exec omarchy-shell-ipc shell summon omarchy.bar-settings "{}"
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# omarchy:summary=Launch the Omarchy settings panel
# omarchy:group=launch
# omarchy:name=settings
# omarchy:args=[bar|plugins|defaults|style]
# omarchy:examples=omarchy launch settings | omarchy launch settings defaults | omarchy launch settings style
category="${1:-}"
payload="{}"
case "$category" in
bar|plugins|defaults|style)
payload=$(printf '{"category":"%s"}' "$category")
;;
"")
;;
*)
echo "Usage: omarchy-launch-settings [bar|plugins|defaults|style]" >&2
exit 1
;;
esac
exec omarchy-shell-ipc shell summon omarchy.settings "$payload"
+1 -1
View File
@@ -11,7 +11,7 @@ Starts omarchy-shell if not running, then forwards a quickshell ipc call.
Examples:
omarchy-shell-ipc shell ping
omarchy-shell-ipc shell summon omarchy.bar-settings "{}"
omarchy-shell-ipc shell summon omarchy.settings "{}"
omarchy-shell-ipc shell hide omarchy.image-picker
omarchy-shell-ipc shell listPlugins
omarchy-shell-ipc shell listShellConfig
+2 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# omarchy:summary=Set Hyprland, Hyprlock, Mako, and Walker corners to sharp or round
# omarchy:summary=Set Hyprland, Hyprlock, Mako, Walker, and Quickshell corners to sharp or round
# omarchy:args=<sharp|round>
# omarchy:examples=omarchy style corners round | omarchy style corners sharp
@@ -13,6 +13,7 @@ omarchy-style-corners-hyprland "$1"
omarchy-style-corners-hyprlock "$1"
omarchy-style-corners-mako "$1"
omarchy-style-corners-walker "$1"
omarchy-style-corners-quickshell "$1"
case $1 in
sharp) omarchy-notification-send "Sharp corners enabled" -g 󰝣 ;;
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
# omarchy:summary=Set or toggle corner radius for the omarchy-shell menu and settings panel
# omarchy:args=[toggle|sharp|round]
# omarchy:examples=omarchy style corners quickshell toggle | omarchy style corners quickshell round | omarchy style corners quickshell sharp
STYLE_FILE="$HOME/.local/state/omarchy/toggles/quickshell-menu.json"
current_radius() {
[[ -f $STYLE_FILE ]] || { echo 0; return; }
local r
r=$(grep -oE '"radius"[[:space:]]*:[[:space:]]*[0-9]+' "$STYLE_FILE" | grep -oE '[0-9]+$')
echo "${r:-0}"
}
set_radius() {
local radius="$1"
mkdir -p "$(dirname "$STYLE_FILE")"
printf '{ "radius": %s }\n' "$radius" >"$STYLE_FILE"
}
case "${1:-toggle}" in
round) set_radius 6 ;;
sharp) set_radius 0 ;;
toggle)
if (( $(current_radius) > 0 )); then
set_radius 0
else
set_radius 6
fi
;;
*)
echo "Usage: omarchy-style-corners-quickshell [toggle|sharp|round]"
exit 1
;;
esac
+1 -9
View File
@@ -10,15 +10,7 @@ set_radius() {
local radius="$1"
mkdir -p "$(dirname "$TOGGLES_CSS")"
touch "$TOGGLES_CSS"
if grep -q '^ border-radius:' "$TOGGLES_CSS"; then
sed -i "s/^ border-radius:.*/ border-radius: ${radius}px;/" "$TOGGLES_CSS"
elif grep -q '^border-radius:' "$TOGGLES_CSS"; then
sed -i "s/^border-radius:.*/border-radius: ${radius}px;/" "$TOGGLES_CSS"
else
echo ".box-wrapper { border-radius: ${radius}px; }" >>"$TOGGLES_CSS"
fi
printf '.box-wrapper { border-radius: %spx; }\n' "$radius" >"$TOGGLES_CSS"
}
case "${1:-toggle}" in
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
# omarchy:summary=List themes with preview image paths (tab-separated: name\tslug\tpreview)
# omarchy:hidden=true
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
omarchy-theme-list 2>/dev/null | while IFS= read -r name; do
[[ -n $name ]] || continue
slug=$(printf '%s' "$name" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
preview=""
for base in "$HOME/.config/omarchy/themes" "$OMARCHY_PATH/themes"; do
[[ -d $base/$slug ]] || continue
for ext in png jpg jpeg webp; do
if [[ -f $base/$slug/preview.$ext ]]; then
preview="$base/$slug/preview.$ext"
break 2
fi
done
if [[ -z $preview && -d $base/$slug/backgrounds ]]; then
preview=$(find -L "$base/$slug/backgrounds" -maxdepth 1 -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.webp' \) 2>/dev/null | sort | head -n1)
[[ -n $preview ]] && break
fi
done
printf '%s\t%s\t%s\n' "$name" "$slug" "$preview"
done
+43 -10
View File
@@ -1,15 +1,48 @@
#!/bin/bash
# omarchy:summary=Toggle bar visibility
# omarchy:examples=omarchy toggle bar
# omarchy:summary=Toggle bar visibility without killing the Omarchy shell
# omarchy:args=[toggle|show|hide]
# omarchy:examples=omarchy toggle bar | omarchy toggle bar hide | omarchy toggle bar show
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
CONFIG_DIR="$OMARCHY_PATH/default/quickshell/omarchy-shell"
FLAG="$HOME/.local/state/omarchy/toggles/bar-off"
omarchy-toggle bar-off
apply_state() {
case "$1" in
hidden)
mkdir -p "$(dirname "$FLAG")"
touch "$FLAG"
;;
visible)
rm -f "$FLAG"
;;
esac
}
if quickshell list -p "$CONFIG_DIR" 2>/dev/null | grep -q '^Instance '; then
quickshell kill -p "$CONFIG_DIR" >/dev/null 2>&1 || true
else
uwsm-app -- env OMARCHY_PATH="$OMARCHY_PATH" quickshell -p "$CONFIG_DIR" >/dev/null 2>&1 &
fi
case "${1:-toggle}" in
hide|off)
apply_state hidden
state=hidden
;;
show|on)
apply_state visible
state=visible
;;
toggle|"")
if [[ -f $FLAG ]]; then
apply_state visible
state=visible
else
apply_state hidden
state=hidden
fi
;;
*)
echo "Usage: omarchy-toggle-bar [toggle|show|hide]" >&2
exit 1
;;
esac
case "$state" in
visible) omarchy-notification-send "Bar shown" -g 󰍜 ;;
hidden) omarchy-notification-send "Bar hidden" -g 󰍜 ;;
esac
+1 -1
View File
@@ -1,7 +1,7 @@
hl.on("hyprland.start", function()
hl.exec_cmd("uwsm-app -- hypridle")
hl.exec_cmd("uwsm-app -- mako")
hl.exec_cmd("! omarchy-toggle-enabled bar-off && omarchy-restart-quickshell")
hl.exec_cmd("omarchy-restart-quickshell")
hl.exec_cmd("uwsm-app -- fcitx5 --disable notificationitem")
hl.exec_cmd("uwsm-app -- swaybg -i ~/.config/omarchy/current/background -m fill")
hl.exec_cmd("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1")
+1 -1
View File
@@ -166,7 +166,7 @@
"setup.config.hyprsunset": {"icon":"","label":"Hyprsunset","keywords":"night light","action":"open_in_editor ~/.config/hypr/hyprsunset.conf && omarchy-restart-hyprsunset"},
"setup.config.swayosd": {"icon":"","label":"Swayosd","action":"open_in_editor ~/.config/swayosd/config.toml && omarchy-restart-swayosd"},
"setup.config.walker": {"icon":"󰌧","label":"Walker","keywords":"launcher","action":"open_in_editor ~/.config/walker/config.toml && omarchy-restart-walker"},
"setup.config.bar": {"icon":"󰍜","label":"Bar","keywords":"quickshell shell config","action":"omarchy-launch-bar-settings"},
"setup.config.bar": {"icon":"󰍜","label":"Bar","keywords":"quickshell shell config","action":"omarchy-launch-settings bar"},
"setup.config.xcompose": {"icon":"󰞅","label":"XCompose","keywords":"compose key","action":"open_in_editor ~/.XCompose && omarchy-restart-xcompose"},
// Install
@@ -101,11 +101,21 @@ QtObject {
}
}
// `omarchy-theme-set` recreates the theme/ directory via rm+mv, which kills
// the inotify watch on colors.toml. Use theme.name (overwritten in place) as
// a tripwire that forces a fresh reload after each swap.
property FileView themeFile: FileView {
id: themeColorsFile
path: Quickshell.env("HOME") + "/.config/omarchy/current/theme/colors.toml"
watchChanges: true
printErrors: false
onLoaded: root.loadTheme(text())
onFileChanged: reload()
}
property FileView themeNameFile: FileView {
path: Quickshell.env("HOME") + "/.config/omarchy/current/theme.name"
watchChanges: true
printErrors: false
onFileChanged: themeColorsFile.reload()
}
}
+5 -5
View File
@@ -28,7 +28,7 @@ default/quickshell/omarchy-shell/
DynamicSettingsForm.qml renders plugin-declared schemas
plugins/
bar/ first-party plugins (see plugins/README.md)
bar-settings/
settings/
image-picker/
menu/
```
@@ -87,7 +87,7 @@ The full schema lives in `services/PluginRegistry.qml`.
The directory must contain a `manifest.json` plus the QML files
referenced from its `entryPoints`.
2. `omarchy-shell-ipc shell rescanPlugins` — or open the Plugin Manager
tab in `omarchy launch bar-settings` and click **Rescan**.
tab in `omarchy launch settings` and click **Rescan**.
3. Enable the plugin (Plugin Manager **Enable** toggle, or
`omarchy-shell-ipc shell setPluginEnabled <id> true`).
4. If it's a `bar-widget`, add it to a layout section from the bar editor.
@@ -128,7 +128,7 @@ is the canonical way for other Omarchy CLIs to talk to the shell.
```
omarchy-shell-ipc shell ping
omarchy-shell-ipc shell summon omarchy.bar-settings "{}"
omarchy-shell-ipc shell summon omarchy.settings "{}"
omarchy-shell-ipc shell listPlugins
omarchy-shell-ipc shell rescanPlugins
```
@@ -152,7 +152,7 @@ The `shell-defaults.json` bundled with the shell describes the
fresh-install state. When the user has no `shell.json`, the shell uses
the defaults verbatim. Once the user customizes anything, `shell.json`
becomes the authoritative file — we do **not** deep-merge defaults back
in. Pressing **Reset to defaults** in `omarchy launch bar-settings`
in. Pressing **Reset to defaults** in `omarchy launch settings`
rewrites `shell.json` from the current `shell-defaults.json`.
### shell.json shape
@@ -174,7 +174,7 @@ rewrites `shell.json` from the current `shell-defaults.json`.
}
},
"plugins": [
{ "id": "omarchy.bar-settings" },
{ "id": "omarchy.settings" },
{ "id": "omarchy.image-picker" }
]
}
@@ -66,14 +66,14 @@ QtObject {
// from a right-click handler.
function openWidgetSettings(screen, section, sectionWidgetIndex, widgetId, widgetSettings) {
if (bar && bar.shell && typeof bar.shell.summon === "function") {
bar.shell.summon("omarchy.bar-settings",
bar.shell.summon("omarchy.settings",
JSON.stringify({ focusWidgetId: widgetId, section: section, index: sectionWidgetIndex }))
}
}
function openPluginSettings(screen, manifest) {
if (bar && bar.shell && typeof bar.shell.summon === "function") {
bar.shell.summon("omarchy.bar-settings",
bar.shell.summon("omarchy.settings",
JSON.stringify({ focusPluginId: manifest ? manifest.id : "" }))
}
}
@@ -22,7 +22,7 @@ Add it via the bar customizer or by editing `~/.config/omarchy/shell.json` direc
|---|---|
| `entryPoints.barWidget` | yes — registered through `BarWidgetRegistry` |
| `entryPoints.panel` | yes — opened via `pluginApi.openPanel()` |
| `entryPoints.settings` | yes — embedded in the bar-settings dialog |
| `entryPoints.settings` | yes — embedded in the settings dialog |
| `entryPoints.main` | yes — instantiated as a hidden service, exposed via `pluginApi.mainInstance` |
| `entryPoints.desktopWidget` | **no** — skipped with a console warning |
| `entryPoints.launcherProvider` | **no** — skipped with a console warning |
@@ -11,7 +11,7 @@ User-installed plugins live alongside these conceptually but on disk under
| Plugin | id | kinds | activation | entry point |
|------------------|--------------------------|--------------|-------------|----------------------------------------------|
| Bar | `omarchy.bar` | `bar` | persistent | `bar/Bar.qml` |
| Bar settings | `omarchy.bar-settings` | `panel` | on-demand | `bar-settings/BarSettingsPanel.qml` |
| Settings | `omarchy.settings` | `panel` | on-demand | `settings/SettingsPanel.qml` |
| Image picker | `omarchy.image-picker` | `overlay` | on-demand | `image-picker/ImagePicker.qml` |
| Omarchy menu | `omarchy.menu` | `menu` | on-demand | `menu/Menu.qml` |
@@ -27,8 +27,8 @@ and customization schema.
## Bar settings
Visual editor for the entire shell config. Summoned by
`omarchy-shell-ipc shell summon omarchy.bar-settings "{}"` (which is what
`omarchy launch bar-settings` ultimately calls). Provides:
`omarchy-shell-ipc shell summon omarchy.settings "{}"` (which is what
`omarchy launch settings` ultimately calls). Provides:
- per-section add/move/remove/edit of bar widget entries
- a separate "Other plugins" section for panels, overlays, services,
File diff suppressed because it is too large Load Diff
@@ -1,11 +0,0 @@
{
"schemaVersion": 1,
"id": "omarchy.bar-settings",
"name": "Bar settings",
"version": "1.0.0",
"author": "Omarchy",
"description": "Visual customizer for the Omarchy bar",
"kinds": ["panel"],
"activation": "on-demand",
"entryPoints": { "panel": "BarSettingsPanel.qml" }
}
@@ -16,7 +16,7 @@ Item {
// The omarchy-shell host injects omarchyPath when it instantiates this Bar.
// Default fallback keeps the file loadable in isolation (e.g. for QML tooling).
required property string omarchyPath
// Injected by the host shell. Shared with the bar-settings panel so both
// Injected by the host shell. Shared with the settings panel so both
// see the same widget catalogue.
required property var barWidgetRegistry
// Injected by the host shell every time shell.json is reloaded. Holds the
@@ -29,6 +29,10 @@ Item {
// Injected by the host shell. Used so Noctalia plugins that reach for
// shell-wide APIs (openPanel, currentScreen) can do so via pluginApi.
property var shell: null
// Mirrors the on-disk `bar-off` flag so the user can hide the bar without
// killing the entire shell. Wired to BarPanel.visible below; updated by the
// FileView watcher further down.
property bool barHidden: false
property string home: Quickshell.env("HOME")
property string omarchyConfigDir: home + "/.config/omarchy"
property var fallbackBarConfig: ({
@@ -691,13 +695,39 @@ Item {
// The host owns shell.json loading and injects `barConfig`. Bar still keeps
// its own theme FileView since theme colors are independent of shell.json.
// `omarchy-theme-set` recreates the entire theme/ directory via rm+mv, which
// invalidates the inotify watch on colors.toml. Use theme.name (overwritten
// in place) to force a fresh reload after each swap.
FileView {
id: themeColorsFile
path: root.home + "/.config/omarchy/current/theme/colors.toml"
watchChanges: true
printErrors: false
onLoaded: root.loadTheme(text())
onFileChanged: reload()
}
FileView {
path: root.home + "/.config/omarchy/current/theme.name"
watchChanges: true
printErrors: false
onFileChanged: themeColorsFile.reload()
}
// Presence of the `bar-off` flag = bar hidden. Watching the parent toggles
// directory because FileView can't observe a file that doesn't exist yet,
// and the flag is created/removed by `omarchy-toggle-bar`.
Process {
id: barHiddenProbe
running: true
command: ["bash", "-lc", "[[ -f $HOME/.local/state/omarchy/toggles/bar-off ]] && echo yes || echo no"]
stdout: SplitParser { onRead: function(line) { root.barHidden = String(line).trim() === "yes" } }
}
FileView {
path: root.home + "/.local/state/omarchy/toggles"
watchChanges: true
printErrors: false
onFileChanged: barHiddenProbe.running = true
}
Process {
id: weatherProc
@@ -844,6 +874,8 @@ Item {
component BarPanel: PanelWindow {
id: barWindow
visible: !root.barHidden
anchors {
top: root.position === "top" || root.vertical
bottom: root.position === "bottom" || root.vertical
@@ -14,9 +14,9 @@ the shell for its whole session.
## Customizing
The bar config lives under the `bar:` key of [`~/.config/omarchy/shell.json`](../../README.md#shelljson-shape). Out of the box the shell uses [`shell-defaults.json`](../../shell-defaults.json). Once you customize anything via `omarchy launch bar-settings` or by editing shell.json directly, your file is canonical — there is no deep-merge.
The bar config lives under the `bar:` key of [`~/.config/omarchy/shell.json`](../../README.md#shelljson-shape). Out of the box the shell uses [`shell-defaults.json`](../../shell-defaults.json). Once you customize anything via `omarchy launch settings` or by editing shell.json directly, your file is canonical — there is no deep-merge.
Launch the visual editor with `omarchy launch bar-settings` (or run `omarchy-launch-bar-settings`) to reorder widgets, add/remove them, and tweak per-widget options without editing JSON by hand.
Launch the visual editor with `omarchy launch settings` (or run `omarchy-launch-settings`) to reorder widgets, add/remove them, and tweak per-widget options without editing JSON by hand.
Example `shell.json` (bar subtree only shown):
@@ -171,5 +171,5 @@ Third-party widgets ship as separate plugins under
`~/.config/omarchy/plugins/<plugin-id>/` with their own `manifest.json`
declaring `kinds: ["bar-widget"]` and a `barWidget` entry point. See
[../../README.md](../../README.md) for the manifest schema and the
Plugin Manager tab in `omarchy launch bar-settings` for enable/disable
Plugin Manager tab in `omarchy launch settings` for enable/disable
controls.
@@ -362,11 +362,11 @@ Item {
Common.PillButton {
width: parent.width
iconText: "󰙪"
text: "Customize bar…"
text: "Settings…"
foreground: root.bar.foreground
horizontalPadding: 10
verticalPadding: 8
onClicked: { root.run("omarchy-launch-bar-settings"); root.popupOpen = false }
onClicked: { root.run("omarchy-launch-settings"); root.popupOpen = false }
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,134 @@
import QtQuick
import QtQuick.Controls
// Themed ComboBox + popup. Anchors below the trigger, paints with the host
// shell's foreground/background palette, and inherits the shell-wide corner
// radius so nothing renders rounded when the user has set sharp corners.
Item {
id: root
property string label: ""
property string value: ""
property var options: []
property color foreground: "#cacccc"
property color background: "#101315"
property color accent: "#cacccc"
property string fontFamily: "JetBrainsMono Nerd Font"
property int cornerRadius: 0
property int rowHeight: 28
property int popupRowHeight: 28
property bool showLabel: true
signal changed(string value)
implicitWidth: 240
implicitHeight: showLabel ? rowHeight + 18 : rowHeight
Column {
anchors.fill: parent
spacing: 4
Text {
visible: root.showLabel && root.label !== ""
text: root.label
color: Qt.darker(root.foreground, 1.4)
font.family: root.fontFamily
font.pixelSize: 10
font.bold: true
}
ComboBox {
id: combo
width: parent.width
height: root.rowHeight
font.family: root.fontFamily
font.pixelSize: 12
model: root.options
currentIndex: {
for (var i = 0; i < model.length; i++) if (model[i] === root.value) return i
return -1
}
onActivated: function(index) {
if (index >= 0 && index < model.length) root.changed(model[index])
}
background: Rectangle {
color: root.background
border.color: combo.activeFocus
? root.accent
: Qt.rgba(root.foreground.r, root.foreground.g, root.foreground.b, 0.4)
border.width: 1
radius: root.cornerRadius
}
contentItem: Text {
leftPadding: 8
rightPadding: 24
text: combo.displayText
color: root.foreground
font: combo.font
verticalAlignment: Text.AlignVCenter
}
indicator: Text {
x: combo.width - width - 8
y: combo.topPadding + (combo.availableHeight - height) / 2
text: "▾"
color: Qt.darker(root.foreground, 1.2)
font.family: root.fontFamily
font.pixelSize: 10
}
popup: Popup {
// Anchor the popup directly under the field, full width, sharp/round
// matching the shell radius. Override the native white-with-blue look.
y: combo.height
width: combo.width
implicitHeight: Math.min(contentItem.implicitHeight, root.popupRowHeight * 8)
padding: 1
background: Rectangle {
color: root.background
border.color: root.foreground
border.width: 1
radius: root.cornerRadius
}
contentItem: ListView {
clip: true
implicitHeight: contentHeight
model: combo.delegateModel
currentIndex: combo.highlightedIndex
boundsBehavior: Flickable.StopAtBounds
}
}
delegate: ItemDelegate {
required property var modelData
required property int index
width: combo.width
height: root.popupRowHeight
padding: 0
contentItem: Text {
text: String(modelData)
color: index === combo.highlightedIndex ? root.accent : root.foreground
font.family: root.fontFamily
font.pixelSize: 12
leftPadding: 10
rightPadding: 10
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
background: Rectangle {
color: index === combo.highlightedIndex
? Qt.rgba(root.foreground.r, root.foreground.g, root.foreground.b, 0.12)
: "transparent"
radius: 0
}
}
}
}
}
@@ -0,0 +1,11 @@
{
"schemaVersion": 1,
"id": "omarchy.settings",
"name": "Omarchy Settings",
"version": "1.0.0",
"author": "Omarchy",
"description": "Customize the bar, plugins, defaults, and look-and-feel of Omarchy",
"kinds": ["panel"],
"activation": "on-demand",
"entryPoints": { "panel": "SettingsPanel.qml" }
}
@@ -197,7 +197,7 @@ QtObject {
//
// Special cases (implicitly always enabled, no shell.json entry needed):
// - plugins whose `kinds` contains "bar" are mounted directly by the host.
// - first-party plugins are shell infrastructure (bar-settings,
// - first-party plugins are shell infrastructure (settings,
// image-picker, ...). Requiring users to add them to plugins[] just to
// summon them was a footgun: a stock shell.json with `plugins: []` would
// silently make `omarchy launch bar-settings` a no-op.
+1 -1
View File
@@ -54,7 +54,7 @@ ShellRoot {
}
},
plugins: [
{ id: "omarchy.bar-settings" },
{ id: "omarchy.settings" },
{ id: "omarchy.image-picker" }
]
})