Closed RalfWerner closed 2 years ago
OTS=One-Touch-Start is the Termux behavior that starts with one tap on the App-Icon (startscreen) all (closed) processes for X11 and other via .bashrc
. Unfortunately, the description was deleted, to this and many other topics. So here again with:
echo '[ -z "$1" ]&& . uu.sh . .;t=$PREFIX/tmp X=Xwayland XDG_RUNTIME_DIR=$t;alias t="bash .bashrc"
c="am start -n com.termux" z="$c/.app.TermuxActivity" y="$c.x11/.MainActivity"; typeset -i i=0
z2="$z"; [ -n "$(pgrep m.termux.window)" ]&& z="$c/.window.TermuxFloatActivity"; export DISPLAY=:0
while [ -z "$(pgrep -o $X)" -a $i -lt 2 ];do $y; i+=1;sleep 1;$X :0>$t/TX 2>&1&
$z;done;WM=fluxbox;[ "$1" = 0 ]&& $y;[ "$1" = 2 ]&& $z2;[ -z "$(pgrep -o $WM)" ]&& $WM&'>>.bashrc
will OTS set up or supplemented. Since Float is a separate app, it is displayed in parallel/over Termux but only once (no Window Manager like fluxbox
in X11 above). OTS uses as X11-Toggle $y/$z
by t 0|2
, but $z
would be replaced by Float (line 3), if tap on this App and would be displayed over X11. Otherwise Termux start standalone or by TfT, also be used simultaneously over X11 but very weak. Without Split and floating Termux X11-Toggle-Key should be part of EK.
The script uu.sh
for OTS not necessary, but does some useful things like device check and double-u (ln -s ../usr u;alias u="bash uu.sh"
). So with u ky
the EK line(s) is to produced/toggled. Here the script extract with X11-Key (t 0
) In line 5:
ky)t=~/.termux;[ ! -e $t ]&& mkdir $t; t+=/termux.properties; d=display; k=extra-keys;p=popup
m=macro;sk="hide-soft-keyboard-on-startup=true soft-keyboard-toggle-behaviour=enable/disable"
lf="{key:LEFT,$p:BKSP}"; ed="$p:{$m:'CTRL d',$d:d}"; eh="{key:END,$p:HOME}"; o=`grep one $t`
nx="{key:ENTER,$p:{$m:'CTRL n',$d:'next'}}"; tp="{key:TAB,$p:PASTE}"; ek=$k-style=arrows-all
kd="{key:KEYBOARD,$p:DRAWER}";x="{$d:X11,$m:'t SPACE 0 ENTER',$p:{macro:'ob ENTER',display:OB}}"
mc="{$m:'mc SPACE i ENTER',$d:mc,$p:F10}" cd="{$m:CTRL,$d:'^',$ed}"; m="#"
if [ "$o" != "" ];then k+="=[[ESC,SHFT,$kd,{key:'/',$p:{$d:'\\\\\\\\',macro:BACKSLASH}},{key:\
'-',$p:'|'},UP,$nx,HOME,PGUP,$x],[ALT,$cd,$tp,{key:BKSP, $p:DEL},$lf,DOWN,RIGHT,END,PGDN,$mc]]"
else k+="=[[$cd,$tp,$lf,{key:RIGHT,$p:{macro:'o ENTER',display:off}},{key:UP,$p:PGUP},\
{key:DOWN,$p:PGDN},$eh,$nx,$kd,$mc,$x]]"; m="#one"
fi ;printf '%s\n' $m $ek shortcut.next-session=ctrl+n $sk enforce-char-based-input=true "$k">$t
termux-reload-settings; exit ;;
To toggle back you could open aterm
in fluxbox
and use command t 2
or other actions (e.g check
). The current state of X11-EK contains bugs that do not allow proper update and implementation. Back Toggle to Float is not necessary because it is present at all screens. Therefore, with t 2
the standalone Termux is used.
This version does not use com.termux
and can not be installed as an update, is independent of the Termux version and is started differently than the others. Unfortunately, both the Start and Installation process is more complicated, it almost always comes to cleaved the XClient processes and these are often only as zombies. X11 must be restarted much more often than in other versions. So I do not recommend this version. If you even try, several actions must be allowed in Termux and X11, the action:
x=termux-x11; pkg in $x
should not be made but echo "allow-external-apps=true">>.termux/t*.properties
Currently the debug version app.debug
is provided together with termux-x11.deb
file. The start differs from the above described and takes about five instead of one second...
For this purpose, I created a pixel-5 emulation with studio and installed Termux-0.118.0 & Float-0.15.0. So far I used Android-11 and lower and had no resize success. @agnostic-apollo meant with 12 should the problem be fixed - but it is not (shots below). First of all the log of the standalone emulation:
D:\Android>cd sdk
emulator: Android emulator version 30.8.4.0 (build_id 7600983) (CL:N/A)
handleCpuAcceleration: feature check for hvf
added library vulkan-1.dll
emulator: INFO: userspace-boot-properties.cpp:249: Sending adb public key [QAAAAM9MOYbRxVPUupdzGu5E5A8px/9miiW3Ma7P4q3Gi1i21vRTP19pn4iYpSDNyxNf4t5xFre2U4TBkteOsdvf/8fFIjReqVzTZRfXCD4HEtv51vFvDmiqRjsonNOGiSZ0O6t/3CapmQ81/1TMOaa8VhyZvFdDZIMouyQmW0RwSLjCwbiCkIp79JHQXkhIeBoHdYOp3+1zwbRxKyXkvJ3Rb7OzYs+8mlLvUN4VfW5uvrWPoD0SOaAMzajKfZX3tFLDM7Mh5pggxto4/vb3svGoxpk41U0mt0UIRJTAE3vaDyLyzPE/xxkWg3WeBMU0F99OAdgfEwp3zjSvh9KYcfyBgXxJhRurU+on3ExDrLAFTGXoL8Rokci/mY2aNoxxAqywqr857Bq5HHKK/WpR5Q6rqwZqSSmTp9CJmo4TSV87RsE6kTTlyMwyE8ZyaO635dsN8GvtXWAudZp0HiSOwc8Aqr5xT76kEYtwE1jOqfm9hl1JWUuyoC6B1Qf3WzgH0cDvRJJ+/+zLtpB6NjjNL3h0jKyUOhiMoREVWnHhIMu1ORm9G0Vlwu+h8X81tUDTzQb5H7YekFbyB4PpL8/V+HXldqudRPFXRFG30cI6wPCceTORwJtxwDc6BlDCEN8nSN+hhaYe1DFIK0TzcWAcIsn9U7k9Y+g+++HRKDShRM+tJmcBBWZuAwEAAQA= @unknown]
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
emulator: INFO: GrpcServices.cpp:315: Started GRPC server at 127.0.0.1:8554, security: Local
emulator: INFO: EmulatorAdvertisement.cpp:93: Advertising in: C:\Users\th80wr\AppData\Local\Temp\avd\running\pid_12864.ini
emulator: ERROR: AdbHostServer.cpp:102: Unable to connect to adb daemon on port: 5037
emulator: INFO: boot completed
emulator: Increasing screen off timeout, logcat buffer size to 2M.
emulator: ERROR: AdbHostServer.cpp:102: Unable to connect to adb daemon on port: 5037
emulator: Revoking microphone permissions for Google App.
emulator: INFO: QtLogger.cpp:68: Critical: Uncaught TypeError: Cannot read property 'update' of undefined (qrc:/html/js/location-mock-web-channel.js:130, (null))
emulator: INFO: QtLogger.cpp:68: Critical: Failed to load https://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true: The 'Access-Control-Allow-Origin' header has a value 'qrc://' that is not equal to the supplied origin. Origin 'qrc://' is therefore not allowed access. (qrc:/html/js/location-mock-web-channel.js:0, (null))
Then I discovered a few more differences (bugs) to 0.117:
ip
function is no longer included in the bootstrap (pkg in iproute2
isrequired ).~/../../lib
exist not anymore! I use it to analyze *.apk
Both are still ok with 0.117 on Android 11!. OTS expects further Apps and packages (XClients) to work with X11. I installed three apps here, which can all/patial fullscreen. LTP-resize does'nt work in all cases. Shots to AVD-checks:
Resize is working on Android 11 avd as well.
The ip function is no longer included in the bootstrap
It was just a symlink to /system/bin/ip
, but has been removed with 2812170
. Directly call path.
The path nl=~/../../lib exist not anymore! I use it to analyze *.apk
Like I have told you before somewhere, termux does not create that path.
Closing issue since who knows what this is about. Open a new issue and fill template for any problems.
Resize is working on Android 11 avd as well (for you).
Thanks for the reaction. One of the Float Bugs you have already been reproduced in your own video(0:08) . As far as resize is concerned, I expected your behavior on my AVD as on all other devices. Is your log with my (above) comperable? I've created another video (over Starscreen on Pixel2 with Android 11) in which you can see my behavior right next to yours.
Your resize Start at 0:00/0:01 (0:07) and my first attempt at 0:04 and the second at 0:07 (with shift positioning of the eccentric center). Previously (0:02), I had made a move without Ctrl and both only move -Why?
Either you have already made an Resize before the video, another AVD used or otherwise specified the "Init size" (larger:"Report issues.." without clipping/line break). As can be seen in my shots above, I can only use one size as here on AVD devices.
If you use the ip
function, as in my video (with line break at input and output) missing in your edition without exit circle (0:08 and larger font) probably the rest of the line and is no longer reproduced.
If you further enlarge the Zoom Vertical, the Termux prompt is suddenly no longer available. Since I can not reproduce it on AVD, I did it on my Gigaset - Shots above.
I now assume that you know these two bugs and I do not have to describe them again! Another important feature is the missing EK (12 times in this issue above) in Float. If you are planning the integration of Float in Termux, which would require Fullscreen (also here) there are most of my concerns resolved.
Like I have told you before somewhere, termux does not create that path.
I know! but here the first time on AVD-Devices (it is my 11th device). On old devices, I could create this symlink by my self with pm
but this funktion is missing on new devices or do you know a workarrond?
Drag outer two dots left-right/up-down further from the center dot, outside of screen. If you only do it near center dot, window will just move instead of resize.
termux-float
should preferably be integrated into termux-app
if possible and I see not much point in working more on it. I don't know when I'll have time for integration or just adding extra keys, lot of other higher priority things to do.
Drag outer two dots left-right/up-down further from the center dot, outside of screen. If you only do it near center dot, window will just move instead of resize.
So? Unfortunately, AVD still only moves in this case only the entire window. I've spent many hours in front of my PC, tracted my mouse and bent my fingers. Also in this case, the moves lead to the following status: Again the log of this Device (for compare with yours):
D:\Android>cd sdk
emulator: Android emulator version 30.8.4.0 (build_id 7600983) (CL:N/A)
handleCpuAcceleration: feature check for hvf
added library vulkan-1.dll
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
emulator: INFO: GrpcServices.cpp:315: Started GRPC server at 127.0.0.1:8554, security: Local
emulator: INFO: EmulatorAdvertisement.cpp:93: Advertising in: C:\Users\th80wr\AppData\Local\Temp\avd\running\pid_18616.ini
emulator: emulator window was out of view and was recentered
emulator: INFO: QtLogger.cpp:68: Critical: Failed to load https://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true: The 'Access-Control-Allow-Origin' header has a value 'qrc://' that is not equal to the supplied origin. Origin 'qrc://' is therefore not allowed access. (qrc:/html/js/common.js:0, (null))
termux-float
should preferably be integrated intotermux-app
if possible and I see not much point in working more on it. I don't know when I'll have time for integration or just adding extra keys, lot of other higher priority things to do.
:) Very good Idea! What is your scheduling? Except for my Gigaset (no SPLIT) I use it nowhere really and to the much better PiP (popup view above) function of Samsung, there are elaborate errors. I've edit EK-Remarks above
Like I have told you before somewhere, termux does not create that path (
$nl
).I know! but here the first time on my AVD-Devices (
$nl
needet for Target-SDK>28 too). ... do you know a workarrond?
check scenarios
The *Taskbar App examination, was very sobering if I compare this with PiP on my SM-P610, in which nothing is missing and that works very stable. That's why I've never used T:Float. For comparison and to fix possibly bugs of TfT (Taskbar-floating-T**ermux), I've this App (self-build with last updates from @agnostic-apollo) now installed on my Gigaset and tries to understand this App.
Float Readme is not very informative. The permission query after the installation is good (would be good also at T:Widget). First, I describe the check scenarios. The Float App is positioned on the Start Screen between Termux and Widget, so Termux can be started with all three Apps. The normal OTS open X11 with some XClients so that XServer and
sshd
Services exist and uniquely the process environment is logged. When Float starts from the start screen again, a fixed quarity picture appears without Extra-Keys (EK) but with OS-KB. The process list is supplemented by a bash that does not appear like widget processes in the Drawer process list.DRAWER
possibility and long tap (inside - not at the top) allows move and scallation (Pinch) with appropriate instructions (good) but no clipboard. The movement beyond the screen, as with taskbar does not work.*) Taskbar on the one hand and Floating/Picture or Android Windows on the other hand are different topics. In the Taskbar App and with Android-with-PiP contained therein (11/SM-P610), both comes only together. On various App/Task Functions (Recent-Task-Key) gestures and much more, which has every phone, I do not go on details here and also the topic session/widget-lists currently has no relation to Float. Here are two more shots, from my Gigaset (above) without Split/PiP capability and the SM-P610:
Shot1 (Gigaset) is with Tap on T:Float, then start of
t c
in Float, OS-KB turn off/on in X11 (with Extra-Keys=EK) and change to Hackers KB. Then swich Key-log on incheck
and tap onSHIFT+ALT+CTRL
(blue). Here Float-Picture is covered by OS-KB (log is hidden but Back-Key remove it) even after pinch to the smalest high of Picture and more critical with non floating gboad-KB_. X11-EK is unusable in Float!Shot2 (SM-P610) Since SM-Android already covers all the features of Float and Taskbar and this can be used for almost all apps, you do not need both apps. Here Float is only for comparison and since the OS already has several task bars, I have not installed this App. Termux is here startet from site-Taskbar (moved to PiP) and OTS open X11 here in Background. Previously the File-App was opened in Picture and is now shrinked to the _blue Icon (also a Taskbar by tap) between 1/2 over the non-floating OS-KB. Float deprives themself to the Picture/Task Management of the OS, so it is initially unclear, what happened, if you tap on 5 of OS-KB - what are you supposed? Both EK are not usable for Float** but OS-KB for all three Apps.
conclusion and possible features
It remains: Float is 100% covered by SM-OS, a reduced variant of Taskbar-Termux-Floating and without parallel Termux, barely useful. Here is Float optically hardly to distinguish from termux. Should as announced all future Android versions have behaved the SM-OS, is unnecessary the Float development. Potentials:
The missing/double EK administration should be replaced by a common, as with OS-KB incusive Float and X11.
Float could also be managed through Widget, which would also solve the problems with Drawer/Session list.
More checks, special effects and misconduct with TfT and Float:
Float only have the opportunity to move the picture inside the screen at the Picture-size, but it can scaled greater than this with pinch. This has the effect that the picture can not be moved or only in one direction. Then, on the right edge, the contents are cut off the content instead of wraps and in height is the prompt often under the real screen and almost always under the non-floating OS-KB. The rotation of the phones often leads to similar effects. As in old Termux versions, the penetrient popup of the OS-KB can not be prevented. Float does not take into account the reduction of the residual surface by EK+OS-KB. However, mostly through skilful inner and outer pinch zooms, the relavant part of Termux can be brought into the visible area. The effects can most often be bypassed long Tap pinch/move. Who that seems to be complotted, should try TfT to return back to Float. In TfT a complete Termux with nomal behavior is used but as soon as the X11 screen is touched or with Back-Key, Termux will removed fron screen and has to reopen by Taskbar*. Move of TfT is only one time after Back-Key and _reopen: possible.