UeharaYou / HiddenBar

An ultra-light MacOS utility that helps hide menu bar icons
Other
124 stars 9 forks source link

[FEATURE] Remove `Folded` separator when not editing #6

Open leoravagnani opened 10 months ago

leoravagnani commented 10 months ago

Hey @UeharaYou! I've been out the loop on this project for a while, just saw your comment on my issue on the original repo pointing to this fork.

I was wondering if it's possible to remove the Folded separator when out of edit mode so it doesn't take any space in normal usage. As it currently stands it acts like there's an icon there - albeit invisible.

Screenshot 2023-11-07 at 02 40 50

If it's impossible, no biggie, I'll just live with it ¯_(ツ)_/¯› Thanks for picking up this project!

UeharaYou commented 10 months ago

@leoravagnani Hi! Thanks for the issue. It is theoretically possible to remove the separator completely when showing hidden icons, but it's a lot harder to put it back to where it should be (Technically, AppKit doesn't want apps to mess around with other apps' status bar item, not even letting apps to decide where their status bar item would be _| ̄|○ ). There will be a LOT of complexity and head-boggling introduced just for fixing this issue, so I'm sorry that you have to live with that for now🥺.

ps. There are other ways to get more control to the menu bar that I'm testing with (which will address this issue and more), but it not stable enough for the release.

leoravagnani commented 10 months ago

hmm gotcha! well if the labour of tackling this (non-)issue isn't worth the effort it's really no big deal.

What about handling the width of the "icon" instead of removing it altogether? Not sure if it's feasible either as things seemingly changed since Big Sur... I get the impression that icons (or rather the root view that contains it) have a fixed minimum width, being able only to expand but not compress beyond that threshold.

Admittedly I don't know much about macOS as I'm an iOS guy, just throwing ideas around haha

leoravagnani commented 10 months ago

Or what if the arrow itself becomes the separator? Of course I can't vouch for every user's preferences, but I'm assuming most people would put it where anything left of the arrow is hidden (just as Window's task bar groomed us decades ago).

UeharaYou commented 10 months ago

@leoravagnani Yes, using the main toggle as the primary separator is the ideal way of implementation. However it is also hard because macOS stops rendering status bar items once they exceed render range of the status bar (even just a little bit). HiddenBar serves the naive way where the main toggle serves as the control, and the separator "pushes" other icons out (which also pushes itself out of the range). The main toggle will not show on screen if it were the "pusher", so it is an unwilling compromise. _:(´ཀ`」 ∠):

ps. The gap is caused by macOS inserting paddings between icons, even if the icon itself is 0 in width. There's a way to adjust this padding though.

FUFAFUFA commented 8 months ago

Thanks for the project. Instead of not hiding some elements when always hidden was enabled for the older version, its now actually hiding them:)