Sets the Mint theme (dark or light) based on the current time of day, written by Henrik Franciscus Leppä (HFL).
- Linux Mint
- (However, this script can be modified to change the theme of any system that
has the
gsettings
command.)
- (However, this script can be modified to change the theme of any system that
has the
at
command- (Only for continuous mode)
Note: The script will check for the required commands itself, so you do not have to.
hfl-set-mint-theme-to-match-time-of-day
or:
hfl-set-mint-theme-to-match-time-of-day --continuous [ <at_queue>=s ]
or:
hfl-set-mint-theme-to-match-time-of-day (--help | -H | -h | -?)
or:
hfl-set-mint-theme-to-match-time-of-day (--version | -V | -v)
--version, -V, -v
- Print version and copyright information.
--help, -H, -h, -?
- Print the usage message.
--continuous
- Sets up a recursive
at
job that runs the command when the time of day changes.<at_queue>
specifies whichat
queue to use; if not given, defaults to 's'. This queue needs to be used exclusively for this script.
- Sets up a recursive
- To make this program run continuously from startup, add it to the "Startup
Applications" with the
--continuous
flag and a delay shorter than the delay of any application with visual elements, such as windows or tray icons. - Theme does not update to some applications and system utilities without restarting the program or logging out and logging back in.
- When run in continuous mode, this script logs output and errors to:
~/hfl-set-mint-theme-to-match-time-of-day.log
- This script use
at
instead ofcron
becausegsettings
does not work withcron
.
Automated tests are done using shUnit2 and ShellCheck.
- Install ShellCheck 0.7.0.
- Run:
./test