Profile cover photo
Profile photo
Alexandros Kastanis
Communities and Collections
View all

Feature request : If possible, integration of the 'curl' command along with 'awk'. If you combine these two along with grep and sed you can pretty much create a whole slew of commands that fetch sport scores, weather, news and all sorts of "desktop widgets" for T-UI.
I realise that my request might be beyond the scope of this launcher but it doesn't hurt to ask.

Post has attachment
Quick tip : Do yourself a favor and download Hacker's Keyboard from the playstore, T-UI supports the 'Home' (start of the line) and 'End' keys, 'Ctrl+a' to select all 'Ctrl+x' to cut, 'Ctrl+v' to paste etc. keys only found on a full keyboard. It comes especially handy on a tablet screen since the extra real estate makes a perfect fit. If you happen to use an external keyboard don't be afraid to use the above mentioned shortcuts.
Hacker's Keyboard
Hacker's Keyboard

Quick tip : The 'find' command works as expected on the T-UI command line and it even accepts the -exec flag.
A few use cases of the find command follow :

Find the large files on your phone or tablet when you are on the home folder (default)
find . -type f -size +100MB

Find files that have been modified in the last day
find . -type f -mtime -1

Find the location of a directory named Images
find . -type d -name Images

Find how many .jpg files you have on your phone
find . -name *.jpg | wc -l

Find how many lines all of your text files have
find . -name *.txt -exec wc -l {} \;

The find command is a very powerful one and having it on your laucher can become quite handy.

Quick tip : If you want to use flags with the 'ls' command on T-UI you have to escape it like so :
\ls -la
this way the alias it probably already has gets ignored and the full command as you type it gets executed.

PS. If you escape the ls command like above you enable piping on it so the command
\ls | grep google
works as expected.

Also if you want a list of available commands an alternative to the 'shellcommands' is
\ls /system/bin

I have a special use case for termux-api. The termux-open and termux-open-url commands along with sshd running help me launch videos straight to the YouTube app and websites to chrome on my Android devices via a Raspberry pi. Let me explain :
I collect my news and my favorite YouTube channels on a terminal based rss reader called Newsbeuter that runs on a raspberry pi. That reader allows you to use any external program to either read the full article with pictures or open YouTube videos etc. So I have a macro on Newsbeuter that makes an ssh connection to the sshd server on my termux device and sends the termux-open command along with the URL to open. That fires up the appropriate app and I get a graphical view of the content.
Up till now I only read the news on my laptop since I could easily send commands over ssh on that. Once I read the termux-api commands and figured how versatile they could be I connected the dots by enabling the ssh daemon and having the commands sent through that.
My use case case is quite unique but the possibilities for custom setups is grand.

Quick tip : If you want to rename files with T-UI you have to use the 'rename' command. The 'mv' command doesn't do renaming in T-UI, it only expects files to be moved to a folder. As an example if you want to rename old.txt to new.txt you type on the T-UI command line :

rename old.txt new.txt

and your job is done. Now if you want to move that new.txt file to the Documents directory you simply type

mv new.txt Documents

I've noticed that the move command doesn't produce any confirmation message but it works, you can 'ls' the dir you moved the file into just to check.

PS. Apparently you CAN use the mv command to rename files with T-UI, you just have to escape it as in

\mv test.txt renamed.txt

Quick tip : You can add new aliases to T-UI without the need of an external editor and without the need to save the file, also you get to use the 'refresh' command that comes in handy when you create a lot of aliases or update your contacts.
In order to add a new alias to T-UI you can simply echo your new command to the alias file like so :

echo "\nsln=cat Notes/sl" >> t-ui/alias.txt

this line adds a new alias 'sln=cat Notes/sl' to the end of our alias.txt file that T-UI uses. Notice the \n after the beginning double quotes, it is the new line symbol needed to add our new command at the bottom, if we don't use that our command simply becomes the tail of the last one and doesn't work. Also notice the double redirection >> symbol that simply appends our new command to the file and doesn't overwrite it like a simple redirection > would. Be really careful with that and just in case make a copy of your alias.txt file, you never know..
After hitting enter on the above command you can simply enter refresh like


and your aliases, contacts, music and phonebook links that T-UI uses are refreshed.

I know that by entering 'aliasfile' your favorite editor comes up and you can do your work easily but this method can be equally fast although a typo could erase your alias.txt file so there is a kind of danger using it.

Quick tip : A fast and easy way to create a grocery list or any short memo is to simply echo out the contents as in :
echo milk, cheese, stuff
on the t-ui command line. Everything gets printed at the prompt and since t-ui keeps a chronological list of all commands you have just created a disposable memo.
Keep in mind that if you restart t-ui or clear the screen your memo gets lost, you might be able to reproduce it by going back to your history items.

I've come up with a solution to start TASKER tasks through T-UI without root!

Since T-UI can run the touch command and Tasker can keep an eye when files change you can create an alias that does 'touch' on a file and have that start up a Tasker Task.
1. Create an empty file on your phone eg. taskertest.txt ( $ touch taskertest.txt )
2. Make a Tasker Profile with Event - File - File attribute change and point it to your taskertest.txt
3. Edit your aliasfile on T-UI with tsk=touch taskertest.txt
4. Type tsk <Enter> on T-UI
5. Done

I have a Tasker Termux plugin and a JuiceSSH plugin and I didn't have much use for them. That all changed now..
I've done some testing and the whole process is almost instantaneous. I type an alias, hit enter and boom a Termux shortcut runs!!

Post has attachment
My new color theme you can find at
Wait while more posts are being loaded