diff --git a/docs/release-notes/2026-11-DRAFT.md b/docs/release-notes/2026-11-DRAFT.md index 7a2f27f65..a2769dd5f 100644 --- a/docs/release-notes/2026-11-DRAFT.md +++ b/docs/release-notes/2026-11-DRAFT.md @@ -51,6 +51,7 @@ From [docs/DEVICES.md](../DEVICES.md) on the release day: - **Updates** entry in the app drawer, with an update sheet that shows what's new and the phone's patches. - **Louder speakers** under the protection firmware, and an earpiece mode for calls. - **Files** opens folders with a single tap; the file chooser no longer stalls at login. +- **Screenshots and images:** tapping a screenshot's notification opens it in a touch image viewer (pinch and double-tap to zoom, swipe to the next, copy, share or delete), which is also the default for every image. ## Known issues diff --git a/packages/omamobile-apps/PKGBUILD b/packages/omamobile-apps/PKGBUILD index ae6bda462..7be85452b 100644 --- a/packages/omamobile-apps/PKGBUILD +++ b/packages/omamobile-apps/PKGBUILD @@ -10,7 +10,7 @@ pkgname=omamobile-apps pkgver=$(cat "${startdir:-.}/version") pkgrel=1 -pkgdesc="Omarchy Mobile's default mobile apps (camera, phone, messages, contacts, maps and location, NFC tags)" +pkgdesc="Omarchy Mobile's default mobile apps (camera, phone, messages, contacts, images, maps and location, NFC tags)" arch=(any) url="https://github.com/derekross/omarchy-mobile" license=(MIT) @@ -22,6 +22,7 @@ depends=( pipewire-libcamera # the cameras for browsers and video calls, through the camera portal omaphone # "Phone" and "Contacts": dialpad, call log, favorites, contacts (docs/TELEPHONY-APPS-PLAN.md T6) omamessages # "Messages": SMS conversations (T7); both pull in omatel-agent and work without a modem + loupe # "Image Viewer": touch zoom and swipe; the default for images (mimeapps.list) ) optdepends=( 'snapshot: a second camera app (GNOME Snapshot, shown as "Snapshot"), with video, until omacam records video' @@ -29,11 +30,13 @@ optdepends=( 'gnome-calls: another calls app, for the same ModemManager API as Phone' 'chatty: another SMS app, for the same ModemManager API as Messages' ) +backup=(etc/xdg/mimeapps.list) install=omamobile-apps.install -source=(omamobile-snapshot-name omamobile-snapshot-name.hook) -sha256sums=(SKIP SKIP) +source=(omamobile-snapshot-name omamobile-snapshot-name.hook mimeapps.list) +sha256sums=(SKIP SKIP SKIP) package() { install -Dm755 omamobile-snapshot-name "$pkgdir/usr/lib/omamobile/omamobile-snapshot-name" install -Dm644 omamobile-snapshot-name.hook "$pkgdir/usr/share/libalpm/hooks/omamobile-snapshot-name.hook" + install -Dm644 mimeapps.list "$pkgdir/etc/xdg/mimeapps.list" } diff --git a/packages/omamobile-apps/README.md b/packages/omamobile-apps/README.md index 443489e2a..aa1fe1285 100644 --- a/packages/omamobile-apps/README.md +++ b/packages/omamobile-apps/README.md @@ -8,6 +8,7 @@ A meta package: the apps a phone needs that desktop Omarchy doesn't ship. | Maps and location | `gnome-maps`, `geoclue` | default: the GPS reaches GeoClue through `omamobile-gnss` | | NFC tags | `neard` | default: tapping a tag with a web link opens it (`omamobile-nfc-open` in `omamobile-shell`) | | Camera | `omacam` | default: "Camera", Omarchy Mobile's own camera app, on libcamera directly: all four cameras, one zoom control across the lenses, full-resolution photos ([CAMERA-APP-PLAN](../../docs/CAMERA-APP-PLAN.md), `packages/omacam`) | +| Images | `loupe` | default: "Image Viewer", GNOME Loupe, opens images (`/etc/xdg/mimeapps.list`, read before Omarchy's list, with imv as the fallback): it fits each image to the screen and takes touch, pinch and double-tap to zoom and a swipe to the next image in the folder. Omarchy's imv reads no touchscreen input; it stays installed, and `omamobile-setup-user` hides its duplicate "Image Viewer" entry once, while Loupe is installed. If Loupe is removed later, imv opens images again but its entry stays hidden: delete the `NoDisplay=true` line from `~/.local/share/applications/imv.desktop` to show it in the drawer again (setup-user won't hide it a second time) | | Cameras for other apps | `pipewire-libcamera` | default: browsers and video calls reach the cameras through the camera portal and PipeWire (CAMERA-PLAN CAM5.4) | | Second camera app | `snapshot` | optional: GNOME Snapshot, for video until omacam records it. Its launcher is named "Snapshot" (a pacman hook writes an override in `/usr/local/share/applications`), so the app grid shows one "Camera" | | Phone and Contacts | `omaphone` (pulls in `omatel-agent`) | default since 0.2.1: "Phone" (dialpad, call log, favorites, the in-call screen) and "Contacts" ([TELEPHONY-APPS-PLAN](../../docs/TELEPHONY-APPS-PLAN.md) T6, `packages/omaphone`). Without a modem it keeps contacts and the call log; a call is refused with "No modem is available" | diff --git a/packages/omamobile-apps/mimeapps.list b/packages/omamobile-apps/mimeapps.list new file mode 100644 index 000000000..361c0cd86 --- /dev/null +++ b/packages/omamobile-apps/mimeapps.list @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: MIT +# Omarchy Mobile: images open in Loupe, which takes touch (pinch and +# double-tap to zoom, swipe between the images in a folder) and fits each +# image to the screen. Omarchy's viewer, imv, reads no touchscreen input, so +# on a phone an image it opened could be neither zoomed nor paged. Installed +# as /etc/xdg/mimeapps.list, which is read before Omarchy's +# /usr/share/applications/mimeapps.list (the same six types) and after the +# user's own ~/.config lists, so a user's choice still wins. imv follows +# Loupe in each list, so images still open while Loupe is missing. +[Default Applications] +image/png=org.gnome.Loupe.desktop;imv.desktop; +image/jpeg=org.gnome.Loupe.desktop;imv.desktop; +image/gif=org.gnome.Loupe.desktop;imv.desktop; +image/webp=org.gnome.Loupe.desktop;imv.desktop; +image/bmp=org.gnome.Loupe.desktop;imv.desktop; +image/tiff=org.gnome.Loupe.desktop;imv.desktop; diff --git a/packages/omamobile-apps/test/all b/packages/omamobile-apps/test/all index c0faa4a1b..d41902bf0 100755 --- a/packages/omamobile-apps/test/all +++ b/packages/omamobile-apps/test/all @@ -45,3 +45,11 @@ grep -qx omaphone <<<"$deps" && grep -qx omamessages <<<"$deps" || fail "omaphon ok "omaphone and omamessages are dependencies" ! grep -qxE 'omamobile-(mmd|modem|modem-sit)' <<<"$deps" || fail "no modem package in depends" ok "no modem package in depends" +grep -qE '^ +loupe +#' "$here/PKGBUILD" && ok "Loupe is a dependency" +m=$here/mimeapps.list +for type in png jpeg gif webp bmp tiff; do + grep -qx "image/$type=org.gnome.Loupe.desktop;imv.desktop;" "$m" || fail "image/$type opens in Loupe, then imv" +done +ok "images open in Loupe, with imv behind it" +grep -q 'install -Dm644 mimeapps.list "$pkgdir/etc/xdg/mimeapps.list"' "$here/PKGBUILD" || fail "the defaults go to /etc/xdg" +ok "the defaults are installed to /etc/xdg/mimeapps.list" diff --git a/packages/omamobile-apps/version b/packages/omamobile-apps/version index 0c62199f1..ee1372d33 100644 --- a/packages/omamobile-apps/version +++ b/packages/omamobile-apps/version @@ -1 +1 @@ -0.2.1 +0.2.2 diff --git a/packages/omamobile-omarchy/patches/0020-notifications-touch-phrasing-for-keyboard-and-click-hints.patch b/packages/omamobile-omarchy/patches/0020-notifications-touch-phrasing-for-keyboard-and-click-hints.patch index d1d35d2b4..2f30027af 100644 --- a/packages/omamobile-omarchy/patches/0020-notifications-touch-phrasing-for-keyboard-and-click-hints.patch +++ b/packages/omamobile-omarchy/patches/0020-notifications-touch-phrasing-for-keyboard-and-click-hints.patch @@ -1,8 +1,10 @@ # Notifications: platform phrasing. Omarchy's notifications say "click" and # give "Super + ..." shortcuts, which a phone can't follow: the screenshot # toast reads "Edit with Super + Alt + , (or click this)". On a touch platform -# omarchy-notification-send rewords them as it sends: "Edit/Open with ... -# (or click this)" becomes "Tap to edit/open", a leading "Click to" becomes +# omarchy-notification-send rewords them as it sends: "Edit with ... (or +# click this)" becomes "Tap to view" (the phone's screenshot editor is an +# image viewer, Omarchy Mobile's omamobile-screenshot-open), "Open with ... +# (or click this)" "Tap to open", a leading "Click to" becomes # "Tap to", Voxtype's "Hold F9 ..." points at the Dictation tile, a # parenthesised Super hint is removed, and a body line that is only a Super # hint is dropped. Anything else passes through as written, and a desktop @@ -35,7 +37,7 @@ diff --git i/bin/omarchy-notification-send w/bin/omarchy-notification-send + local hint_re='^(.*) \([^)]*Super \+[^)]*\)(.*)$' line kept=() drop_lines=$2 + + case $text in -+ "Edit with "*" (or click this)") text="Tap to edit" ;; ++ "Edit with "*" (or click this)") text="Tap to view" ;; + "Open with "*" (or click this)") text="Tap to open" ;; + "Hold F9 to dictate (or toggle with Super + Ctrl + X).") text="Use the Dictation tile in quick settings." ;; + "Click to "*) text="Tap to ${text#Click to }" ;; diff --git a/packages/omamobile-omarchy/test/patches.py b/packages/omamobile-omarchy/test/patches.py index 67fe7171f..fd4ecfa13 100755 --- a/packages/omamobile-omarchy/test/patches.py +++ b/packages/omamobile-omarchy/test/patches.py @@ -764,7 +764,7 @@ def osk(): # 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 = [ - (("Screenshot saved to clipboard and file", "Edit with Super + Alt + , (or click this)"), "Tap to edit"), + (("Screenshot saved to clipboard and file", "Edit with Super + Alt + , (or click this)"), "Tap to view"), (("Screen recording saved", "Open with Super + Alt + , (or click this)"), "Tap to open"), (("Update System", "Click to update the system."), "Tap to update the system."), (("Setup Wi-Fi", "Click to configure the wireless network."), "Tap to configure the wireless network."), diff --git a/packages/omamobile-omarchy/version b/packages/omamobile-omarchy/version index baec65a93..013adb716 100644 --- a/packages/omamobile-omarchy/version +++ b/packages/omamobile-omarchy/version @@ -1 +1 @@ -0.1.28 +0.1.30 diff --git a/packages/omamobile-shell/README.md b/packages/omamobile-shell/README.md index 7c78cf1a2..75a6f6799 100644 --- a/packages/omamobile-shell/README.md +++ b/packages/omamobile-shell/README.md @@ -23,6 +23,8 @@ Omarchy Mobile's phone profile for Omarchy's own shell. It isn't a fork: these a | `bin/omamobile-setup-user` | Omarchy Mobile's per-user setup (Omarchy lifecycle `setup-user`); `--adopt`, for a user set up by hand rather than by firstboot, marks the once-only steps that would overwrite or repeat what that user has (the shell profile, the monitor scale, the cursor and keyboard lines, the screensaver, Files' click policy) done without running them; the other steps run as for a new user (missing phone plugins and an idle block go into `shell.json`, Chromium's flags are written), and the setup service then runs at each login | | `bin/omamobile-launch` | One app per screen: every launch from the shell (drawer, home screen, widgets, links, the agent) gets a new empty workspace through a per-launch Hyprland exec rule, or focuses the app's open window; and the switcher's "Show with…" and "Move to its own screen" | | `bin/omamobile-osk-watch` | Reports squeekboard's visibility (sm.puri.OSK0) to the fingerprint, keyboard and launcher plugins | +| `bin/omamobile-screenshot-open` | What a screenshot toast's tap ("Tap to view", patch 0020) opens on a phone (`OMARCHY_SCREENSHOT_EDITOR`, set in `environment.d/30-omamobile-screenshot.conf`; Omarchy passes the saved file's path): the screenshot in Loupe (omamobile-apps), fitted, with touch zoom, pan and swipe, and Loupe's copy, share and delete. Tensaku, Omarchy's default, can't be panned or zoomed by touch; without Loupe it is the fallback, through `omamobile-screenshot-edit` | +| `bin/omamobile-screenshot-edit` | Tensaku as Omarchy opens a screenshot in it (`tensaku-edit`), with GTK's simple input-method context so the on-screen keyboard doesn't come up over the image (show it by hand for the text tool). `omamobile-setup-user` gives Tensaku's own entry (drawer, Loupe's Open With) the same context once, and `hypr/phone.lua` maximizes its window, which Omarchy floats by class | | `bin/omamobile-osk-guard` | Turns the on-screen keyboard (`screen-keyboard-enabled`) back on when it was left off with no screensaver running (a user unit for every graphical session) | | `bin/omamobile-sleepd` | Sleep (s2idle) once the screen has been off behind a secure lock for `OMAMOBILE_SLEEP_AFTER_OFF` s (30), and again 5 s after a dark resume; `now` for the power key (`omamobile-keys`), `check` to see what holds it awake. Refuses with the screen on, Stay awake on, an SSH session open, a logind sleep block inhibitor (calls, GNSS) or a RUNNING PipeWire sink. A user unit for every graphical session, **off until `omarchy-toggle omamobile-sleep on`** (device/cheetah/SUSPEND-PLAN.md 6.2) | | `bin/omamobile-weather` | The current weather for the lock screen's glance (`~/.local/state/omamobile/weather.json`, with the `source` it used) from Open-Meteo, at login and every 30 minutes (`omamobile-weather.timer`, a user unit for every graphical session). Where, in order: the phone's position from GeoClue at city accuracy, at most every 3 h and only while the Location switch is on and GeoClue has an agent for the user (omamobile-gnss's unit, or any other instance of GeoClue's demo agent the user runs; never a prompt); the setting `~/.config/omamobile/weather.json` (`omamobile-weather set "State College, PA" F`, or `{"latitude", "longitude"}`; `"location": "fixed"` puts it before the position); the home screen's today widget's city, or the weather widget's named place. Unit: the setting's, else the locale's. A failure keeps the old reading; a run that starts before the network is back (login, or the catch-up run on resume) tries again with backoff for up to 75 s and then gives up without failing the unit. `omamobile-weather show` says where it would look | diff --git a/packages/omamobile-shell/bin/omamobile-screenshot-edit b/packages/omamobile-shell/bin/omamobile-screenshot-edit new file mode 100755 index 000000000..fe8fe3ae0 --- /dev/null +++ b/packages/omamobile-shell/bin/omamobile-screenshot-edit @@ -0,0 +1,20 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# Tensaku, as Omarchy opens a screenshot in it (tensaku-edit), without the +# on-screen keyboard: the fallback of omamobile-screenshot-open when Loupe +# isn't installed. +# +# Tensaku's window takes keyboard focus for its shortcuts and its text tool +# through a GTK input-method context, and with the session's +# GTK_IM_MODULE=wayland that focus asks for text input at once, so +# squeekboard came up over the screenshot with nothing to type. GTK's +# built-in simple context never talks to the text-input protocol, so the +# keyboard stays down; keys still arrive as key events, so a text annotation +# is typed with the keyboard shown by hand (double-tap the home pill, or the +# Keyboard tile). Tensaku opened from its launcher entry or an app's Open +# With gets the same context from omamobile-setup-user's override of that +# entry. +# +# The window itself is tiled and maximized by hypr/phone.lua. +export GTK_IM_MODULE=gtk-im-context-simple +exec tensaku-edit "$@" diff --git a/packages/omamobile-shell/bin/omamobile-screenshot-open b/packages/omamobile-shell/bin/omamobile-screenshot-open new file mode 100755 index 000000000..0ea8b5e90 --- /dev/null +++ b/packages/omamobile-shell/bin/omamobile-screenshot-open @@ -0,0 +1,17 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# What a screenshot toast's tap ("Tap to view") opens on a phone: the saved +# screenshot in Loupe, the image viewer (omamobile-apps), which fits it to the +# screen and takes touch (pinch and double-tap to zoom, drag to pan, swipe to +# the next image) and offers copy, share and delete. +# +# Omarchy runs $OMARCHY_SCREENSHOT_EDITOR with the screenshot's path as its +# one argument (omarchy-capture-screenshot), and +# environment.d/30-omamobile-screenshot.conf points it here. Its default, +# Tensaku, is a desktop annotation tool: even maximized, most of the image +# was out of view and it could be neither panned nor zoomed by touch. Without +# Loupe this falls back to Tensaku, through omamobile-screenshot-edit. +if command -v loupe >/dev/null 2>&1; then + exec loupe "$@" +fi +exec omamobile-screenshot-edit "$@" diff --git a/packages/omamobile-shell/bin/omamobile-setup-user b/packages/omamobile-shell/bin/omamobile-setup-user index bb61fbdce..574501017 100755 --- a/packages/omamobile-shell/bin/omamobile-setup-user +++ b/packages/omamobile-shell/bin/omamobile-setup-user @@ -115,6 +115,32 @@ for id in org.gnome.DiskUtility org.gnome.Evince org.gnome.Snapshot fcitx5-confi fi done +# Images open in Loupe on a phone (omamobile-apps makes it the default): it +# takes touch (pinch and double-tap to zoom, swipe between images), and imv, +# Omarchy's viewer, reads no touchscreen input at all. Loupe's entry is named +# "Image Viewer", and so is Omarchy's imv entry, which Omarchy's skeleton put +# in the user's own applications. Hidden once, while Loupe is installed, so +# the drawer lists one Image Viewer; imv stays installed and runnable, and a +# user who takes the line out keeps it. +if [[ -f $sysapps/org.gnome.Loupe.desktop && -f $apps/imv.desktop ]] && omarchy-done ensure omamobile-hide-imv; then + if ! grep -c '^NoDisplay=true$' "$apps/imv.desktop" >/dev/null; then + sed -i -e '/^NoDisplay=/d' -e '/^\[Desktop Entry\]/a NoDisplay=true' "$apps/imv.desktop" + fi +fi + +# Tensaku opened from its entry (the drawer, or Loupe's Open With) runs with +# GTK's simple input-method context, as omamobile-screenshot-edit runs it, so +# the on-screen keyboard doesn't come up over the image. A copy of the entry +# in the user's applications, once, when Tensaku is installed; a user who +# removes it gets Tensaku's own entry back. +if [[ -f $sysapps/dev.tensaku.Tensaku.desktop && ! -e $apps/dev.tensaku.Tensaku.desktop ]] && + omarchy-done ensure omamobile-tensaku-no-osk; then + mkdir -p "$apps" + sed -e 's/^Exec=tensaku /Exec=env GTK_IM_MODULE=gtk-im-context-simple tensaku /' \ + -e 's/^Exec=tensaku$/Exec=env GTK_IM_MODULE=gtk-im-context-simple tensaku/' \ + "$sysapps/dev.tensaku.Tensaku.desktop" >"$apps/dev.tensaku.Tensaku.desktop" +fi + # PIN or password (omamobile-set-pin records it): phones set up before the # choice existed used a PIN with the lock's number pad, so record that, once. if omarchy-done ensure omamobile-credential-type; then diff --git a/packages/omamobile-shell/environment.d/30-omamobile-screenshot.conf b/packages/omamobile-shell/environment.d/30-omamobile-screenshot.conf new file mode 100644 index 000000000..bbb365796 --- /dev/null +++ b/packages/omamobile-shell/environment.d/30-omamobile-screenshot.conf @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: MIT +# Omarchy Mobile: a screenshot toast's tap ("Tap to view") opens the +# screenshot in the image viewer (Loupe) through omamobile-screenshot-open, +# not in Tensaku, a desktop annotation tool. Omarchy's +# omarchy-capture-screenshot reads this; its default is tensaku-edit. +OMARCHY_SCREENSHOT_EDITOR=omamobile-screenshot-open diff --git a/packages/omamobile-shell/hypr/phone.lua b/packages/omamobile-shell/hypr/phone.lua index f1c9f35a7..b511be201 100644 --- a/packages/omamobile-shell/hypr/phone.lua +++ b/packages/omamobile-shell/hypr/phone.lua @@ -43,6 +43,12 @@ hl.window_rule({ -- bar and the on-screen keyboard, like a phone sheet. After the modal rule, -- so a modal chooser is a sheet too. Nautilus's own windows tile anyway. hl.window_rule({ match = { class = "^org.gnome.Nautilus$" }, float = false, maximize = true }) +-- Tensaku, the screenshot editor (Open With, or the toast without Loupe): Omarchy floats +-- it by class (default/hypr/apps/system.lua), not through the floating-window +-- tag the first rule drops, so it opened as a desktop-sized float (814x936 on +-- a 480 px wide screen) with the screenshot cut off. Tiled and maximized, the +-- canvas gets the screen and fits the image to it. +hl.window_rule({ match = { class = "^dev.tensaku.Tensaku$" }, float = false, maximize = true }) -- Picture-in-picture (TOUCH-PLAN 3.5): Omarchy floats it, pinned, at 600x338, -- wider than the screen, and the maximize rule above made it fill the diff --git a/packages/omamobile-shell/install b/packages/omamobile-shell/install index d6610c9b3..6cce68309 100755 --- a/packages/omamobile-shell/install +++ b/packages/omamobile-shell/install @@ -20,6 +20,7 @@ while IFS= read -r -d '' file; do install -Dm644 "$file" "$destination/usr/share/omamobile/shell/widget-${file#widgets/}" done < <(find widgets/template widgets/examples -type f -print0) install -Dm644 environment.d/20-omamobile-osk.conf "$destination/usr/lib/environment.d/20-omamobile-osk.conf" +install -Dm644 environment.d/30-omamobile-screenshot.conf "$destination/usr/lib/environment.d/30-omamobile-screenshot.conf" # squeekboard's layouts with our action row (GPL-3.0-or-later, from # squeekboard): the terminal layout by hand, every language's made by # squeekboard/generate; omamobile-setup-user links them into the user's data diff --git a/packages/omamobile-shell/test/all b/packages/omamobile-shell/test/all index c4f5699bb..1254ccde0 100755 --- a/packages/omamobile-shell/test/all +++ b/packages/omamobile-shell/test/all @@ -957,6 +957,28 @@ grep -cx 'GTK_USE_PORTAL=1' "$env_d" >/dev/null || fail "GTK 3 file choosers use grep -cx 'GDK_DEBUG=portals' "$env_d" >/dev/null || fail "GTK 4 file choosers use the portal" pass "session environment" +# Screenshots: the toast's tap ("Tap to view") opens the screenshot in Loupe +# through omamobile-screenshot-open, and in Tensaku only without Loupe, then +# through omamobile-screenshot-edit: Omarchy's own tensaku-edit with GTK's +# simple input-method context, so the on-screen keyboard stays down. +shot_d=environment.d/30-omamobile-screenshot.conf +if grep -nE '^[A-Za-z_][A-Za-z0-9_]*=$' "$shot_d"; then fail "$shot_d sets no empty values"; fi +grep -cx 'OMARCHY_SCREENSHOT_EDITOR=omamobile-screenshot-open' "$shot_d" >/dev/null || fail "Omarchy's screenshot editor is the phone's viewer wrapper" +bash -n bin/omamobile-screenshot-open || fail "omamobile-screenshot-open parses" +bash -n bin/omamobile-screenshot-edit || fail "omamobile-screenshot-edit parses" +shot=$(mktemp -d) +mkdir "$shot/with" "$shot/without" +printf '#!/bin/sh\nprintf "tensaku-edit|%%s|%%s\\n" "$GTK_IM_MODULE" "$*"\n' >"$shot/without/tensaku-edit" +printf '#!/bin/sh\nprintf "loupe|%%s\\n" "$*"\n' >"$shot/with/loupe" +cp bin/omamobile-screenshot-edit "$shot/without/" +chmod +x "$shot"/with/* "$shot"/without/* +[[ $(PATH="$shot/with:$shot/without" "$BASH" bin/omamobile-screenshot-open "/p/shot one.png") == "loupe|/p/shot one.png" ]] \ + || fail "the toast's tap opens the screenshot in Loupe" +[[ $(GTK_IM_MODULE=wayland PATH="$shot/without" "$BASH" bin/omamobile-screenshot-open "/p/shot one.png") == "tensaku-edit|gtk-im-context-simple|/p/shot one.png" ]] \ + || fail "without Loupe, Tensaku opens with GTK's simple input context" +rm -rf "$shot" +pass "screenshot toast: Loupe, or Tensaku without the on-screen keyboard" + bash -n bin/omamobile-setup-user || fail "omamobile-setup-user parses" bash test/setup-user.sh || fail "omamobile-setup-user against a scratch home" bash -n bin/omamobile-osk-guard || fail "omamobile-osk-guard parses" @@ -1002,6 +1024,8 @@ if command -v desktop-file-validate >/dev/null; then desktop-file-validate "$u" || fail "Updates desktop entry validates" fi [[ -x $tmp/root/usr/bin/omamobile-launch ]] || fail "install stages omamobile-launch" +[[ -x $tmp/root/usr/bin/omamobile-screenshot-open && -x $tmp/root/usr/bin/omamobile-screenshot-edit && -f $tmp/root/usr/lib/environment.d/30-omamobile-screenshot.conf ]] \ + || fail "install stages the screenshot editor and its session variable" for layout in terminal/us.yaml terminal/us_wide.yaml us.yaml us_wide.yaml; do [[ -f $tmp/root/usr/share/omamobile/squeekboard/keyboards/$layout ]] || fail "install stages the $layout layout" done diff --git a/packages/omamobile-shell/test/phone-rules.lua b/packages/omamobile-shell/test/phone-rules.lua index 93b669243..c28f4dbc7 100644 --- a/packages/omamobile-shell/test/phone-rules.lua +++ b/packages/omamobile-shell/test/phone-rules.lua @@ -94,6 +94,10 @@ local nautilus = { class = "^org.gnome.Nautilus$" } check(effect(nautilus, "maximize") == true and effect(nautilus, "float") == false and index(nautilus, "maximize") > index(modal, "maximize"), "the portal's file chooser is still a full sheet") +local tensaku = { class = "^dev.tensaku.Tensaku$" } +check(effect(tensaku, "maximize") == true and effect(tensaku, "float") == false, + "Tensaku (the screenshot editor) is tiled and maximized, not Omarchy's float") + local pip = { tag = "pip" } local size, move = effect(pip, "size"), effect(pip, "move") check(effect(pip, "maximize") == false and type(size) == "table" and size[1] == 300 and size[2] == 169, diff --git a/packages/omamobile-shell/test/setup-user.sh b/packages/omamobile-shell/test/setup-user.sh index 04ea7620e..1a128319c 100644 --- a/packages/omamobile-shell/test/setup-user.sh +++ b/packages/omamobile-shell/test/setup-user.sh @@ -108,6 +108,30 @@ run grep -qx 'NoDisplay=true' "$U/foot-server.desktop" || fail "an app installed later is hidden" pass "desktop and admin apps are hidden once each, when installed, and a user's choice is kept" +# Omarchy's "Image Viewer" (imv, the skeleton's copy in the user's +# applications) gives way to Loupe's, once, and only while Loupe is installed +printf '[Desktop Entry]\nName=Image Viewer\nExec=imv %%F\nType=Application\n' >"$U/imv.desktop" +run +grep -c '^NoDisplay' "$U/imv.desktop" >/dev/null && fail "imv stays in the drawer without Loupe" +printf '[Desktop Entry]\nType=Application\nName=Image Viewer\nExec=loupe %%U\n' >"$A/org.gnome.Loupe.desktop" +run +[[ $(sed -n 2p "$U/imv.desktop") == NoDisplay=true ]] && grep -qx 'Exec=imv %F' "$U/imv.desktop" \ + || fail "imv's entry is hidden once Loupe is installed, the rest kept" +sed -i '/^NoDisplay=true$/d' "$U/imv.desktop" +run +grep -c '^NoDisplay' "$U/imv.desktop" >/dev/null && fail "a user who shows imv again keeps it" +pass "imv's Image Viewer gives way to Loupe's, once" + +# Tensaku's entry (drawer, Open With) runs without the on-screen keyboard, once +printf '[Desktop Entry]\nName=Tensaku\nTryExec=tensaku\nExec=tensaku %%f\nType=Application\n' >"$A/dev.tensaku.Tensaku.desktop" +run +grep -qx 'Exec=env GTK_IM_MODULE=gtk-im-context-simple tensaku %f' "$U/dev.tensaku.Tensaku.desktop" && + grep -qx 'TryExec=tensaku' "$U/dev.tensaku.Tensaku.desktop" || fail "Tensaku's entry gets GTK's simple input context" +rm "$U/dev.tensaku.Tensaku.desktop" +run +[[ ! -e $U/dev.tensaku.Tensaku.desktop ]] || fail "a user who removes the Tensaku override keeps Tensaku's own entry" +pass "Tensaku's entry opens without the on-screen keyboard, once" + # Idle: a new user gets the profile's block and the screensaver toggle idle() { python3 -I -c 'import json, sys; print(json.dumps(json.load(open(sys.argv[1])).get("idle")))' "$1/.config/omarchy/shell.json"; } toggle() { [[ -e $1/.local/state/omarchy/toggles/screensaver-off ]]; } diff --git a/packages/omamobile-shell/version b/packages/omamobile-shell/version index 4b43c769c..d30ff0e30 100644 --- a/packages/omamobile-shell/version +++ b/packages/omamobile-shell/version @@ -1 +1 @@ -0.2.86 +0.2.88