hidden icon indicating copy to clipboard operation
hidden copied to clipboard

Remove Application menu when needed

Open hampton8 opened this issue 4 years ago • 26 comments

When there are a lot of icons in the menu bar, some of the leftmost ones can end up being hidden by the current application's left menu. The implementation of a feature such as Bartender 4's 'Remove Application menu when needed' would solve this.

Here is Bartender's description of the aforementioned function:

If any revealed items would be hidden by the current application's left menu (when they are being shown), Bartender will remove the application's menu. Due to a limitation in macOS, Bartender's dock icon will be visible while the left menu is removed.

Can this functionality be added to Hidden Bar so that icons don't end up being out of view?

hampton8 avatar Dec 23 '20 22:12 hampton8

Hi

Thanks for your suggestion, we will have a look on it. Currently you can quick an app, rearrange new icons then open app again to bypass this limitation.

Regards.

On 24 Dec 2020, at 05:01, hampton8 [email protected] wrote:

When there are a lot of icons in the menu bar, some of the leftmost ones can end up being hidden by the current application's left menu. The implementation of a feature such as Bartender 4's 'Remove Application menu when needed' would solve this.

Here is Bartender's description of the aforementioned function:

If any revealed items would be hidden by the current application's left menu (when they are being shown), Bartender will remove the application's menu. Due to a limitation in macOS, Bartender's dock icon will be visible while the left menu is removed.

Can this functionality be added to Hidden Bar so that icons don't end up being out of view?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dwarvesf/hidden/issues/104, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRSPN3UVH2QM6QRVHTE77TSWJSCXANCNFSM4VHPPZAA.

viettrungphan avatar Dec 24 '20 07:12 viettrungphan

No problem @viettrungphan

I understand the solution you have explained, but as I'm sure you'll agree it's far from ideal and is rather inconvenient, so an integrated solution for this limitation would be really useful, especially since Big Sur increased the spacing between menu bar icons so it's even easier to fill up the very limited space up there.

Please do let me know if you need a screen recording of how Bartender 4 handles this (or if you want to experience it yourself, they currently have an indefinite public beta free trial).

All the best and Happy Holidays!

hampton8 avatar Dec 24 '20 11:12 hampton8

I have the same issue on laptop screen. Example is Microsoft Edge - a lot of menu items. I had already figured out the work-around but it is cumbersome. Thank you!

jjljservices avatar Jan 27 '21 19:01 jjljservices

I saw some guy use accessmenubarapps and hidden at the same time achieve this feature. (Setup two applications with the same hotkey). But this combination not always work perfectly.

CaptainVincent avatar Feb 23 '21 15:02 CaptainVincent

This is really good missing feature for small screens!

pySilver avatar Apr 29 '21 14:04 pySilver

Dozer has this feature (disclaimer: I programmed the feature)

gingerbeardman avatar May 14 '21 10:05 gingerbeardman

@gingerbeardman I'm heading to downloads section then! :)

pySilver avatar May 14 '21 12:05 pySilver

Dozer has this feature (disclaimer: I programmed the feature)

Just downloaded Dozer to try it and the feature isn't working for me; icons that overlap the application menu are hidden just as is the case with Hidden Bar. Am I missing something?

hampton8 avatar May 24 '21 23:05 hampton8

this easy to implement using the accessibility framework (to read and interact with everything on the screen), however at the beginning of this project we don't want to do it since it violated AppStore policy. That is the reason why you see Bartender guide you to enable accessibility and screen record. We have Vimmotion app you can have a quick look to see what we can do with that framework seriously. https://github.com/dwarvesf/VimMotionApp

viettrungphan avatar May 25 '21 08:05 viettrungphan

Hi the last comment makes no sense to me.

I implemented the feature in Dozer without using the accessibility framework.

gingerbeardman avatar May 25 '21 08:05 gingerbeardman

Just downloaded Dozer to try it and the feature isn't working for me; icons that overlap the application menu are hidden just as is the case with Hidden Bar.

Am I missing something?

