Skip to content

feat(applaunch): Alt+Tab app switcher that keeps apps running - #292

Open
xnohat wants to merge 4 commits into
CardputerZero:masterfrom
xnohat:feat/applaunch-alt-tab-app-switcher
Open

xnohat wants to merge 4 commits into
CardputerZero:masterfrom
xnohat:feat/applaunch-alt-tab-app-switcher

Conversation

@xnohat

@xnohat xnohat commented Dec 1, 2026

Copy link
Copy Markdown

Summary

  • Alt+Tab (press, then release) opens a "Running apps" overlay from the home screen, any built-in page, or an external app. Tab/↑↓ select, Enter switches, Del/Backspace closes the selected app, Esc dismisses.
  • Built-in pages and terminal sessions now stay alive in the background when you switch away. They are no longer destroyed, and selecting the same app on the carousel brings back the running instance.
  • External .desktop apps launch through the new ExecSwitchable process command. On Alt+Tab the backend SIGSTOPs the app's process group and saves the framebuffer. ResumeSuspended <pgid> restores the framebuffer, drains input the stopped app queued on the shared evdev fd (via pidfd_getfd), and SIGCONTs the group. KillSuspended <pgid> terminates it. ExecBlocking is unchanged. The SDL backend treats ExecSwitchable like ExecBlocking.
  • The fresh-launch and resume paths share one framebuffer hand-off sequence (Launch::run_external). test_external_framebuffer_ownership.py was updated to assert the same ordering on it.
  • Trilingual process-API docs and AGENTS.md routing table updated.

Test plan

  • sh ext_components/cp0_lvgl/tests/run_tests.sh: all pass, including new test_app_switch_hotkey
  • projects/APPLaunch/tests/run_tests.sh: new test_app_switcher_model and the framebuffer contract pass. The SDL2-dependent tail of the script was not run because the host has no SDL2/freetype dev packages
  • aarch64 build (linux_x86_cross_cp0_config_defaults.mk) links cleanly
  • Harness for suspend/resume/terminate/exit-code with a fake keyboard FIFO: process states T → S → gone verified, input drain verified against a child holding the real evdev device
  • On-device: Alt+Tab out of zeroterm to Home and a built-in page, then back to zeroterm; close an app from the switcher

🤖 Generated with Claude Code

xnohat and others added 4 commits December 1, 2026 20:06
- Alt+Tab opens a list of running apps from the home screen, built-in pages
  and external apps; Tab/arrows select, Enter switches, Del closes, Esc dismisses
- Built-in and terminal pages stay alive in the background instead of being
  destroyed when leaving them
- External apps are launched via the new ExecSwitchable process command: Alt+Tab
  SIGSTOPs the process group and saves the framebuffer; ResumeSuspended restores
  it, drops input queued while stopped and continues; KillSuspended ends it
- Add unit tests for the hotkey detector and switcher model, update the
  framebuffer ownership contract test and the trilingual process API docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on the device

- build: cross profile against the SDK sysroot with aarch64-linux-gnu-* names
  pointing at the native gcc and SCons from a private venv, so the stock image
  needs no dev packages; -j is sized from available memory
- try: run the dist build in a transient unit with a time limit; the installed
  launcher is restored when it stops
- install/rollback: keep a one-time backup, swap the binary atomically and
  restart the launcher a few seconds later so the calling terminal can finish

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- install now copies dist/APPLaunch over /usr/share/APPLaunch, only touching
  files that differ and never deleting files owned by packages or store apps
- originals are saved once under /usr/share/APPLaunch.orig-resources and newly
  added files are recorded so rollback restores the tree exactly
- status reports the resource backup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- skip sudo when already root and reach the launcher's user systemd
  instance through runuser, so tools running under sudo can call it
- build always drops to the checkout owner so no root-owned files are left

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant