Xbar: The BitBar reboot. Put anything in your macOS menu bar
xbarapp.com
xbarapp.com
https://github.com/iterate-ch/cyberduck
https://github.com/rxhanson/Rectangle
I usually have a terminal open anyway and `caffeinate -d -t 999999` usually does what I want (stay awake until I come back and tell you to go to sleep). Usually it's two keystrokes away (up arrow, enter), if not, that's quick enough to type for my purposes. That said, it's a bad approach if you want to suggest it as a tool for someone's workflow who _doesn't_ have a terminal open all of the time.
alias caffeine="caffeinate -d -t 999999"
Hammerspoon gave me basically all of it back, in a scriptable form which makes it much better suited to what I want. It’s truly great software.
EDIT: I see Rectangle is based on Spectacle!
Rectangle is all that Spectacle was – same default key bindings – and more.
UPDATE 2: The authors of both also were considering to merge the projects. [3]
I see XBar seems to be more advanced and more popular.
It has these Advanced APIs like URL schema [0].
and also the GUI for plugins compared to Swiftbar
The tech stack of course is also much different as it's written in Go and Swiftbar as the name applies in Swift.
Although I like that SwiftBar has cron syntax support [1]. I didn't find a similar function in XBar.
A comprehensive comparison in one or the other's repo README could be useful
[0]: https://github.com/matryer/xbar#advanced-apis
[1]: https://github.com/swiftbar/SwiftBar#refresh-schedule
[2]: https://github.com/matryer/xbar/issues/607
[3]: https://github.com/matryer/xbar/issues/607#issuecomment-7752...
TL;DR: BitBar stopped working well in Big Sur and the old code base was increasingly hard to update and build.
#!/path/to/the/virtualenv/bin/python
There is no need to 'activate' the virtualenv or use some kind of wrapper (unless your script depends on PATH for subcommands to be executed from the virtualenv as well).Was it C before? (I can't tell, because https://github.com/matryer/bitbar redirects to xbar)
There are more details about the motivations and such by the author in the announcement issue: https://github.com/matryer/xbar/issues/607
How does it compare to keyboard maestro?
I mostly used it to create small utility applications for the menu bar. Probably the most useful one was a Bitbucket pull request checker, which would monitor the status of open pull requests and display information about which PRs I hadn't yet viewed or approved, number of new comments since I last viewed the PR, build status etc. My job involves frequently reviewing PRs so this was really helpful for me.
I've tried rewriting this app for polybar on Linux but it's much more difficult to maintain, and sadly too much effort for me to bother with right now.
I haven't tried Keyboard Maestro - at a glance it looks really good, but doesn't appear to be open source like Hammerspoon. I can't tell whether it enables you to create stuff for the menu bar. I'm pretty sure Hammerspoon can do anything KM can, but I imagine KM is easier to use, particularly if you're not into programming.
On this topic, does anyone know simple way on Mac to display a multiline text input pop-up?
I'm playing with making a BitBar app that lets you keep a timesheet of what you've done today that syncs with a cloud API. I want a system tray icon that when you click it, it pops up with your notes so far that you can then edit and save your changes.
I know you can use osascript to create an ugly text input pop-up but it gets dismissed when you hit enter which I don't want. I'm looking for something lightweight to setup. Likely using Node but would rather not have to require Electron.
It's a fantastic tool and I'd encourage anyone who is thinking about building a tiny menubar app in just a few lines of code to look into it.
If you can echo something in a shell script you can echo it in the menu bar.
$ curl -s https://api.coinbase.com/v2/prices/ETH-USD/spot | jq -r .data.amount
1675.55It was amazing to me that I couldn't find anything else to do just a basic "track playing" I could always see, without an always-on-top window blocking real estate. It seemed so obvious but nobody was offering that without adding a ton of other crap on top or making an intrusive windowed UI.
Then this little script executor with a per-menu output schema worked great. I was able to customize a basic "current track" script that either came with or was around as a plugin/sample and get it working to my exact spec within an hour.
What was especially awesome was when I moved to Catalina and the AppleScript targets changed from iTunes to Apple Music and broke automation, I was able to fix it in 30s by editing the script file for the new target name and it just worked. It was great to not have to wait on anyone else.
I'll definitely be trying the reboot.
Now what do I see when I come to HN for a quick break?
XBar. More proof that life is just a simulation.
{ 1,616,198,970 }
Script is 2 lines: EPOCH=$(/bin/date +%s | /usr/local/opt/gnu-sed/libexec/gnubin/sed ':a;s/\B[0-9]\{3\}\>/,&/;ta')
echo "{" "${EPOCH}" "}"It will return "has_unreads=true" for channels that have unread notifications. So perhaps better than a naive brute force traversal.