Gaulomatic / AirPodsSanity

Fixes the Sound Quality of AirPods when connected to a Mac.
185 stars 8 forks source link

Hide icon from Menu Bar #2

Closed BetterB0y closed 5 months ago

BetterB0y commented 9 months ago

I would love to see this feature. I locked my mic already and i don't need to change it now. So its unnecessary icon in menu bar.

habovh commented 5 months ago

Good idea, however we'd still need a way to access the settings. An approach similar to what Velja is doing would be nice: menu bar icon shows for a few seconds when the app is opened, allowing to interact with the menu if needed, then goes away.

Edit: @Gaulomatic, @BetterB0y this has been addressed on milgra/airpodssoundqualityfixer.

Gaulomatic commented 5 months ago

This feature has been implemented in 1.0.4 1.4.0.1 Thanks @habovh for the suggestion on how to implement this. The menubar icon will reappear for 10 seconds when the app is started for again, meaning a seconds instance.

Gaulomatic commented 5 months ago

Closed as feature is implemented.

Gaulomatic commented 5 months ago

I had to add some more detection methods if the app is re-opened, since the Finder will not really launch the app twice, but instead just activate the already running one.

Now this works when the app is actually instantiated twice (via Terminal) through IPC as well as when the activation event is fired on "re-launching" via Finder, Raycast and such.

I killed version 1.4.0 from the releases and uploaded version 1.4.0.1 in which everything should work as intended.

habovh commented 5 months ago

Awesome! This made me realise that preferences are lost between updates. Maybe would be worth looking into, especially for people hiding the icon from the menu bar.

Gaulomatic commented 5 months ago

I thought this was a fluke, some kind of cosmic ray flipping a bit type of thing. I fixed this in version 1.0.4.2 by making all variables optional and using a wrapper with default values.