[HN Gopher] Xbar: The BitBar reboot. Put anything in your macOS ...
       ___________________________________________________________________
        
       Xbar: The BitBar reboot. Put anything in your macOS menu bar
        
       Author : rjmunro
       Score  : 181 points
       Date   : 2021-03-19 12:25 UTC (10 hours ago)
        
 (HTM) web link (xbarapp.com)
 (TXT) w3m dump (xbarapp.com)
        
       | wrink wrote:
       | Site is down :c 503
        
       | psychometry wrote:
       | I like that they have some to show the number of unread Slack
       | notifications, but the scripts are necessarily kind of hacky in
       | order to deal with rate-limiting. It's ridiculous that Slack
       | doesn't have such a feature built-in because people have been
       | asking for it for years.
        
         | tyingq wrote:
         | Doesn't fix it, but supposedly there's an undocumented api
         | endpoint here:
         | https://api.slack.com/api/client.counts?token=token_here
         | 
         | It will return "has_unreads=true" for channels that have unread
         | notifications. So perhaps better than a naive brute force
         | traversal.
        
       | aquir wrote:
       | It would be awesome to find something similar to windows...I can
       | imagine "boosting up" my taskbar with this kind of stuff. If
       | anyone knows a similar app to Windows please let us know
        
         | st0le wrote:
         | Rainmeter is the closest thing to it.
        
       | joshstrange wrote:
       | Just updated from BitBar and ran into a small issue since xbar
       | doesn't support custom plugin folders the same way BitBar did (as
       | in a way to change it via the GUI). Thankfully you can just
       | symlink the plugin folder to your old BitBar folder and
       | everything works as expected. I opened an issue for it here:
       | https://github.com/matryer/xbar/issues/653
        
       | sebastianmarkow wrote:
       | http://www.hammerspoon.org/
        
         | permalac wrote:
         | What do you use it for?
         | 
         | How does it compare to keyboard maestro?
        
       | DandyDev wrote:
       | How does it compare to Swiftbar[0]? Any reasons to use Xbar over
       | SwiftBar given that the latter was built with a stack that is
       | more "native" to Mac than Golang?
       | 
       | [0] https://github.com/swiftbar/SwiftBar
        
         | sdfhbdf wrote:
         | UPDATE: XBar is a reboot by the original creator of BitBar [2].
         | I understood it as I was confused why I have it in my starred.
         | The below is my analysis before I understood it.
         | 
         | 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...
        
         | jonpurdy wrote:
         | I was wondering about why SwiftBar existed when there was
         | already BitBar, and a lot is explained in this thread on
         | Github: https://github.com/swiftbar/SwiftBar/issues/95
         | 
         | TL;DR: BitBar stopped working well in Big Sur and the old code
         | base was increasingly hard to update and build.
        
         | eddyg wrote:
         | This was the first question that came to mind for me too.
        
       | xbar wrote:
       | Sup.
        
       | m12k wrote:
       | I've been discovering more and more high quality open source apps
       | for Mac recently. My other favorites so far:
       | 
       | https://github.com/iterate-ch/cyberduck
       | 
       | https://github.com/rxhanson/Rectangle
       | 
       | https://github.com/sfsam/Itsycal
       | 
       | https://github.com/newmarcel/KeepingYouAwake
        
         | tylerritchie wrote:
         | KeepingYouAwake is nice (and I'm not about to pretend the
         | following solution is good for everyone), however, I've found
         | on the last couple of McBook fresh installs using caffeinate
         | [1] from the terminal is sufficient.
         | 
         | 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.
         | 
         | [1] https://ss64.com/osx/caffeinate.html
        
           | uncledave wrote:
           | I tend to use caffeinate to wrap scripts only. I want it to
           | go to sleep and stop eating all my electricity when it's
           | done.
        
           | KMnO4 wrote:
           | You can omit the -t and it will run forever.
        
           | weaksauce wrote:
           | you can throw an alias in your .bashrc or .zshrc and have it
           | even easier...
           | 
           | alias caffeine="caffeinate -d -t 999999"
        
         | raju wrote:
         | Along the same vein, this was posted a little while back on HN
         | which lists a few other ones that I have found useful.
         | 
         | https://onethingwell.org/
        
         | 9935c101ab17a66 wrote:
         | I'm a huge, huge fan of hammerspoon. It's replaced so many
         | other small utilities for me.
        
           | justwalt wrote:
           | When I started using a Mac for work, the fact that so much
           | functionality which is available free on Linux was now locked
           | behind a paywall in the App Store was frustrating.
           | 
           | 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.
        
         | aquir wrote:
         | CyberDuck is amazing! (MountainDuck also) Thanks for
         | recommending mate
        
         | drewzero1 wrote:
         | I've been using CyberDuck since PowerPC 10.5. I don't open it
         | much any more because sftp feels like it takes less effort
         | (despite the lack of autocomplete on Mac) but I do keep it
         | installed. I can also vouch for ItsyCal, another one of the
         | first things I install on a fresh Mac.
        
         | michaelmior wrote:
         | Thanks for this! I was going to mention Spectacle[0], but I'll
         | see that it's no longer maintained. I'll have to check out
         | Rectangle :)
         | 
         | EDIT: I see Rectangle is based on Spectacle!
         | 
         | [0] https://www.spectacleapp.com/
        
           | thamer wrote:
           | I also used to run Spectacle and was worried about it no
           | longer working at some point (like after a macOS upgrade).
           | 
           | Rectangle is all that Spectacle was - same default key
           | bindings - and more.
        
         | [deleted]
        
         | post_break wrote:
         | It's not open source but this is one of my favorites:
         | https://www.monkeybreadsoftware.de/Software/IPinmenubar.shtm...
        
           | deanclatworthy wrote:
           | This can be done using xbar, trivially.
        
       | bajsejohannes wrote:
       | I can't find any reasons why it was rewritten.
       | 
       | Was it C before? (I can't tell, because
       | https://github.com/matryer/bitbar redirects to xbar)
        
         | spurgu wrote:
         | Objective-C:
         | https://web.archive.org/web/20210118051718/https://github.co...
        
         | ihuman wrote:
         | The old repo is archived in the new one
         | https://github.com/matryer/xbar/tree/master/archive/bitbar
        
       | jjice wrote:
       | Bitbar-esque tools are fantastic. There are a wide variety on
       | Linux, watching with slightly different formatting, but
       | converting isn't a big pain. Being able to toss something
       | together to display a portion of a curl call in a few minutes is
       | great. I used to hate the top bar concept years ago when I was a
       | windows user, but after switching to Unix for the past handful of
       | years, I couldn't go back.
        
         | xtracto wrote:
         | A couple of weeks ago I looked for a Bitbar alternative for
         | Linux Mint/Cinnamon and there is really nothing. There's some
         | implementation of the "Argos" app but it doesn't really work.
        
       | sdfhbdf wrote:
       | Note that this is a rewrite/reboot from the original BitBar that
       | is still marked as beta but has very frequent releases.
       | 
       | There are more details about the motivations and such by the
       | author in the announcement issue:
       | https://github.com/matryer/xbar/issues/607
        
       | aequitas wrote:
       | One issue I've run into with BitBar is that you would need to
       | install dependencies systemwide which I don't want to. A solution
       | I found was to create a virtualenv for a specific script (or
       | BitBar as a whole) and just put the path of the Python executable
       | in the hashbang of the BitBar script, ie:
       | #!/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).
        
       | thamer wrote:
       | I love BitBar and currently have 6 separate tools in my menu bar
       | to keep track of things like Kubernetes instances in various QA
       | environments, local services running on my machine (with stats +
       | start/stop buttons + recent logs), or jobs running on cloud
       | platforms.
       | 
       | 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.
        
         | xtracto wrote:
         | Agree, I have it monitoring my AWS consumption cost and ETH
         | prices. Pretty handy.
        
           | mellavora wrote:
           | Would you mind sharing a code example of how you do this? It
           | sounds very helpful
        
         | geoelectric wrote:
         | I personally use it just to display the currently playing track
         | on Music--which actually solved a huge gap.
         | 
         | It 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.
        
       | imdsm wrote:
       | This is quite weird. Saw BitBar on here about five years ago and
       | started using it. Then today, having upgraded to Big Sur
       | recently, I noticed it didn't look right. The update didn't work
       | either, so I went to find the repo and saw it was now called
       | XBar. I upgraded and moved my scripts across and forgot about it.
       | 
       | Now what do I see when I come to HN for a quick break?
       | 
       | XBar. More proof that life is just a simulation.
        
       ___________________________________________________________________
       (page generated 2021-03-19 23:01 UTC)