Merge branch 'quattro' into unified-input-method-setup
# Conflicts: # config/omarchy/shell.json
This commit is contained in:
commit
c85ffa2930
5 files changed
+10
-9
No files matched your search
@@ -21,15 +21,15 @@
|
|||||||
{
|
{
|
||||||
"id": "omarchy.indicators"
|
"id": "omarchy.indicators"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "omarchy.elsewhen"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "omarchy.clock",
|
"id": "omarchy.clock",
|
||||||
"format": "dddd HH:mm",
|
"format": "dddd HH:mm",
|
||||||
"formatAlt": "d MMMM 'W'ww yyyy",
|
"formatAlt": "d MMMM 'W'ww yyyy",
|
||||||
"verticalFormat": "HH\n\u2014\nmm"
|
"verticalFormat": "HH\n\u2014\nmm"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "omarchy.elsewhen"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "omarchy.weather"
|
"id": "omarchy.weather"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ The lower-level IPC methods remain available through `omarchy-shell shell ...`.
|
|||||||
|
|
||||||
## Elsewhen
|
## Elsewhen
|
||||||
|
|
||||||
Elsewhen (`omarchy.elsewhen`), the world clock, is a first-party plugin in `shell/plugins/panels/elsewhen/`; [`elsewhen.md`](elsewhen.md) covers how it works. It shipped as the separate `elsewhen` package under the id `omacom.elsewhen` until it moved in. New installs place it immediately before the clock; the placement migration uses `omarchy bar put omarchy.elsewhen --before omarchy.clock`, which preserves an existing placement and uses Elsewhen's normal right-side placement if the clock is absent. With no shell to ask, as in an update from a TTY, it skips the placement rather than failing the update. A later migration renames existing `omacom.elsewhen` entries in `shell.json`, keeping their settings, and removes the retired package and any dev-checkout link to its `/usr/share/omarchy` path, leaving links and checkouts the user made alone.
|
Elsewhen (`omarchy.elsewhen`), the world clock, is a first-party plugin in `shell/plugins/panels/elsewhen/`; [`elsewhen.md`](elsewhen.md) covers how it works. It shipped as the separate `elsewhen` package under the id `omacom.elsewhen` until it moved in. New installs place it immediately after the clock, before Weather; the placement migration uses `omarchy bar put omarchy.elsewhen --after omarchy.clock`, which preserves an existing placement and uses Elsewhen's normal right-side placement if the clock is absent. With no shell to ask, as in an update from a TTY, it skips the placement rather than failing the update. A later migration renames existing `omacom.elsewhen` entries in `shell.json`, keeping their settings, and removes the retired package and any dev-checkout link to its `/usr/share/omarchy` path, leaving links and checkouts the user made alone.
|
||||||
|
|
||||||
## IPC
|
## IPC
|
||||||
|
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ config_file="$HOME/.config/omarchy/shell.json"
|
|||||||
if [[ -s $config_file ]] && jq -e '[.bar.layout[]?[]? | if type == "object" then .id else . end] | index("omacom.elsewhen")' "$config_file" >/dev/null 2>&1; then
|
if [[ -s $config_file ]] && jq -e '[.bar.layout[]?[]? | if type == "object" then .id else . end] | index("omacom.elsewhen")' "$config_file" >/dev/null 2>&1; then
|
||||||
echo "Elsewhen is already on the bar"
|
echo "Elsewhen is already on the bar"
|
||||||
else
|
else
|
||||||
omarchy-bar put omarchy.elsewhen --before omarchy.clock
|
omarchy-bar put omarchy.elsewhen --after omarchy.clock
|
||||||
fi
|
fi
|
||||||
@@ -38,9 +38,10 @@ jq -e '
|
|||||||
(.bar.layout.center | ids) as $ids |
|
(.bar.layout.center | ids) as $ids |
|
||||||
($ids | index("omarchy.elsewhen")) as $elsewhen |
|
($ids | index("omarchy.elsewhen")) as $elsewhen |
|
||||||
($ids | index("omarchy.clock")) as $clock |
|
($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
|
' "$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 '
|
jq -e '
|
||||||
any(.bar.layout.center[]; (.id // .) == "omarchy.clock" and (.formatAlt // "") == "d MMMM \u0027W\u0027ww yyyy")
|
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
|
# Placement
|
||||||
migration="$ROOT/migrations/1790042972.sh"
|
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
|
run
|
||||||
[[ $(cat "$CALL_LOG") == "$expected" ]] || fail "scan and placement run in order" "$(cat "$CALL_LOG")"
|
[[ $(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
|
run
|
||||||
[[ $(cat "$CALL_LOG") == "$expected" ]] || fail "placement can be rerun"
|
[[ $(cat "$CALL_LOG") == "$expected" ]] || fail "placement can be rerun"
|
||||||
|
|||||||
Reference in new issue
Block a user