Hacker News new | past | comments | ask | show | jobs | submit login
Hidden Bar: macOS utility to hide unused menu bar icons, written in Swift (github.com)
133 points by luckman212 6 months ago | hide | past | favorite | 72 comments

For anyone who's wondering how it works: key line of code seems to be here (https://github.com/dwarvesf/hidden/blob/develop/hidden/ViewC...), where they make the "separator" element really wide to push the icons to be hidden offscreen.

Apparently that trick is used in other, similar tools: https://github.com/Mortennn/Dozer/blob/master/Dozer/StatusIc...

So I imagine then that this relies on operating system behavior that says "show as many icons as we can fit, if we go over our limit hide the rest and right-justify the ones that did fit" - so therefore by controlling the width they can change that breakpoint?

Happy MacOS users.. In linux land, we have gnome shell which simply removed support for menubar icons and have never re-added the functionality since. Goodbye dropbox, slack, skype menubar icons. Try using some hacks to see their icons again.

I'm very bitter about this.

Unhappy Linux users, start appreciating the variety of choices you have in terms of desktop environments. You don't have to suffer because you feel subjugated by GNOME. I suggest trying KDE for a while, if you want to know what being treated as a competent user feels like.

Unhappy Linux users, try a MacBook!

POSIX without being a POS

Please don't post unsubstantive comments or take HN threads into flamewar. We don't want that here.


Oh please.

It was clearly a humorous comment with the "substance" OSX enjoys a lot of developer support a-la-Linux ... because of POSIX support (amongst other things)

Anyone who uses such obvious satire as an excuse to start a flamewar could start a flamewar over a lot less, I was under the impression I don't have to write with petulant children being my target audience.


I think the most annoying thing about this is plenty of people got that without issue, the comment existed for hours with plenty of useful discussion from people who understood the satire...

Then some upset person taking it as a personal slight flags the post and now it's hidden, how silly.

Your intention wasn't obvious, the joke wasn't funny, and it was guaranteed to land as a provocation with someone, since it's basically a trollish remark.

There's nothing wrong with humour per se, but most people overrate the humour in their own comments. scott_s said it best: https://news.ycombinator.com/item?id=7609289

It looks like you've been breaking the site guidelines in other comments as well. Would you mind reading them and sticking to the intended spirit of the site when posting here?


"the joke wasn't funny" is your opinion, and clearly it's own kind of bait.

The comment was upvoted and well received, and even generated an actual discussion until it was flagged and people jumped on the bandwagon.

There was nothing wrong for people who approached the comment and "assumed good faith"

Not gp, but I'd love to run OSX legally, even if just for testing. But their hardware doesnt fit my requirements, nor is it a good value for money.

It depends on what you value for that money. Of course all of this is personal opinion, but I’ll give it.

The 2015 and now 2019 MacBook pros are the best fit and finish computers on the market (yes I skipped the nonsense they did with that keyboard and thinness over heat and battery size nonsense in between). The keyboards are my favorite touch out of anything on the market. The screen, while annoyingly reflective, has great quality and pixel density. The OS despite flaws in each new release, within a patch generally is more stable than any other I touch on a daily basis. The battery life first on the 2015 laptop and now on the 2019 version was the first time I’ve experienced using a machine that I could program on and watch movies on flights across the country, without concern of running out of juice. The trackpad is better than anything else that I’ve tried on the market.

Yes, a lot of this could be due to limited experience of other systems out there, but Apple despite its missteps, generally lives up to producing a luxury brand computer that doesn’t feel like a waste of money given the joy of the overall experience.

I recently switched from macbooks to the awfully named ThinkPad X1 Extreme Gen 2 (the big sister of the X1 Carbon) running linux and I've found it's hardware superior for me in almost all ways: much better thermal management even with running an Nvidia gpu flat out; a keyboard that manages to feel firmly clicky without distinctly clicking that probably won't die in six months (no, I don't trust Apple the sixth or seventh time they lie); the ability to disable microphone, cam, or both in the BIOS; the trackpoint and three physical mouse buttons; a more convenient screen size; a more standard range of ports - 2xUSB-A, 2xUSB-C/Thunderbolt, SD, HDMI, mic/headphones, and RJ45 (with adapter); even the small raised bar instead of a pair of feet under contributing to a better grip.

I've owned Mac laptops since that meant PowerPC or a more exotic processor, used Mac OS since the week Macs were released. I've also been a heavy ThinkPad user since 2000. These days if you're a unix person Macs simply don't earn their price premium and they require a lot more fiddling than my openSUSE & Cinnamon ThinkPad. I'm running the bleeding edge Tumbleweed rolling release and I'm still having fewer random problems than the last couple of OS X releases gave me.

I have installed at least 5-6 utilities on my work Mac to be able to work productively, that is to work with more than 1 window at the same time. I really miss my KDE desktop at such times which I can customize at will

It just might be me, as I was also never able to feel comfortable with iOS but as long as I can find a solution to do my work I don't complaint much, at least less than when I was 20 :)

Me too. And the extensions are quite buggy. gnome-shell crashes less often since I've removed them. But now I end up with inaccessible (except by launching the app again) Skype, Spotify, etc. instances.

This behavior is also difficult to understand for novice users.

I understand that the implementation of systray icons were a hack. But don't remove basic functionality until there is a supported replacement.

On the other hand, this should not have come as a surprise. They have also removed menus and replaced them by incomplete, unusable hamburger menus.

/grumpy GNOME user

What do systray icons give you that simply keeping the windows open on a spare virtual desktop doesn't? Notifications ought to be still supported, right?

I run KDE on my personal desktop and we have the system tray icons.

Now if I could figure out Mac style copy and paste it would be just about perfect.

What do you mean? Keyboard shortcuts (using ALT + C/V) or something else?

Changing keybindings is really easy. I understood the comment as copying Mac's style (unclear what exactly) and recreating it on KDE.

But maybe that's the weird translation from English in my head.

And Application Menus as well have been forcefully disabled. I moved to KDE after that and surprisingly, it's lighter. Considering that I don't have to rely on Gnome Shell hacks for basic functionality, my KDE system is even more stable.

You mean system tray, right?

It is still there just in the bottom left instead of the top right. Also, you know that you can use any panel or dock you like in gnome shell? For example lxpanel, tint2,...

GNOME shell user here with menubar icons, it isn't a problem for me.

I've been using XFCE since Gnome 3 was released. It can be configured to look almost exactly like Gnome 2 did, and supports the menubar icons and indicators that Gnome decided to drop.

Me too, these icons served a useful purpose. I'm still salty about not seeing my Syncthing-GTK status there anymore..

Elementary also got affected by this.

Reading the title I interpreted this as "utility which figures out which icons you hardly use and puts them away". That's not what this does, but it is an interesting idea nonetheless. I wonder if this has been implemented somewhere (don't care which OS). I.e. I see a lot of desktop software which defaults to discoverability (well, I think that is the choice made): show the user a wealth of menus and buttons and status bars. Then in reality the user uses 1% of these buttons, and the rest is just there eating screen space. For writing, programming and graphic design this can be quite a lot of space. Automatically shrinking that space by removing buttons the user never used after months could help some users a bit I think. It's not the first time I encounter people complaining about screen estate while sitting in front of an unconfigured Visual Studio instance with menu bar, 2 rows of buttons and status bar all on. That's like 5 lines of code, depending on font. (and if you point to random icons and ask 'what does this button do?' they don't know, so it really is a waste)

This is exactly what MS tried with Windows and Office in the late 90s. People hated it and MS has since removed this automatic adaption completely.

Office menus in particular took on a shortened form with only the most used items. You had to explicitly expand them to see the remaining items that Office considered irrelevant to you. This has two major problems: the UI became incomsistemt between users, too dynamic and therefore comfusing. Amd even though users used a particular 1% subset of an Office program today, it would be a different subset the next day or the next week. This sent them constantly hunting for menu items that "should be there".

All of this was replaced with the ribbons makeover. Now, the interface is not adapting to the user, but to the current context. Although I don't like that interface very much, it is at least less surprising.

Personally, I hate it when applications seemingly randomly alter the interface. It breaks my memory of where things are; I have to stop and stare at things to figure out what happened and where that icon went.

It is like having a "helper" who hides your tools.

Most annoying is when it happens immediately.

The natural example in this context is of course the moving status items, in Windows 10, which might move just after you use them once or even on hover.

But even any list which is sorted by a volatile criteria works like this. Like the most recently used bookmarks. Maybe you want to open item 1 & 2, so you click item 2 first and then go for clicking item 1, only they have now already traded places because of the first click...

Yeah on second thought, I think I might be looking at this too much from my own perspective. I almost solely use the keyboard to command applications so whatever solution I come up with for others who click icons might not be ideal. Still, I wonder: do you really know the meaning and place of all icons in applications you use frequently?

I just commmand-drag the ones I don't want to the Trash and they're gone.

What, what?! You're right... how have I used Macs for decades and never known this!

Does that always work for third-party icons too? They don't get re-added every time you start up or anything? (Curious what you do if you change your mind and want one back.)

> (Curious what you do if you change your mind and want one back.)

If you want to add an application's icon to the dock, find it in the Finder and drag the icon onto the dock.

The dock is not the menu bar.

Ah, thank you! I forgot the context. I am sorry!

I use bartender, it's worked great. Will check this one out also. Hard to go back to clutter after using tools like these.


This is great! Bartender works well but I never wanted to buy it for something so trivial. Thanks dev!

Bartender is a big bit more advanced than this implementation, but it's nice to see some competition!

Dozer (https://github.com/Mortennn/Dozer) is also open source

I wonder what happens if you drag the | button past the > hide buttom and then click hide :)

This looks really cool, not quite as functional as Bartender but definitely more affordable. However, I'm really looking for a way to hide app icons in the Dock and/or fast switch dialog. Things like my VPN connection or Anti-Virus program are always showing up when I Alt+tab between programs and it's annoying. Is there a simple, native way to hid those things?

Tiny improvement suggestion: remove the "collapse" button and show the residual items on mouse hover of any of the top right menu bar area automatically. Save me the extra clicks. That would be exceptional user design :) Right now, it's not worth the extra 2 clicks for "a cleaner look", so I did not download

