Created
February 22, 2020 07:02
-
-
Save gko/ecffa2cb8808b1b9fa20b5ba2fdffdf7 to your computer and use it in GitHub Desktop.
switch colorscheme between 7h and 18h keep the light theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function alter_theme() { | |
local current_hour=$(date +%H) | |
if [[ $current_hour -ge 7 && $current_hour -lt 18 ]]; then | |
base16_classic-light | |
else | |
base16_material-palenight | |
fi | |
} | |
[[ -z $precmd_functions ]] && precmd_functions=() | |
precmd_functions=($precmd_functions alter_theme) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment