termux / termux/termux-api

termux-get-session-text - Getting visible session screen content and store it to the clipboard/file

Open
#608 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

Feature description
I have some web pages to which I would like to copy an URL. However the URL is displayed in the frame (elinks browser when = key is pressed), so the URL cannot be extracted with the native termux URL extractor. Ideally I could open another session and from the script I could get the visible text from the initial session:

# bash script content
text=$(termux-get-session-text $1)
extract_URL.pl "$text"

Parameter to the termux-get-session-text would be the session index.

Reference implementation

In the xfce4-terminal there is an option to select whole terminal visible text. Then the code of termux-clipboard-get could get the selected text.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the existing termux-clipboard-get code and the proposed termux-get-session-text command, then compare the reference behavior described for xfce4-terminal. Define how a session index selects the visible session content and verify that the result can be passed to a script or stored in the clipboard/file.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.