Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/TOUCH-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Priorities: **P1** broken, unsafe, or a dead end on a phone; **P2** noticeably a
8. Lock: the battery on the lock screen (the bar's glyph, which carries the bolt while charging, and the percentage), top right over the glance and the PIN view, nothing on a device without a battery. Patch 0026, omamobile-omarchy 0.1.25 (built and tested offline against Omarchy 4.0.6 under qmltestrunner; checked on the Pixel 8 Pro on the PIN view while charging: the glyph with its bolt and the percentage top right; the glance view and unplugging are not checked on a phone yet). The percentage comes from the first present battery whose `scope` is not `Device` (a paired controller, keyboard or mouse is a `Battery` supply too, and sorts before the 7 Pro's `max170xx_battery`), and only that battery's Charging/Full counts. Charging otherwise follows the charger supply being online, as `omamobile-update` reads it, since the fuel gauge says Discharging while plugged in whenever the net current is negative. A supply read that hangs is cut by `timeout` (3 s) and a stale timer and clears the state; a blank drops the bolt so a wake never paints a stale one.
9. Media controls (MPRIS, Quickshell.Services.Mpris) in two places. The shade: a card at the top of the notification shade while a player plays or is paused, with the album art (or the app's icon), the title, the artist, the app's name, a seek bar with elapsed and length when the player reports its position, and previous, play/pause and next; a tap on the card brings the player's app up (`omarchy-hyprland-focus-app` by desktop entry, then identity; MPRIS Raise only when no window matches). omamobile-shell 0.2.74. The lock: the same controls as a card above the notifications on the glance, and as a row above the small clock on the PIN view where it fits (with fingerprints set up the pad reaches the clock, so the row is left out there); transport only, no opening the app, no seeking. Patch 0027, omamobile-omarchy 0.1.26. Player: playing before paused, then the one that started or changed track last; playerctld only when alone. Art: the shade loads local art and https/http covers (the player already fetched them); the lock loads local art only (file:// or data:), so a locked phone makes no network request, and with `lock-hide-notification-text` on it shows the app and Playing/Paused instead of the track. Built and tested offline (qmltestrunner, offscreen renders); not checked on a phone yet.
10. Install and setup terminals (`omarchy-launch-floating-terminal-with-presentation`: app-id `org.omarchy.terminal`, title `Omarchy`; Install > AI > Dictation and the rest) open with `omarchy-show-logo`, whose `logo.txt` is 81 columns; the phone's terminal at Omarchy's font size fits about 66, so the logo wrapped into broken blocks. `omarchy-show-logo` now reads the terminal's width (`stty size` on `/dev/tty`) and shows the wordmark stacked on two lines (`logo-narrow.txt`, 48 columns) when the wide one doesn't fit, and none below 48; a desktop terminal, or a run with no terminal, shows the wide logo as before. Patch 0028, omamobile-omarchy 0.1.31. On the phone side, `hypr/phone.lua` names Omarchy's floating terminals (`org.omarchy.terminal`, `.bash`, `.btop`, `TUI.float`) in a maximize rule after Omarchy's float rule, so they fill the space between the bar and the keyboard rather than Omarchy's 875x600 float (omamobile-shell 0.2.92). Built and tested offline; not checked on a phone yet.
11. About (`omarchy-launch-about`, the menu's About, 3.5): the logo (`about.txt`, 54 columns) beside fastfetch's modules (54 columns) needs 118 columns, and Omarchy's fastfetch config turns line wrapping off, so in a phone's About window (63 columns on the Pixel 7 Pro) every module line was cut to a single character. A terminal narrower than that now gets the logo above the modules (56 columns by 57 rows with Omarchy's logo), and one too small for that as well, such as with the on-screen keyboard up, gets the modules alone; a desktop window, which the launcher sizes for the side-by-side layout, and a user's own fastfetch config render as before. Patch 0030, omamobile-omarchy 0.1.33. The window needs no rule of its own: on Hyprland 0.57 with omamobile-shell 0.2.100 About opens maximized (480x952, 58 rows by 63 columns) and Hyprland refuses the launcher's resize of a maximized window ("Window is fullscreen"). Checked on the Pixel 7 Pro (2026-11-04, Hyprland 0.57.0, omamobile-shell 0.2.100, `7.3.0-rc6-omamobile-push1-g1cb4bd36f3be`): the patch applies through the package's hook; About at 58 rows by 63 columns shows the logo above the modules with every box whole, and with the keyboard up (41 rows) the modules alone, every box whole. The measurement costs one more `fastfetch --logo none` before the first frame (240-330 ms there).

## Batch 4: landscape

Expand All @@ -93,7 +94,7 @@ Hyprland transform 1 or 3 gives a 1040x480 logical px output (portrait is 480x10

**Checked on the Pixel 7 Pro (2026-10-27, shell 0.2.30, `7.3.0-rc6-omamobile-push1-00588-gcd72ae58ee47`, rotated with `hyprctl`):** the home widgets lay out side by side with every row readable (#85 fixed), the saved layout file is unchanged, the drawer shows eight columns at the portrait icon size, and quick settings and recents behave as rendered. Two follow-ups seen there, for batch 5: a row of four app icons in portrait becomes a column at the right edge in landscape (the transposition should keep rows of icons as rows, placing them below the widgets), and the landscape view showed four page dots where the layout has three pages (items that no longer fit were pushed to a new page; prefer re-placing them on their own page).

**What remains after batch 4:** 1.11 (gum prompts as sheets: onboarding, PIN setup), 1.12's Nightlight and Reminder tiles, 2.1's per-token font seeds (the 12 px floor is in; the overrides need a theme-change check), 2.7 contrast (4.5:1 for placeholder and secondary text), 3.1 per-site web-app flags, 3.3's upstreamable `menu.d` patch (the rows are hidden by `omamobile-setup-user` for now), 3.5 About, 3.6 haptics, 3.7 polish, and the Omarchy patches 3-6 below.
**What remains after batch 4:** 1.11 (gum prompts as sheets: onboarding, PIN setup), 1.12's Nightlight and Reminder tiles, 2.1's per-token font seeds (the 12 px floor is in; the overrides need a theme-change check), 2.7 contrast (4.5:1 for placeholder and secondary text), 3.1 per-site web-app flags, 3.3's upstreamable `menu.d` patch (the rows are hidden by `omamobile-setup-user` for now), 3.6 haptics, 3.7 polish, and the Omarchy patches 3-6 below.

## Suggested order

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# About: the logo above the modules, or none, where they don't fit side by
# side. omarchy-launch-about shows the logo (about.txt, 54 columns) beside
# fastfetch's module boxes (54 columns), 118 columns in all with the
# config's padding, and the config turns line wrapping off. A phone's About
# window is the width of the screen, 63 columns at Omarchy's terminal font
# on a Pixel 7 Pro, so the logo filled it and every module line was cut to
# a single character. A terminal narrower than the side-by-side layout now
# gets the logo above the modules (56 columns and 57 rows with Omarchy's
# logo), and one too small for that as well, such as a phone with its
# on-screen keyboard up, gets the modules alone. The room comes from the
# same measurement fit_window makes (the logo file and fastfetch --logo
# none), so a window fit_window has sized, as on a desktop, renders as
# before, and a user's own fastfetch config is left alone. Candidate for
# upstream Omarchy.
#
# Against Omarchy 4.0.6 (4.0.6-1).
diff --git i/bin/omarchy-launch-about w/bin/omarchy-launch-about
--- i/bin/omarchy-launch-about
+++ w/bin/omarchy-launch-about
@@ -146,6 +146,44 @@ fit_window() {
return 1
}

+# The room each layout needs, from the same measurement fit_window makes: the
+# columns for the logo beside the modules (what fit_window sizes the window
+# for), then the columns and rows for the logo above them, where the modules
+# start at the left edge and the cursor takes a row. Nothing where fit_window
+# measures nothing either: a user's own fastfetch config, or no logo file.
+layout_room() {
+ custom_fastfetch_config && return 1
+
+ local logo_w logo_h modules module_w module_h
+ read -r logo_w logo_h <<<"$(logo_dimensions)"
+ [[ -n ${logo_w:-} ]] || return 1
+
+ modules=$(fastfetch --logo none | sed 's/\x1b\[[0-9;?]*[a-zA-Z]//g'; printf X)
+ modules=${modules%X}
+ module_w=$(printf '%s' "$modules" | display_columns)
+ module_h=$(printf '%s' "$modules" | wc -l)
+
+ printf '%s %s %s\n' $(( 2 + logo_w + 6 + module_w + 2 )) \
+ $(( 2 + logo_w > module_w ? 2 + logo_w : module_w )) $(( 2 + logo_h + module_h + 1 ))
+}
+
+# The config turns line wrapping off, so a terminal narrower than the logo and
+# the modules side by side, such as a phone's full-width window, cuts every
+# module line short. It gets the logo above the modules instead, and one too
+# small for that as well, such as a phone with its keyboard up, gets the
+# modules without the logo. A terminal wide enough renders as before.
+logo_options() {
+ local rows=$1 cols=$2 side_c top_c top_r
+ read -r side_c top_c top_r <<<"$room"
+ [[ -n ${side_c:-} ]] && (( cols < side_c )) || return 0
+
+ if (( cols >= top_c && rows >= top_r )); then
+ echo "--logo-position top"
+ else
+ echo "--logo none"
+ fi
+}
+
if [[ ${1:-} == "--render" ]]; then
printf '\e[?25l'

@@ -154,11 +192,13 @@ if [[ ${1:-} == "--render" ]]; then

fitted=false
passes=0
+ room=$(layout_room)
while :; do
size=$(stty size)
logo_stamp=$(stat -c %Y "$LOGO_FILE" 2>/dev/null)
clear
- fastfetch
+ read -ra logo_args <<<"$(logo_options $size)"
+ fastfetch "${logo_args[@]}"
# A second pass picks up a fit that could not measure the window the first
# time. Beyond that, a window that will not settle would be fitted again on
# every repaint.
@@ -173,6 +213,7 @@ if [[ ${1:-} == "--render" ]]; then
if [[ $(stat -c %Y "$LOGO_FILE" 2>/dev/null) != $logo_stamp ]]; then
fitted=false
passes=0
+ room=$(layout_room)
fi
done
fi
102 changes: 102 additions & 0 deletions packages/omamobile-omarchy/test/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ def make_root(name, mtree_from):
ok("RELEASES.md section 5.4" in text, "real omarchy: %s points at RELEASES 5.4" % name)
screensaver_launcher(t, os.path.join(root, "usr/bin/omarchy-launch-screensaver"))
show_logo(t, root)
about_layout(t, root)
notification_phrasing(t, os.path.join(root, "usr/bin/omarchy-notification-send"),
os.path.join(ex, "usr/bin/omarchy-notification-send"))
lock_fingerprint_probe(t, root)
Expand Down Expand Up @@ -796,6 +797,107 @@ def lines(cols):
ok(out.decode("utf-8", "replace").count("█" * 81) == 9, "0028: no terminal: the wide logo, as before")


def about_layout(t, root):
"""Patch 0030: the About layout by terminal size. A stand-in fastfetch
whose modules are as big as Omarchy's on a phone (54 columns, 28 rows
with the closing break) and a 54x26 logo, as Omarchy's about.txt is: side
by side needs 118 columns, the logo above 56 columns and 57 rows. The
functions first, then the render loop in real terminals (script(1)), where
the fastfetch that draws on the terminal has to get the same options."""
launcher = os.path.join(root, "usr/bin/omarchy-launch-about")
stub = os.path.join(t, "about-bin")
os.makedirs(stub)
# Every call is logged with whether it drew on the terminal (the render)
# or into a pipe (the measurements).
with open(os.path.join(stub, "fastfetch"), "w") as f:
f.write('#!/bin/bash\n[[ -t 1 ]] && to=tty || to=pipe\nprintf "%s:%s\\n" "$to" "$*" >>"$FASTFETCH_LOG"\n'
'[[ $* == "--logo none" ]] && { for i in $(seq 27); do printf "%054d\\n" "$i"; done; echo; }\nexit 0\n')
# No About window to find, so fit_window gives up as it does without Hyprland.
with open(os.path.join(stub, "hyprctl"), "w") as f:
f.write("#!/bin/bash\necho '[]'\n")
for name in ("fastfetch", "hyprctl"):
os.chmod(os.path.join(stub, name), 0o755)

def home(name, logo=True, own_config=False):
h = os.path.join(t, name)
os.makedirs(os.path.join(h, ".config/omarchy/branding"))
if logo:
with open(os.path.join(h, ".config/omarchy/branding/about.txt"), "w", encoding="utf-8") as f:
f.write(("█" * 54 + "\n") * 26)
if own_config:
os.makedirs(os.path.join(h, ".config/fastfetch"))
open(os.path.join(h, ".config/fastfetch/config.jsonc"), "w").close()
return h

def env(h):
return {"PATH": stub + ":/usr/bin:/bin", "HOME": h, "TERM": "xterm",
"FASTFETCH_LOG": os.path.join(h, "fastfetch.log")}

sizes = [(61, 63), (57, 63), (56, 63), (41, 63), (61, 56), (61, 55), (61, 117), (29, 118), (26, 136)]
# Everything up to the render block, so the functions load and nothing runs.
body = r"""source <(sed '/^if \[\[ \${1:-} == "--render" \]\]; then$/,$d' "$1"); shift
room=$(layout_room); echo "room:$room"
while (( $# )); do echo "$1 $2:$(logo_options "$1" "$2")"; shift 2; done"""

def options(h):
args = [str(n) for size in sizes for n in size]
out = subprocess.run(["bash", "-c", body, "bash", launcher] + args, env=env(h), capture_output=True,
text=True, timeout=20).stdout
return dict(l.split(":", 1) for l in out.splitlines() if ":" in l)

got = options(home("about-home"))
ok(got.get("room") == "118 56 57", "0030: the room for each layout: 118 columns, or 56 by 57 rows (%s)" % got.get("room"))
ok(all(got.get("%d %d" % s) == "" for s in [(29, 118), (26, 136)]),
"0030: a terminal as wide as the side-by-side layout gets fastfetch as before")
ok(all(got.get("%d %d" % s) == "--logo-position top" for s in [(61, 63), (57, 63), (61, 56), (61, 117)]),
"0030: a narrower one with 57 rows and 56 columns gets the logo above the modules")
ok(all(got.get("%d %d" % s) == "--logo none" for s in [(56, 63), (41, 63), (61, 55)]),
"0030: one a row or a column short of that gets the modules without the logo")
own = options(home("about-own-config", own_config=True))
nologo = options(home("about-no-logo", logo=False))
ok(own.get("room") == "" and all(own.get("%d %d" % s) == "" for s in sizes)
and nologo.get("room") == "" and all(nologo.get("%d %d" % s) == "" for s in sizes),
"0030: a user's own fastfetch config, or no logo file, gets fastfetch as before")

if not shutil.which("script"):
print("ok - 0030: the render loop by terminal size # SKIP no script(1)")
return

def rendered(rows, cols):
h = home("about-render-%dx%d" % (rows, cols))
log = env(h)["FASTFETCH_LOG"]
p = subprocess.Popen(["script", "-qec", "stty rows %d cols %d; bash %s --render" % (rows, cols, launcher),
"/dev/null"], env=env(h), stdin=subprocess.PIPE, stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
drawn = None
for _ in range(100):
time.sleep(0.1)
lines = open(log).read().splitlines() if os.path.exists(log) else []
drawn = next((l[4:] for l in lines if l.startswith("tty:")), None)
if drawn is not None:
break
# A key closes About, as it does on a phone.
try:
p.stdin.write(b"q")
p.stdin.close()
except BrokenPipeError:
pass
try:
p.wait(timeout=10)
except subprocess.TimeoutExpired:
p.kill()
p.wait()
return drawn, None
return drawn, p.returncode

for (rows, cols), want, what in [((61, 63), "--logo-position top", "the logo above the modules"),
((41, 63), "--logo none", "the modules alone"),
((29, 118), "", "fastfetch as before")]:
drawn, rc = rendered(rows, cols)
ok(drawn == want and rc == 0, "0030: About in a %dx%d terminal draws %s, and a key closes it (%r, exit %s)"
% (rows, cols, what, drawn, rc))


# Omarchy 4.0.6's notification texts (headline, body) and what a phone shows
# for each (patch 0020); None leaves the text as it is.
PHRASINGS = [
Expand Down
2 changes: 1 addition & 1 deletion packages/omamobile-omarchy/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.32
0.1.33