Created
February 5, 2021 15:53
-
-
Save russtaylor/5d85abc72120e79ea5ab81620a87e13c to your computer and use it in GitHub Desktop.
Displays the current UTC in the menu bar, and shows other (configurable) times in the drop down
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
#!/bin/bash | |
# Display UTC in the menubar, and one or more additional zones in the drop down. | |
# The current format (HH:MM:SS) works best with a one second refresh, or alter | |
# the format and refresh rate to taste. | |
# | |
# <bitbar.title>World Clock</bitbar.title> | |
# <bitbar.version>v1.0</bitbar.version> | |
# <bitbar.author>Adam Snodgrass</bitbar.author> | |
# <bitbar.author.github>asnodgrass</bitbar.author.github> | |
# <bitbar.desc>Display current UTC time in the menu bar, with various timezones in the drop-down menu</bitbar.desc> | |
# <bitbar.image>https://cloud.githubusercontent.com/assets/6187908/12207887/464ff8b2-b617-11e5-9d61-787eed228552.png</bitbar.image> | |
ZONES="Europe/Dublin America/New_York US/Mountain US/Pacific" | |
date -u +'%H:%M UTC' | |
echo '---' | |
for zone in $ZONES; do | |
echo "$(TZ=$zone date +'%H:%M %z') $zone" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment