Place Elsewhen after the clock by default (#14870)
This commit is contained in:
1 parent
077ac1da93
commit
77bfaca408
5 files changed
+10
-9
No files matched your search
@@ -38,9 +38,10 @@ jq -e '
|
||||
(.bar.layout.center | ids) as $ids |
|
||||
($ids | index("omarchy.elsewhen")) as $elsewhen |
|
||||
($ids | index("omarchy.clock")) as $clock |
|
||||
$elsewhen != null and $clock == $elsewhen + 1
|
||||
($ids | index("omarchy.weather")) as $weather |
|
||||
$clock != null and $elsewhen == $clock + 1 and $weather > $elsewhen
|
||||
' "$ROOT/config/omarchy/shell.json" >/dev/null
|
||||
pass "default center layout puts elsewhen immediately before the clock"
|
||||
pass "default center layout puts elsewhen immediately after the clock and before weather"
|
||||
|
||||
jq -e '
|
||||
any(.bar.layout.center[]; (.id // .) == "omarchy.clock" and (.formatAlt // "") == "d MMMM \u0027W\u0027ww yyyy")
|
||||
|
||||
@@ -52,11 +52,11 @@ pass "Elsewhen ships in the shell tree as omarchy.elsewhen"
|
||||
|
||||
# Placement
|
||||
migration="$ROOT/migrations/1790042972.sh"
|
||||
expected=$'-q shell rescanPlugins\nshell putBarWidget omarchy.elsewhen {"before":"omarchy.clock"}'
|
||||
expected=$'-q shell rescanPlugins\nshell putBarWidget omarchy.elsewhen {"after":"omarchy.clock"}'
|
||||
|
||||
run
|
||||
[[ $(cat "$CALL_LOG") == "$expected" ]] || fail "scan and placement run in order" "$(cat "$CALL_LOG")"
|
||||
pass "real bar helper places Elsewhen before the clock without restarting the shell"
|
||||
pass "real bar helper places Elsewhen after the clock without restarting the shell"
|
||||
|
||||
run
|
||||
[[ $(cat "$CALL_LOG") == "$expected" ]] || fail "placement can be rerun"
|
||||
|
||||
Reference in new issue
Block a user