-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to move status bar icons programmatically? #69
Comments
After seeing how Dozer hides icons using this: static let hide: CGFloat = 10_000 I suppose the way to go might be some kind of AppleScript. |
Also would like to hide icons programmatically |
This might be useful: https://github.com/shergin/NSStatusBar-MISSINGOrder |
@AndrewMast those do not respond (macOS 10.14), so that code is obsolete :( [self respondsToSelector:statusItemWithLengthWithPrioritySelector] &&
[self respondsToSelector:insertStatusItemWithPrioritySelector] |
I noticed some keys in the plist preference file for apps: Thought A:
|
Great research!
This is actually a pretty clever thought. Could work. We would probably also need to figure out which process updates the menu bar icons after we have updated the plists. As you say, thought B requires restart, so it is sadly not an option. As a side note, Bartender requires accessibility access, so we might need to look in that direction. |
Thought I'd start a list of what we may need to do:
...there are probably more! |
From what it looks like, it would appear that Bartender is indeed using some form of @gingerbeardman's "Thought A" where it manages the values of each app's Prior to using Bartender to make any adjustments to an app I use which has 3 seperate
After changing the app's visibility setting in Bartender from the default "Show" to the new value of "Hide", those values were each immediately changed to :
So to "hide" the icons, it looks like they are really just moving them so far to the left on the menubar that they can't possibly be in view. |
@dmattera How do those positions change if you rearrange those menu bar items? Both using Bartender and not would be useful to know. |
Does anyone know how to move status bar icons programmatically?
The text was updated successfully, but these errors were encountered: