Park the indicators just left of the clock

The lineup now reads toward the clock instead of away from it, so Stay
Awake sits nearest the time, then do-not-disturb, night light, reminder,
screen recording, dictation, and tmux alerts trailing off to the left.

Active indicators render after the hover-revealed ones so they stay
against the clock, and a newly active indicator joins on the far side
rather than shoving the ones already showing sideways.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-07-25 07:14:58 -07:00
co-authored by Claude Opus 5
parent ec1553d720
commit 896beb0c85
4 changed files with 83 additions and 39 deletions
+39
View File
@@ -0,0 +1,39 @@
echo "Move the bar indicators to the left of the clock"
config_file="$HOME/.config/omarchy/shell.json"
if [[ -s $config_file ]] && omarchy-cmd-present jq; then
tmp=$(mktemp)
jq '
def entry_id:
if type == "string" then
.
elif type == "object" then
(.id // "")
else
""
end;
def entry_index($id):
[range(0; length) as $i | select((.[$i] | entry_id) == $id) | $i][0];
def place_indicators_before_clock:
if type != "array" then
.
else
(entry_index("omarchy.clock")) as $clock_index |
(entry_index("omarchy.indicators")) as $indicators_index |
if $clock_index == null or $indicators_index == null or $indicators_index < $clock_index then
.
else
. as $entries |
($entries[$indicators_index]) as $indicators_entry |
($entries | del(.[$indicators_index])) as $without_indicators |
($without_indicators | entry_index("omarchy.clock")) as $new_clock_index |
$without_indicators[0:$new_clock_index] + [$indicators_entry] + $without_indicators[$new_clock_index:]
end
end;
.bar.layout.center |= place_indicators_before_clock
' "$config_file" >"$tmp" && mv "$tmp" "$config_file" || rm -f "$tmp"
fi