AppStore link: https://apps.apple.com/it/app/hidden-bar/id1452453066?mt=12

If the author is reading: the link on top of the github page is broken.

This looks like a light version of the Vanilla app [1] but free and open source.

Also, a clever solution to hide the unused icons!


I don’t think this one hides icons.

It doesn't hide unused ones, but it does hide menu items.

Ah, so it does. I just didn’t see the end of the GIF.

Love how you've hacked the purpose of menu bar buttons to create such a simple user interface - no separate menus or configuration, just drag things around!

Haha, I’m glad I’m not the only one who wanted this! Nice work

An alternative to Bartender?

This just seems to add spacers.

Edit: it apparently hides icons as well, though it does them differently than Bartender.

brew cask, anyone?

Why "written in Swift" is of any importance to be in the title?

Not sure about this specific app, (it's unlikely to be heavy) but it's a nice indicator of "native". As opposed to yet another electron / java / whatever heavy runtime app.

Its OSS. The language is good to know for anyone who might be interested in assisting.

HN: HackerNews

Please don't mention anything related to software development, this upsets the hackers.

Same reason you see engine details mentioned when talking about cars at car forums.

Engines are part of the user experience in the car though, ObjC/Swift wouldn't matter here.

Of course the choice of programming language can be part of the user experience. It directly affects CPU time and memory usage, it hints at how well the platform integration is and how big the download size is going to be.

If the title said "Hidden Bar: macOS utility to hide unused menubar icons, written in JS (Electron)", I wouldn't even have considered clicking the link to read more about the project, let alone install the software, because an Electron based software to do such a minor thing like hiding menu items is never going to deliver an acceptable user experience for me.

Although I got down votes, but I dont regret my question. Now I know why it is important for people to mention the language of a project. It makes sense now.

Kind of does considering it is a native application, not written in javascript, python, java or some else not as performant in the context of macs.

well, I mean, in that it’s not some JavaScript nonsense that gobbles a GB or so of ram for no readily explicable reason, it is pretty important to the user experience.

The same reason other projects mention "in Rust" "in Haskell" etc.

Well, I dont get them as well.

Do you get it when some app or game says which operating system it's for?

Apples and oranges.

As a user, I need to know which operating system an app runs on, otherwise I might not be able to run it.

The language used to write it plays no role in that.

This is an open source project, where you need to know if you know how to edit/fix/compile it if needed.

I use (directly or indirectly) thousands of OS projects. I can do those things for a handful, and maybe a few dozen in theory. I wouldn't stop using lots of great utilities just because I don't know Go.

Thanks for making the code public, but since it's the first time I see something like this, I don't see why you shouldn't slap a $5 price tag on it on the Appstore :)

Maybe the author doesn't want the hassle of supporting commercial software or just feels like giving it away.

At any rate, Bartender has been around for years, works great, and has a ton more features.

My comment was an invite to monetize, regardless of the motivations he could have, right now.

Wow. What I always liked about MacOS was that there weren't too many menubar icons to begin with.

Back in the days of Windows 98, it became typical for every application you installed to make a little icon in the "System Tray". Each app wanted to advertise itself and its (usually useless) features. The System Tray became a dustbin of crap. Eventually windows had to auto-hide them, just like you do with a dustbin.

Windows also burdened users with useless notifications, for things like "Battery charged!" and "Battery at 80%", that would constantly distract you. This happened so much that PhDs in Computer Science wrote entire dissertations and approaches to use machine learning to determine the optimal time to interrupt the user with notifications, in an attempt to intelligently unburden users from this nonsense. (http://reports-archive.adm.cs.cmu.edu/anon/hcii/CMU-HCII-06-...)

OSX solved this problem by abstaining from those useless notifications and icons to begin with. They didn't provide an API for app developers to add menubar icons. So few did. But then developers wrote hacks to do so. Now there are so many that they've become a dustbin again, and we need a new app to hide them. It's Windows 98 all over again.

Here's an idea -- if you are noticing useless menubar icons, get rid of them. Don't invent a new icon, that has the ability to hide other icons, and then try to come up with a UI (or machine learning system) to discern which icons need to be shown and hidden. Just get the design right in the first place.

Ahh... I know I know... Steve Jobs is dead... and now the whole philosophy of getting the design right is a minority opinion. sigh

NSStatusItem has been in OS X since at least 2008


So I have a hard time seeing how you blame menu bar icons on Steve Job’s absence.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact