Wednesday, January 5, 2022

A quickie: cleaning up and automating your Mac taskbar

I just set up something really slick on my Mac, so I thought I'd share.  I'm sure I'm not the only one with too many items at the top of my Mac's screen.  The more things you're running, the more cluttered it gets to the point of being nearly useless.  The best way I've found to tame that is another app.  Yeah, I know - it sounds counterintuitive, but hear me out; and don't forget the phrase "fight fire with fire".  So, that app is Mac Bartender, and it's about the best $15 you'll spend on your Mac.  It works by moving apps, icons, alerts, etc into sub-taskbar that only shows up when you ask it to, and it also lets you rearrange their  ordering.  Best of all, it can automatically unhide icons when you want them.  The simplest way is to have the application's icon reveal itself when changes - and that works reasonably well for most things, like wifi indicators, changes to your cloud folders (Nextcloud, Dropbox), or backups starting/finishing - but sometimes you want an icon to appear even if it hasn't changed, so Bartender lets you create a shell script as a trigger.

Want an example?  That's the purpose of this post.  (No credit for guessing that.  Too easy - no style points.)  I'm using a small AI app, krisp.ai, to clean up audio for Zoom, FaceTime, Signal, Skype and friends.  You should check it out, by the way - it's shockingly good: even with my mic inches from a (very noisy) mechanical keyboard, no one else can hear a single keystroke.  Krisp recently added video cleanup, so I'd like the Krisp icon to be visible in the taskbar whenever I'm on a call.  A 1-line shell script to the rescue.  Now, instead of having Krisp unhide when its icon changes, Bartender runs the following command every 30 seconds:

ps x | grep -v grep | egrep -q "zoom.*evt" && echo 1

That's Linux/Unix speak for "check whether Zoom has a meeting running, and if so print the number 1", which tells Bartender to keep the Krisp icon visible in the task bar.  Simple, easy and very effective.

If you're using tools like this I'll be glad to help you configure them. And if you have other suggestions, big or small, to how to make life a bit easier, please share them! You can leave a comment, write a full post here, or let me know the details and I'll do the writing. 

Happy automating!

No comments:

Post a Comment