-
Notifications
You must be signed in to change notification settings - Fork 101
Description
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.