Repository navigation
feat(terminal): interactive PTY shells, tabs and background sessions - #20
Merged
Merged
Conversation
- Vendor terminal-emulator and terminal-view, built with the project SDK and NDK versions. - Add ProotCommand.interactiveArgv() for /bin/bash -l inside proot. - Add TerminalScreen with TerminalView, IME focus and soft keyboard. - Open the terminal from the environment card. - Update NOTICE with the Termux GPL-3.0 attribution.
- Keep sessions in a process-wide manager and a foreground service so shells survive the UI going to the background. - Add tabs with create and close actions, and name sessions Terminal N. - Add configurable Ctrl, Alt, Esc, Tab and arrow keys. - Add TerminalActivity with resizeable window support and a dedicated task for "Open in window", plus the task title with the session name. - Declare the specialUse foreground service and notification permission.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #6: an interactive terminal for each environment, with multiple sessions, background
persistence, configurable extra keys and external windows.
terminal-emulatorandterminal-view(GPL-3.0) inmobile/lib, built with theproject SDK and NDK.
termux-sharedis intentionally not vendored.TerminalSessioncreates the PTY through the vendored JNI and runslibproot.sowith/bin/bash -land the same mounts as the runtime.TerminalSessionManagerkeeps sessions per environment; aspecialUseforeground service keepsthe process alive and shows a notification.
Terminal Nfrom a per-environment counter.TerminalActivityis resizeable and launches withNEW_TASK | MULTIPLE_TASKand an empty taskaffinity, so Android can place it in a separate window; the task description shows the session.
NOTICEand ADR 0006 document the vendored code and the design.Test plan
./gradlew ktlintCheck lintStandardDebug testStandardDebugUnitTest assembleStandardDebugpasses.bashprompt,+createsTerminal 2,tabs switch, extra keys send sequences, "Open in window" opens a separate task, and the session
survives going to the home screen.
Android 13+, resizing in split screen/DeX.
Notes
specialUsetype andPOST_NOTIFICATIONSon Android 13+.