From 227240d2808c9ee2432b0fd511dc97e64db51d8b Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Sun, 14 Jun 2026 21:12:42 -0400 Subject: [PATCH] Collapse inactive indicator spacing --- shell/plugins/bar/widgets/Indicators.qml | 8 ++++---- test/shell.d/runtime-smoke-test.sh | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/shell/plugins/bar/widgets/Indicators.qml b/shell/plugins/bar/widgets/Indicators.qml index dde04ee9..0785fd6d 100644 --- a/shell/plugins/bar/widgets/Indicators.qml +++ b/shell/plugins/bar/widgets/Indicators.qml @@ -8,9 +8,7 @@ BarWidget { id: root moduleName: "omarchy.indicators" - readonly property int indicatorSlotExtent: Style.space(22) readonly property var defaultIndicatorEntries: [ "Dnd", "Reminder", "NightLight", "StayAwake", "ScreenRecording", "Dictation" ] - readonly property int inactiveSlotExtent: indicatorEntries.length * indicatorSlotExtent readonly property var indicatorEntries: indicatorEntriesFromSettings(settings) property var activeIndicatorIds: [] property var indicatorActiveStates: ({}) @@ -204,10 +202,11 @@ BarWidget { Item { id: inactiveHorizontalArea - implicitWidth: Math.max(inactiveHorizontalBlock.implicitWidth, root.inactiveSlotExtent) + implicitWidth: root.revealInactiveIndicators ? inactiveHorizontalBlock.implicitWidth : 0 implicitHeight: Math.max(inactiveHorizontalBlock.implicitHeight, root.barSize) width: implicitWidth height: implicitHeight + clip: true IndicatorBlock { id: inactiveHorizontalBlock @@ -246,9 +245,10 @@ BarWidget { id: inactiveVerticalArea implicitWidth: Math.max(inactiveVerticalBlock.implicitWidth, root.barSize) - implicitHeight: Math.max(inactiveVerticalBlock.implicitHeight, root.inactiveSlotExtent) + implicitHeight: root.revealInactiveIndicators ? inactiveVerticalBlock.implicitHeight : 0 width: implicitWidth height: implicitHeight + clip: true IndicatorBlock { id: inactiveVerticalBlock diff --git a/test/shell.d/runtime-smoke-test.sh b/test/shell.d/runtime-smoke-test.sh index cb84b6a5..6ff80131 100755 --- a/test/shell.d/runtime-smoke-test.sh +++ b/test/shell.d/runtime-smoke-test.sh @@ -144,7 +144,6 @@ visible_default_ids='[ "omarchy.clock", "omarchy.weather", "omarchy.system-update", - "omarchy.indicators", "omarchy.network", "omarchy.audio", "omarchy.monitor" @@ -180,7 +179,7 @@ jq -e --argjson expected "$default_ids" --argjson visibleExpected "$visible_defa pass "default bar layout renders expected module slots" jq -e ' - map(select(.section == "center" and .visible == true and .width > 0)) | map(.id) as $center | + map(select(.section == "center")) | map(.id) as $center | ($center | index("omarchy.weather")) != null and ($center | index("omarchy.system-update")) != null and ($center | index("omarchy.indicators")) != null and @@ -189,10 +188,10 @@ jq -e ' ' <<<"$geometry" >/dev/null || { printf 'Geometry:\n' >&2 jq . <<<"$geometry" >&2 - fail_with_log "runtime geometry places visible update between weather and indicators" + fail_with_log "runtime geometry keeps update before indicators" } -pass "runtime geometry places visible update between weather and indicators" +pass "runtime geometry keeps update before indicators" HOME="$test_home" OMARCHY_PATH="$test_root" PATH="$ROOT/bin:$PATH" "$ROOT/bin/omarchy-config-shell-bar" remove omarchy.audio