Many Android apps have an option for light/dark mode (daytime vs. nighttime hours). I find that very useful at times. Is there any such option in Ubuntu 16.04?? It would be very useful for battery consumption and for the late night hours.
Maybe you could add an option for that in the Power Manager icon or directly on the desktop? OR at least for the themes with lite and dark variants, like Vertex or Arc.
No, there is no fast way to do this. After changing to dark or light theme applications must be restarted which is probably not what you want.
Otherwise corntab might help. You could create two scripts - first that will enable dark mode and second that will disable it.
EDIT: Steps to create crontab jobs to enable/disable dark mode.
1. Step:
Create
~/.config/gtk-3.0/settings.ini
file with following content:or append
gtk-application-prefer-dark-theme=0
line if that file already exists without this line. 0 - dark mode disabled, 1 - dark mode enabled.2. Step:
Create script
dark-mode.sh
that will enable/disable dark mode:Replace [YOUR-USERNMAE] with your real user name in above script and make it executable by running
chmod +x dark-mode.sh
command.3. Step:
Create crontab jobs by running
crontab -e
and then append at end following lines:And again replace [YOUR-USERNMAE] with your real user name, save and exit. Now every day at 7:00 dark mode will be disabled and at 21:00 it will be enabled.
This might not be enough, for example if you often turn off/on your PC than you might need adjust script to detect current time and execute it on login to make sure right theme mode is used.
There seems to be an app made exactly for this purpose: https://github.com/C2N14/AutomaThemely
Give it a whirl :)