termux / termux-styling

Termux add-on app for customizing the terminal font and color theme.
https://f-droid.org/en/packages/com.termux.styling/
Other
1.15k stars 249 forks source link

Can't read character under cursor #58

Open Keith-S-Thompson opened 5 years ago

Keith-S-Thompson commented 5 years ago

I usually use the black-on-white scheme, but this issue applies to a number of other color schemes as well.

The theme has:

background: #FFFFFF
foreground: #000000

When the cursor is over a non-blank character, both the cursor and the character are solid black.

I've worked around this by adding:

cursor: #B0B0B0

(and copying the file to $HOME/.termux/color.properties and running termux-reload-settings). This sets the cursor to light gray, which makes for a decent contrast with the foreground and background colors. (Perhaps there's a way to automate selecting the best color.)

More generally, the cursor color should contrast well with both the foreground and background colors.

More ambitiously, I suggest adding a cursortext field, specifying the color of text under the cursor. (PuTTY has a similar feature.) This would require changes in

termux-app/terminal-emulator/src/main/java/com/termux/terminal/TextStyle.java

and probably elsewhere.

hep-mh commented 5 years ago

This also applies to the dracula theme and it is especially noticable if you want to select/copy text. In the latter case, the selected text is just a single-colored block and you cannot read the text that you are selecting. However, the fix that was suggested by @Keith-S-Thompson also works here.