Last active
May 10, 2016 18:01
Add these lines to .bash_profile to allow iterm2 to switch profiles with the time in the day.
This file contains 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
# Define a function that switches iterm profile | |
iterm2_profile() { echo -e "\033]50;SetProfile=$1\a"; } | |
# Change profile by $HOUR | |
# You'll need to change name of profiles to Light and Dark | |
HOUR=`date +"%H"` | |
if [ $HOUR -gt 6 ] && [ $HOUR -lt 18 ]; | |
then iterm2_profile Light; | |
else iterm2_profile Dark; | |
fi | |
# Clear the Screen | |
clear |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment