Is there any solution to configure termux to use system default theme instead of what i setup using termux styling app?
Even a basic option to set different themes for different modes will help l, so that i can configure it to switch to zenburn when system is in Dark mode and Google light when in light mode.
*edit: it was late and I was throwing ideas.
I made a solution that actually works in another comment.
I'm thinking you could have separate color profiles with a script that to change the file using symbolic link?
(I don't know what I'm doing, I'm a figure it out as I go type, but maybe it'll work. Please help!)
You'd need something like shizuku (allows shell operation permission) or root to be able to read the system dark mode status.
Using shizuku you could call it by
rish -c 'cmd uimode night'
Which would show
Night mode: yes / no
If you did that you could us an if statement (I don't really know how to write that out confidently at the moment)
And use that fuction to change the symbolic link to the color.properties file instead of the at a specific time I used below.
So you keep 2 (or more) color profiles in separate files and call those locations to link to based on time of day / uimode.
You could put the script in the .boot (to automatically start) or .shortcut (to start with the widget)
Or maybe add the command to run the script in the termux bash_bashrc or profile file to have it execute on each session launch.
Another thing I think might be needed is to add a line to reload termux.properties
I created an alias because the command is so long. trs=termux-reload-settings
After much trial and effot I have successfully created a little thing that will do the thing (based on time, not nightmode) Adjust times to fit your liking. It polls time and automatically changes.
(!!!!)
(PS. Thanks for giving me something to do and learn.)
Do the styling thing first:
Pick a light profile. Then cp ~/.termux/colors.properties ~/.termux/light
Pick a dark one. Then cp ~/.termux/colors.properties ~/.termux/dark
Add the following to end of ~/../usr/etc/bash.bashrc or make it its own script and call it from the bash.bashrc
alias trs='termux-reload-settings' while :; do currenttime=$(date +%H:%M) if [[ "$currenttime" > "06:00" ]] && [[ "$currenttime" < "22:30" ]]; then ln -sf ~/.termux/light ~/.termux/colors.properties termux-reload-settings # echo "the sun is out" else ln -sf ~/.termux/dark ~/.termux/colors.properties termux-reload-settings # echo "the spirits roam" fi done &