BitBar: put the output from any script/program in your Mac OS X Menu Bar
github.com
github.com
Shows current track name and artist in menu bar. Shows track/artist/album in dropdown along with play/pause/next/previous buttons.
Raw script here: https://raw.githubusercontent.com/jtokoph/bitbar/jtokoph-spo...
EDIT: The reason for this is the version installed by brew is 1.2, and that bug was fixed in 1.3.1.
Been having lots of fun playing with BitBar. Just finished a clipboard history plugin: https://github.com/matryer/bitbar/pull/47
Related:
Is there no simple way to get the current temperature for location based off of GeoIP using `curl`?
I had to use this monstrosity to get the current temperature:
#!/bin/bash
export PATH='/usr/local/bin:$PATH'
ansiweather -a off -l 'San Francisco' \
| cut -d '>' -f 2 \
| cut -d '-' -f1 \
| awk '{ print $1 $2 }' \
| tr -d 'C' curl -s "http://api.openweathermap.org/data/2.5/weather?zip=$(curl -s ipinfo.io/postal),us&appid=2de143494c0b295cca9337e1e96b00e0&units=imperial" \
| sed -e 's/\(.*\)temp":\([0-9.]*\),\(.*\)/\2/'
or you could replace the `sed` pipe with a call to `jq`: curl really_long_url | jq '.main.temp'That would get you Kelvin, use `&units=metric` for Celsius
BitBar focuses on just the Menu Bar use case though, and does a more polished job than Platypus.
Or TextBar, which is a $3 utility: http://www.richsomerfield.com/apps/
So when I'm not in the office switching to my "home" profile is just a menu click away.
This has been a long standing dream of mine to automate - so thanks!
EDIT: also it works with emojis, which is handy, here's a screenshot http://imgur.com/CVxchnI
All this bitbar thing does is call those existing scripts, very simple, but saves me
a) wondering what profile I have enabled (now in the menubar) b) opening a terminal and typing "update-env (work|home)" (one click switch)
http://www.hammerspoon.org/go/#simplemenubar
-- Creating a simple menubar item
-- Lots of Mac utilities place a small icon in the system menubar to display their
-- status and let you interact with them. We're going to use two of Hammerspoon's
-- extensions to whip up a very simple replacement for the popular utility Caffeine.
local caffeine = hs.menubar.new()
function setCaffeineDisplay(state)
if state then
caffeine:setTitle("AWAKE")
else
caffeine:setTitle("SLEEPY")
end
end
function caffeineClicked()
setCaffeineDisplay(hs.caffeinate.toggle("displayIdle"))
end
if caffeine then
caffeine:setClickCallback(caffeineClicked)
setCaffeineDisplay(hs.caffeinate.get("displayIdle"))
enddefaults delete com.matryer.BitBar
――――――
Also big minus was menu bar icon, such tools don't need one.
https://github.com/abgoyal/ShellToolsApplet http://cinnamon-spices.linuxmint.com/applets/view/136
https://github.com/abgoyal/ShellToolsApplet http://cinnamon-spices.linuxmint.com/applets/view/136
I was checking the plugins and some of them allow clicking on items in the dropdown and having an action execute.
The clipboard history now has code for this.
https://news.ycombinator.com/item?id=10843704 https://news.ycombinator.com/item?id=10841525
Some of them are like full apps in their own right.