Skip to content

omamobile-shell 0.2.156: going home and switching apps fade instead of cutting - #923

Merged
derekross merged 5 commits into
derekross:mainfrom
W4HO-ham:shell-workspace-fade
Nov 25, 2026
Merged

derekross merged 5 commits into
derekross:mainfrom
W4HO-ham:shell-workspace-fade

Conversation

@W4HO-ham

@W4HO-ham W4HO-ham commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Draft, from reading this again. It changes what every phone shows, and it has run only on a Pixel 9a: by a hand edit of the installed phone.lua (my palmtop runs a local shell build), and since the last push as the two lines given to Hyprland 0.57.0 with hyprctl eval, which took the curve and the animation with no config errors. I have no 7 Pro. If you would rather it were the 9a's alone until someone runs it there, I will move it into the device file 0.2.135 added (/usr/share/omamobile/hypr/device.lua); say which.

New in this push: the fade uses a curve phone.lua defines itself (Omarchy's easeOutQuint by value), since Hyprland rejects an animation whose curve it does not know; the test checks it; the README and a comment say how to get the cut back.

Not run yet, on any phone: an app opening from home, switching from app to app through the switcher, the keyboard up, the lock, rotation. Not run at all: a Pixel 7 Pro, and Omarchy 4.0.6.

Every app has a workspace of its own on the phone (omamobile-launch), so going home and switching apps are workspace switches. Omarchy turns the workspace animation off, as a desktop wants, so on the phone the app was gone in one frame: a cut, where Android fades. phone.lua now gives the workspaces a 200 ms fade (easeOutQuint). Windows opening and closing keep Omarchy's own animations, and nothing else changes.

On my palmtop (Pixel 9a, Hyprland 0.57.0): with this line in the installed phone.lua and my own copy of it commented out, a config reload gave no config errors, and hyprctl animations read the workspaces leaf as enabled, style fade, speed 2.00, from phone.lua alone. Frames stayed at 120 Hz through going home with the fade on: timed by the display plane's framebuffer changing in debugfs, read every millisecond, two home swipes had 2 frames later than 12.5 ms out of 144 and 112.

Tests: test/phone-rules.lua gains a stub for hl.animation and checks that the workspaces leaf fades in at most 300 ms and that phone.lua changes no other animation; test/phone-dictation.lua gets the same stub. The package's test/all and tools/pr-check origin/main pass.

Users who set their own workspace animation in looknfeel.lua before the line that loads phone.lua would have it replaced by this one. I didn't find a way to read the current animation from the Lua config to skip that case.

…f cutting

Every app has a workspace of its own (omamobile-launch), so going home and switching apps are workspace switches, and Omarchy turns the workspace animation off, as a desktop wants: on the phone the app was gone in one frame. phone.lua gives the workspaces a 200 ms fade on a curve it defines itself (Omarchy's easeOutQuint, by value: Hyprland rejects an animation whose curve it doesn't know); windows opening and closing keep Omarchy's own animations. One line after phone.lua's gets the cut back.

Tested: test/phone-rules.lua checks the fade, its curve and that no other animation changes. On a Pixel 9a only, by a hand edit of the installed phone.lua: Hyprland 0.57.0 loaded it with no config errors, the workspaces leaf read fade at speed 2, and frames stayed at 120 Hz through going home. Not run on a Pixel 7 Pro.

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for putting this up as a draft and for the list of what hasn't run; that list is the review. The direction looks right to me: a cut where every other phone fades is one of the things that makes the shell feel unfinished, the curve is defined in phone.lua so nothing rests on a name from Omarchy's file (I compared the points with Omarchy 4.5's easeOutQuint: the same), and the README says how an owner gets the cut back.

On your question, shared or the 9a's alone: I lean towards keeping it in phone.lua for every phone and trying it on my Pixel 7 Pro before it merges, rather than moving it into the device file and back out again. I'll confirm once I have the phone in hand; no need to move anything yet.

Before it leaves draft I'd like it run as the installed package, with these three looked at in particular, since they are where a workspace fade meets something else that animates or powers down:

  • recent apps: opening the switcher from an app and picking another, for a double image under the cards;
  • Power pressed straight after a swipe home, a few times, and the journal afterwards (the screen has to go off cleanly mid-fade);
  • a rotation during or just after a switch (our Hyprland build already fades the old frame across a turn).

And one question: phones still on Omarchy 4.0.6 load the same phone.lua. Do you know what the Hyprland on those phones does with these two calls, and whether the rest of the file still loads if it rejects them?

I didn't check anything on a phone, the fade's cost on the 7 Pro's larger panel, or 4.0.6. It merges cleanly with #896, which edits the same file and tests, and the Lua test passes on the two together.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Thank you. I had the palmtop unlocked for a while tonight and ran what I could. It is still not the installed package: my palmtop runs a local build of the shell, so the two lines went in with hyprctl eval (Hyprland 0.57.0, animations reporting bezier: omamobileWorkspaceFade, enabled: 1, speed: 2.00), on the daily bring-up kernel. Screenshots are from grim, about a third of a second each, so each catches one moment of a change.

Recent apps, picking another app. Two terminals on two workspaces, the switcher opened from one, the other's card tapped, a screenshot 20 ms after the tap. That frame has three things at once: the switcher's scrim and card outlines still up, the new app's content already at full strength at the top, and the home screen (wallpaper, icons) showing through faintly under both. So there is a moment of double image under the cards, as you suspected: with both workspaces part-way through their fade, the home layer behind them shows. Frames 120 ms and later show only the new app. I didn't see it by eye in two days of use, but it is there in the frame. Without the fade the home layer can't show, since nothing is ever part transparent.

The display going off in the middle of going home. From an app: focus({ workspace = "empty" }), then DPMS off 0, 30, 60, 100, 150 and 200 ms later. Each time the monitor read DPMS off and the backlight off within 2 s, and came back with the right workspace. No ERR line from Hyprland, no DRM or DECON error and no coredump in the journal for the run. One caution on what this shows: the first round was from the unlocked session; it locked the palmtop (as a screen-off should), so the other five ran with the lock up, and none was a real Power press.

A rotation during a switch. Not tested. By then the palmtop was locked, and the lock holds the screen upright; the three rotations I sent went through with the lock up and say nothing about the fade.

Omarchy 4.0.6. I don't know, and have no phone on it. If its Hyprland takes hl.animation but not hl.curve, the animation line would name a curve that doesn't exist; wrapping the two calls in pcall so the rest of phone.lua loads either way is cheap and I'll add it if you want it before anyone can try 4.0.6.

Given the first result, do you still want it shared? A fade that lets the home screen flash through for a frame or two when switching between two apps may be worse than the cut on a slower panel. If the fade should only run for going home and coming back (where the home screen is one of the two ends), I can look at whether Hyprland can tell those cases apart.

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for running these, and for saying exactly what each run did and didn't show. The first result is the useful one: a frame or two where the home screen shows through both workspaces when going from one app to another is what I was afraid of under the cards, and you found it in the frame even though the eye missed it for two days.

On your question, I don't want to decide it from a description. I'll put the two lines on my Pixel 7 Pro the way you did and look at app-to-app switches on the larger panel, then say which way I want it: shared as it is, only where the home screen is one of the two ends, or left as a cut. If you have the time to find out whether Hyprland can tell those cases apart, that would help me choose; please don't spend long on it before I've looked.

Smaller things, for whenever you next push:

  • Yes to the pcall around the two calls. It is cheap, and the rest of phone.lua must load whatever Hyprland makes of them.
  • The version file says 0.2.138, which main has taken since; leave it, I'll set the number when it merges.
  • Still open from the list: a rotation during a switch, a real Power press straight after a swipe home (not hyprctl, and from the unlocked session), and the same as an installed package.

A Hyprland that refuses the curve or the animation keeps its cut, and the rest of phone.lua (the lock after boot, the binds, the device's rules) still loads. The rules test runs once with both calls raising an error.
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

The pcall is in (9a94e53): both calls run under it, and test/phone-rules.lua runs once more with hl.curve and hl.animation raising an error, where the rest of phone.lua has to load and every other check has to hold. With the pcall taken off the animation line that run fails at the call. version is left as it was.

Still open on my side, as you list them: a rotation during a switch, a real Power press straight after a swipe home from the unlocked session, and the same as an installed package. I'll look at whether Hyprland can tell a switch with the home screen at one end from an app-to-app one after you've seen it on the larger panel.

@zentis666

Copy link
Copy Markdown

A Pixel 7 Pro run of the fade, the way you ran it, with the phone's owner judging it by eye. In short: no config errors, frame pacing the same with and without it, and the owner prefers the fade. The one thing it adds is a little more flicker on an app switch with the keyboard up.

Phone: Pixel 7 Pro (cheetah), release install, kernel 7.3.0-rc6-omamobile-gda171eae4cb7, Hyprland 0.57.0-3.3, Omarchy 4.5.0-3, omamobile-shell 0.2.132-1 (looknfeel.lua loads phone.lua as shipped), panel mode 1440x3120 at 120 Hz.

How: not the package. These are this PR's two calls given to the running Hyprland with hyprctl eval:

hl.curve("omamobileWorkspaceFade", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } })
hl.animation({ leaf = "workspaces", enabled = true, speed = 2, bezier = "omamobileWorkspaceFade", style = "fade" })

Both returned ok, and hyprctl configerrors was empty. hyprctl animations then read the workspaces leaf as enabled: 1, speed: 2.00, bezier: omamobileWorkspaceFade, style: fade; before, it was enabled: 0, bezier: default. Afterwards hl.animation({ leaf = "workspaces", enabled = false }) put it back, and it read enabled: 0, bezier: default, speed: 1.00 again.

Frame timing, as on your palmtop: plane-0's framebuffer id in /sys/kernel/debug/dri/1c240000.display-controller/state, read about every millisecond (one read takes 0.03 ms), over 75 s. In that window the owner swiped home from the terminal and reopened it, 5 times. Intervals under 100 ms count as motion.

the cut (main) the fade
flips recorded 1494 2309
intervals in motion 1457 2272
median, 90th, 99th percentile 17.5, 19.0, 37.9 ms 17.5, 18.8, 34.4 ms
intervals over 33 ms 21 25

The fade draws frames the cut doesn't, hence more flips; the pacing doesn't change. One thing that isn't this PR's: in motion this phone flips about every 17.5 ms in both cases, so about 57 per second, though the mode is 120 Hz. Your 9a held 120.

By eye, your "not run yet" list, first with the fade and then the same steps with the cut:

with the fade with the cut
an app opening from home fades, looks clean cut
app to app through the switcher, back to the terminal with the keyboard up a little flicker a little less flicker
keyboard up, then home slight flicker, barely noticeable (with the row above: a little less)
lock, PIN, unlock the keyboard flickers and resizes after the PIN the same
rotation, home screen and in apps rows resize and redraw, a bit odd, works took longer, more flicker

So the unlock flicker isn't the fade's, and rotation was no worse with it (one try each way, so I wouldn't read the "better" into it). The switch with the keyboard up is where the fade adds a little. The owner's preference is the fade.

On your question in the description: it has now run on a 7 Pro, and nothing here argues for moving it into the 9a's device file. That's for you and Derek, of course.

Not run: the built package (so not the pcall path in a real config load either), Omarchy 4.0.6, and a recording. The owner offered to record the switch flicker if that would help you.

Posted from the phone owner's account. An AI coding agent (Claude Code) set the animation and timed the frames over ssh. The observations by eye are the owner's, written up by the agent.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Thank you, and thank the owner for looking at each step twice. That answers the question I had left open in the description: it runs on the 7 Pro's panel with nothing in configerrors, the pacing is the same with and without it, and the place it costs something is the one you name, a switch with the keyboard up.

Yes please to the recording of that switch, if the owner still has a minute for it: it is the case Derek wants to judge on the larger panel, and on my palmtop the frame where the home screen showed through was only findable in a capture, not by eye. With the keyboard up I'd expect the same frame plus the keyboard's own resize in it.

The 57 flips a second in a 120 Hz mode isn't this change's, as you say, but it is worth its own issue with your numbers: the 9a held 120 in the same measurement.

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, the pcall is as I'd hoped. I ran test/phone-rules.lua on your branch merged with today's main: it passes as it is and with FADE_CASE=refused, and taking the pcall off either line makes the refused run fail at that call, so both are really tested.

One thing for the next push: main's shell moved to 0.2.139, so the branch now conflicts in version (and only there), and GitHub runs no checks on a branch that conflicts. If you merge main and keep main's line, the checks will run; I'll still set the number when it merges.

The choice between the shared fade, a fade only with the home screen at one end, and the cut is still mine to make after I've looked at it on the 7 Pro, and I haven't yet. The three runs you list stay open until then; no need to do more before I've looked.

# Conflicts:
#	packages/omamobile-shell/version

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the merge, which is exactly what I asked: only the version line resolved, your two calls and the test unchanged, and the checks ran green on it. Thanks also to zentis666 and the phone's owner for the run on a 7 Pro; the frame timings with and without the fade and the one place it costs something (an app switch with the keyboard up) are what I needed to look for.

The decision is still mine and I haven't made it yet: I'll look at it on my own 7 Pro first, as I said, with the keyboard-up switch in particular. No need to do more on this until then; if the owner does make the recording of that switch, please post it here.

@W4HO-ham
W4HO-ham marked this pull request as ready for review November 24, 2026 22:07
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Out of draft: nothing is left on my side. It has run on the 9a and, through zentis666, on a 7 Pro, so what remains is your own try on your 7 Pro, with the keyboard-up switch in particular, and your decision.

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, and noted: nothing more is needed from you on this one. It's my turn: I'll try it on my own Pixel 7 Pro, with the switch while the keyboard is up and a Power press straight after a swipe home, and then say here whether it goes in as it is, only for going home, or not at all. I checked it against today's main meanwhile: it merges cleanly and the window-rule tests pass on the merge. The version I'll set at merge.

@derekross

Copy link
Copy Markdown
Owner

Tested on the Pixel 7 Pro (release 2026.11.24 kernel), this branch at 64734644 merged with main (built locally as 0.2.157): hyprctl -j animations shows workspaces as fade at speed 2. App to home by the swipe, home to an app, a switch from recents, and the same switch with the on-screen keyboard up were all smooth; Power right after a swipe home darkens and locks as before.

Passes on the 7 Pro. Its version needs the next free number above main's 0.2.155 when it lands.

@W4HO-ham W4HO-ham changed the title omamobile-shell 0.2.138: going home and switching apps fade instead of cutting omamobile-shell 0.2.158: going home and switching apps fade instead of cutting Nov 25, 2026
@W4HO-ham W4HO-ham changed the title omamobile-shell 0.2.158: going home and switching apps fade instead of cutting omamobile-shell 0.2.156: going home and switching apps fade instead of cutting Nov 25, 2026
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 25, 2026
@derekross
derekross merged commit 2eea46b into derekross:main Nov 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants