5 ms·
To build your own menu bar app, I would recommend trying out xbar[1]. You can write "apps" in any language. The output of your program is used to construct the
by thamer 4y ago
To build your own menu bar app, I would recommend trying out xbar[1].
You can write "apps" in any language. The output of your program is used to construct the menu bar app, so if your program outputs this:
Hello
---
Open HN | href=https://news.ycombinator.com/
Then it will create a menu bar entry titled "Hello" with a single element in its drop-down menu, which will open Hacker News when clicked. You place your program in a specific directory for xbar to run, and it can be configured to run at a given frequency, e.g. once a minute to report the results of an API call or some measurement from your system, etc. Up to you to build the menu bar app you want.
[1] https://xbarapp.com/ https://xbarapp.com/
- duskwuff 4y agoIf you use Hammerspoon, you can build your own menubar icons in Lua using the hs.menubar[1] API. I've built a clipboard history tool using that, for instance. If you don't use Hammerspoon, you should check it out. :) [1]: https://www.hammerspoon.org/docs/hs.menubar.html https://www.hammerspoon.org/docs/hs.menubar.html
- tra3 4y agoHammerspoon is awesome. I have an `hs_message` alias that basically calls `hs.alert`. Super handy. The good thing about xbar is that you can quickly write small shells scripts. But I definitely love HS for global shortcuts/automation. One of the more impressive things I've seen is stack line [0] a visualization tool that works with tiling window manager, yabai. [0]: https://github.com/AdamWagner/stackline https://github.com/AdamWagner/stackline
- jemmyw 4y agoYeah Hammerspoon is great. I've written scripts to rearrange things correctly when I plug/unplug my laptop into external monitors.
- reddit_clone 4y agoIf it is not a hassle, could you please share some of these scripts? I always find rearranging apps/windows (I use multiple desktops) after a reboot quit painful.
- jemmyw 4y agoYou'll be disappointed because my use case is pretty simple - move the dock, remaximize all windows on the main screen and move chrome to my secondary screen. https://github.com/jemmyw/hammerspoon/blob/main/init.lua https://github.com/jemmyw/hammerspoon/blob/main/init.lua
- chewz 4y agoUse SwiftBar instead, xbar is stalled... https://github.com/swiftbar/SwiftBar https://github.com/swiftbar/SwiftBar