Surely you are missing something, as the feature works has been working for many months. I use a portrait display so I use this every day. Did you switch the feature on? It's not on by default.

Anyway, this isn't the best place for Dozer support. I'll be happy to help you further over at Dozer repo.

gingerbeardman avatar May 25 '21 08:05 gingerbeardman

@gingerbeardman I just try Dozen and dont see it work. My understanding:

  1. The Left menus is something on the Left hand (🍏 AppName File Edit View History...)
  2. Those menu change by app, change focus between app changing them.
  3. Depending on app, the size of Left Menu count by sum of number of items and length of Text.
  4. Left menu have higher priority than Right Status menu.
  5. When don't have enough space Right menu should hide icon(s) on the left to let Left Menu show all of they menus.
  6. The featured user request above is: Depending on Left menus length we need detect it and hide - show "Hiden bar" menu bar icons automatically (to save a bit space). I don't know how to get the "Left menu size" and "Right menu size" to compare without accessibility. I guest we can listen to active window change event to recheck it somehow.

viettrungphan avatar May 25 '21 09:05 viettrungphan

It's in Dozer 4.2.0 https://github.com/Mortennn/Dozer/releases

gingerbeardman avatar May 25 '21 10:05 gingerbeardman

@viettrungphan so, this feature is not going to be implemented any time soon in hidden app?

pySilver avatar May 25 '21 14:05 pySilver

thanks, the version from brew is 4.0

viettrungphan avatar May 25 '21 14:05 viettrungphan

@viettrungphan so, this feature is not going to be implemented any time soon in hidden app?

If possible I going to add it for the next release.

viettrungphan avatar May 25 '21 14:05 viettrungphan

@viettrungphan Thank You :)

pySilver avatar May 25 '21 14:05 pySilver

Sorry for the misunderstanding, thought Hiddenbar should hide both of the app icons (|>) automatically to save a little bit of space when needed, don't think you guys need to clean all the left-hand side by active the Hidden app using the shortcut.

viettrungphan avatar May 25 '21 14:05 viettrungphan

Some screenshots of my menubar (I use a "narrow" portrait display) and details of the feature in this old Dozer issue https://github.com/Mortennn/Dozer/issues/111

gingerbeardman avatar May 25 '21 15:05 gingerbeardman

Thanks, I know how to do this, just simple change app active policy, remove all existed menu + active ignore other app.

viettrungphan avatar May 25 '21 16:05 viettrungphan

Guys, I'm done, it simple than I thought. 4 primary lines of code if Preferences.useFullStatusBarOnExpandEnabled { NSApp.setActivationPolicy(.regular) NSApp.activate(ignoringOtherApps: true) }

if Preferences.useFullStatusBarOnExpandEnabled { NSApp.setActivationPolicy(.accessory) NSApp.deactivate() } Screen Shot 2021-05-26 at 16 38 41

viettrungphan avatar May 26 '21 09:05 viettrungphan

Screen Shot 2021-05-26 at 16 42 07

viettrungphan avatar May 26 '21 09:05 viettrungphan

I think label should read "menu bar" not "status bar"?

gingerbeardman avatar May 26 '21 09:05 gingerbeardman

@gingerbeardman not sure which one. I come from iOS, they call StatusBar on iOS. All the buttons when coding prefix NSStatusBar so I use it. Any idea?

viettrungphan avatar May 26 '21 10:05 viettrungphan

Officially, Apple refer to it in user-facing docs as menu bar and the items are menu bar extras.

Though I do see your point regarding iOS and NS prefix. It's a mess 🤦

https://developer.apple.com/design/human-interface-guidelines/macos/extensions/menu-bar-extras/

Screen shot 2021-05-26 at 13 04 06

gingerbeardman avatar May 26 '21 12:05 gingerbeardman

Using this feature menu bar takes focus.

Focus should remain with foreground application.

  1. Enable "use full menu bar" feature
  2. Switch to Safari
  3. Click hidden bar marker

Expected

  • Safari should keep focus

Actual

  • hidden menu bar has focus

gingerbeardman avatar Jun 04 '21 23:06 gingerbeardman