Closed GrouchyGaijin closed 7 years ago
Name the script something like timezone.5s.sh The "5s" makes it update every 5 seconds. timezone.1m.sh will do the trick also.
:neckbeard: :grinning:
#!/bin/bash
# <bitbar.title>Timezones+</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Aaron Edell</bitbar.author>
# <bitbar.author.github>aaronedell</bitbar.author.github>
# <bitbar.desc>Rotates current time through four common timezones</bitbar.desc>
# <bitbar.image>http://i.imgur.com/Y4nhdZo.png</bitbar.image>
# <bitbar.dependencies>Bash GNU AWK</bitbar.dependencies>
echo -n "Beijing " ; TZ="Asia/Shanghai" date +'%l:%M %p'
I think you can also make it update when clicked on with:
echo -n "Beijing " ; TZ="Asia/Shanghai" date +'%l:%M %p | refresh=true'
@WhiteheadV I tried refresh=true it didn't work tho.
@Hippyjake: refresh=true
should definitely work. What is the output of your script, when run from the terminal?
A copy pasta from above returns
Beijing 8:13 AM | refresh=true
I got it to work! I was being a dork ha.
Cool! Closing this issue then.
Hi Guys,
I do a lot of work for a company in China and I often need to know what time it is there. Granted, I can click my clock in the panel and look at the world clocks, but what I would like to do is have Beijing time displayed in the panel along with my local time. I was able to add Beijing's time to the panel using a bash script I found that was written for Bitbar:
The problem is that the time displayed in the panel does not update. Does anyone know how I can make this script update every 60 seconds? `