14 ms·
Xbar: The BitBar reboot. Put anything in your macOS menu bar
- aequitas 6y agoOne 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).
- psychometry 6y agoI 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 6y agoDoesn't fix it, but supposedly there's an undocumented api endpoint here: https://api.slack.com/api/client.counts?token=token_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.
- DandyDev 6y agoHow 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 https://github.com/swiftbar/SwiftBar
- eddyg 6y agoThis was the first question that came to mind for me too.
- sdfhbdf 6y agoUPDATE: 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 https://github.com/matryer/xbar#advanced-apis [1]: https://github.com/swiftbar/SwiftBar#refresh-schedule https://github.com/swiftbar/SwiftBar#refresh-schedule [2]: https://github.com/matryer/xbar/issues/607 https://github.com/matryer/xbar/issues/607 [3]: https://github.com/matryer/xbar/issues/607#issuecomment-775205210 https://github.com/matryer/xbar/issues/607#issuecomment-7752...
- jonpurdy 6y agoI 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 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.
- bajsejohannes 6y agoI can't find any reasons why it was rewritten. Was it C before? (I can't tell, because https://github.com/matryer/bitbar https://github.com/matryer/bitbar redirects to xbar)
- spurgu 6y agoObjective-C: https://web.archive.org/web/20210118051718/https://github.com/matryer/bitbar https://web.archive.org/web/20210118051718/https://github.co...
- ihuman 6y agoThe old repo is archived in the new one https://github.com/matryer/xbar/tree/master/archive/bitbar https://github.com/matryer/xbar/tree/master/archive/bitbar
- m12k 6y agoI'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/iterate-ch/cyberduck https://github.com/rxhanson/Rectangle https://github.com/rxhanson/Rectangle https://github.com/sfsam/Itsycal https://github.com/sfsam/Itsycal https://github.com/newmarcel/KeepingYouAwake https://github.com/newmarcel/KeepingYouAwake
- raju 6y agoAlong 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/ https://onethingwell.org/
- tylerritchie 6y agoKeepingYouAwake 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 https://ss64.com/osx/caffeinate.html
- KMnO4 6y agoYou can omit the -t and it will run forever.
- weaksauce 6y agoyou can throw an alias in your .bashrc or .zshrc and have it even easier... alias caffeine="caffeinate -d -t 999999"
- uncledave 6y agoI 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.
- jjice 6y agoBitbar-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 6y agoA 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.
- wrink 6y agoSite is down :c 503
- sdfhbdf 6y agoNote 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 https://github.com/matryer/xbar/issues/607
- imdsm 6y agoThis 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.
- joshstrange 6y agoJust 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 https://github.com/matryer/xbar/issues/653
- aquir 6y agoIt 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
- thamer 6y agoI 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 6y agoAgree, I have it monitoring my AWS consumption cost and ETH prices. Pretty handy.
- mellavora 6y agoWould you mind sharing a code example of how you do this? It sounds very helpful
- kristofferR 6y agoJust download xbar, install some plugins through the included plugin browser, and check the source code. It's incredibly easy. If you can echo something in a shell script you can echo it in the menu bar.
- xtracto 6y agohttps://gist.github.com/obaqueiro/af4de922e9233e084057efcd668084d6 https://gist.github.com/obaqueiro/af4de922e9233e084057efcd66... https://gist.github.com/obaqueiro/4c8e679bb684f966a654f3aa999628e4 https://gist.github.com/obaqueiro/4c8e679bb684f966a654f3aa99... They are pretty handy
- thamer 6y agoI'd suggest checking out jq for parsing JSON files: $ curl -s https://api.coinbase.com/v2/prices/ETH-USD/spot | jq -r .data.amount 1675.55
- 6y ago
- sebastianmarkow 6y agohttp://www.hammerspoon.org/ http://www.hammerspoon.org/
- permalac 6y agoWhat do you use it for? How does it compare to keyboard maestro?
- mikeywazowski 6y agoI'm not the person you're asking, and I do most of my work on a PC running Linux now, but Hammerspoon is one of a few things I really miss about OSX. 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.
- xbar 6y agoSup.
- yurishimo 6y agoSup.
- bloopernova 6y agoMy BitBar script displays the Unix epoch, comma separated: { 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}" "}"
- seanwilson 6y agoBitBar is really cool. You can get something up and running in no time and it's fun to come up with some small personal automations. 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.
- themk 6y agoI've been using barbly[0] which I wrote to scratch my own itch. It uses a JSON format for describing the menu bars which I found easier to work with. It's aesthetic is slightly different as well. [0] https://github.com/luke-clifton/barbly https://github.com/luke-clifton/barbly