-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to detect if inside floating Termux #51
Comments
Next version will export |
Will we still be able to have both a normal terminal and a floating terminal open at the same time? And two separate shortcuts on the home screen, one for the floating terminal and one for the normal terminal? |
I haven't really thought much of the design but supporting both at same time would complicate things a lot, but might be possible, will see what can be done. It won't happen anytime soon anyways, much higher priority things to work on in coming months. |
I also would like to run some code only in Termux:Float. I thought I had a solution by putting this in my bashrc:
And setting: I think this should work, however I can't get |
For whatever it's worth, I no longer have any foreseeable use for this part:
|
The |
Feature Description
I want a way for scripts/programs in Termux to detect if the current terminal is shown in the floating Termux window.
Couple possible ways, doesn't matter to me which:
Have Termux's floating app export an additional environment variable, for example
TERMUX_FLOAT
, before starting the user's shell.Add a program to
termux-api
, for exampletermux-api-in-floating-window
, which could for example report the value as the exit status.Why
I use both Termux and Termux:Float, and they have different roles in my workflow. It would help me make my tools automatically do what I want if I could code them to know which of the two they're in.
Current Alternatives
I can think of two currently possible ways to get close to this:
Manually running a command when I start Termux:Float, which would set up some indicator that I'm in a floating window, but that's an extra manual step every time, and not exactly reliable if I forget.
Checking the terminal size, but that's really not reliable if I resize the terminal, change Termux font size, or use something like a terminal multiplexer.
The text was updated successfully, but these errors were encountered: