Termux-app: Cursor style

Created on 3 Jul 2018  路  4Comments  路  Source: termux/termux-app

How do I change the cursor style?

Most helpful comment

You can change it the same way as in other terminal emulators, by sending escape codes. It doesn't seem to support blinking cursors, but it supports block, underline and bar. I.e.

echo -e '\e[2 q' # Change to block
echo -e '\e[4 q' # Change to underline
echo -e '\e[6 q' # Change to bar

All 4 comments

I think the only alternative cursor mode you get is the text input view. From the manual:

Text Input View

Terminal emulators usually do not support the advanced features of touch keyboards like autocorrect, prediction and swipe typing. To solve this, Termux has a text input view. Text entered in it will get pasted to the terminal. Because it's a native Android text input view, all touch keyboard features will work. To access the text input view you have to swipe the extra keys view to the left.
(...)
To enable the extra keys view you have to long tap on the keyboard button in the left drawer menu. You can also press Volume Up+Q.

You can change it the same way as in other terminal emulators, by sending escape codes. It doesn't seem to support blinking cursors, but it supports block, underline and bar. I.e.

echo -e '\e[2 q' # Change to block
echo -e '\e[4 q' # Change to underline
echo -e '\e[6 q' # Change to bar

Can also change colour:

echo -ne "\033]12;#ff0000\007"    # red

Install Termux:style plugin and go to ~/.termux/colors.properties
And set the color you want like example below

# green cursors
cursor:  #00bb00

My setup

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bitnetwork picture bitnetwork  路  3Comments

qntmpkts picture qntmpkts  路  5Comments

joakim-noah picture joakim-noah  路  5Comments

baconicsynergy picture baconicsynergy  路  5Comments

darth-cequella picture darth-cequella  路  3Comments