termux-app
termux-app copied to clipboard
Cursor color defaults
Could there be an option so that if ~/.termux/colors.properties
doesn't specify a cursor color, it could use the reverse of whatever text color and background color it's on instead? As of now it defaults to hex color a9aaa9. (I believe it was introduced in commit 9fe0e494734cf30484c2af14df012c128515f030).
The cursor foreground color is now the foreground color of the text under cursor, which makes the text under cursor indistinguishable. It's really a bug I consider.
@mklein994 How to change the cursor color? I failed to find the relevant info about ~/.termux/colors.properties
.
@BohrShaw a good example is the Wild Cherry theme as of Termux:Styling version 0.15. https://github.com/termux/termux-styling/commit/e4166fadbe9fa089b6b08dde5a6f4bc7bf111a3c
Thanks. Is there a way to set cursor foreground color?
The cursor color also seems to follow the system theme, which is incorrect, it should follow the color.properties. The cursor isn't readable when the system is in dark mode, while using a dark theme for example.
No updates on the issue? Is it possible to set cursor color in config?
You can set it in ~/.termux/colors.properties
manually.
Was closed by 26ff978b, will be available in next release. Use github action builds if you want it now.
@TomJo2000 I do not have ~/.termux/colors.properties
in termux-app
. termux-styling
should be installed? This build - https://github.com/termux/termux-styling/actions/runs/3406907267 - can be used?
@agnostic-apollo Thanks
The termux-styling
app just writes to colors.properties
file, which is read by termux-app
. You can manually modify the file without termux-styling
being installed.
No, you need build of termux-app
, commit was done in it. And if you installed apps from F-Droid, you would need to reinstall all apps.
https://github.com/termux/termux-app#installation
Welcome.
@agnostic-apollo I understand. What template I can use for manual creation color.properties
file in my current installation? I tried to find this files in termux-app
and termux-styling
repositories but have not succeeded.
https://github.com/termux/termux-styling/tree/master/app/src/main/assets/colors
@agnostic-apollo I took this template - https://github.com/termux/termux-styling/blob/master/app/src/main/assets/colors/base16-atelierdune-dark.properties
Tried several values for cursor
option:
- cursor=#a6a28c
- cursor=#20201d
- cursor=#C7CCD1
With dark mode in Termux in nano
editor cursor is not changing. It always has white color and is not seen on white text.
(After changing the config I restarted Termux every time.)
You'll need to reload the settings with
termux-reload-settings
for the changes to apply.
@TomJo2000 Checked with cursor=#090300
(black color), termux-reload-settings
, and Termux restart. Nothing is changed.
May be color.properties
file name/path should be set somewhere in another Termux config?
Did you set it in ~/.termux/colors.properties
?
As for issues reported by @dessalines about dark mode, possibly https://github.com/termux/termux-app/issues/3036#issuecomment-1273430688 may be the issue, xiaomi rom messes with colors and toggles in Settings > Display > Color scheme > More Dark Mode options
should be disabled.
As @dessalines wrote:
The cursor color also seems to follow the system theme, which is incorrect, it should follow the color.properties. The cursor isn't readable when the system is in dark mode, while using a dark theme for example.
So it seems the work around is not working. Someone tested this issue on the fresh Termux build? Cursor is visible on the dark system theme? Is it worth trying to upgrade?
Yes, I put colors config here ~/.termux/colors.properties
I disabled this MIUI More Dark mode options
only for Termux
with keeping enabled two above options (Adjust Wallpaprer to Dark mode
, Adjust text and backgrounds automatically
) and problem with not visible cursor in Termux was gone immediately.
Link to screen with settings in MIUI - https://drive.google.com/file/d/17vmAxh93C-cyy_xjnmbNzSwEd-laRCbv/view?usp=share_link
Cursor now is always white and always visible like in this screen - https://drive.google.com/file/d/1Z0FqAqG55flB7ELatG4w2CrGDjBs8OEc/view?usp=sharing
Without this config not visible cursor looks like on this screen - https://drive.google.com/file/d/1KDL59olDPX6W9FK46v-CpCKuYt8YtqwW/view?usp=sharing
Changing color of cursor in colors.properties
still is not working, it is always white but it is already not a problem for me.
@agnostic-apollo @TomJo2000 At my place now is 4:00 AM and you made my day with this. Thanks for support!
The 26ff978 workaround isn't related to dark mode issues, only for cases where cursor prop is missing and text isn't visible due to cursor defaulting to white even with light background.
Termux does not use system colors for cursor, whether in light or dark mode, only cursor prop value. Issue for cursor color not working in dark mode was not reproducible by me and was discussed in #2653 and apparently got fixed by reinstall, but likely related to xiaomi os messing colors. You may want to force stop termux app after changing system settings.
Welcome.