Swift is needed, and I can’t use Objective-C.
I’m developing a menu bar management software and I’m struggling with getting informed of the available width of the status bar, as I’m showing some width related animations. The information I want to get is the available width that can display menu bar items, that is, the area in red or the area in blue in the below image.
Imgur link of the image as I have no enough reputation to post it
PS: I’ve found this, but haven’t tried yet. Is it stable and effective to use bridged scripts?
Currently what I’ve tried: iterate over all window informations as mentioned here, but end up finding that app menus are not treated as normal windows.
I expect: to get any of the mentioned widths, or to get an edge position of the frontmost app’s menu bar.
KrLite is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.