https://github.com/notmatthancock/terminal-day-night-theme-switcher
Automatically change the theme of your terminal based on whether it is day or night at your current location.
https://github.com/notmatthancock/terminal-day-night-theme-switcher
Last synced: 2 months ago
JSON representation
Automatically change the theme of your terminal based on whether it is day or night at your current location.
- Host: GitHub
- URL: https://github.com/notmatthancock/terminal-day-night-theme-switcher
- Owner: notmatthancock
- Created: 2015-05-23T14:55:56.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-23T17:59:35.000Z (almost 10 years ago)
- Last Synced: 2025-01-28T23:44:37.366Z (4 months ago)
- Language: Python
- Homepage:
- Size: 527 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OS X Terminal Day-Night Theme Switcher
Automatically change the theme of your terminal based on whether it is day or night at your current location!

This was developed under 10.6 (I know - my laptop is old). It should work under new versions but has not been tested.
## Setup
First grab the repository
git clone https://github.com/chestervonwinchester/terminal-day-night-theme-switcher.git
and move it to wherever you would like its final location to be, called `path/to/switcher` throughout. You must have a working version of python, with `requests` and `pyquery` libraries installed. If not, install them:
pip install requests
pip install pyqueryYou must have themes named "Day" and "Night" defined in Terminal. Go to Terminal > Preferences and define them. I prefer to work in a light theme in the day and dark at night.
Edit the file `path/to/switcher/src/main.sh`. Set the variable `term_theme_switch=path/to/switcher/src` in line 1.
Edit `path/to/switcher/src/main.sh` in line 2. Change \*my location\* to your location (caps dont really matter). For example, this line might read:
theme=$(python get_theme.py miami, fl)
Finally, you should add `path/to/switcher/src/main.sh` to your crontab.
crontab -e
Then add:
0 * * * * path/to/switcher/src/main.sh
This will run every hour, and set your theme accordingly!