DanielStormApps / Fanny

Monitor your Mac's fan speed and CPU/GPU temperature from your Notification Center.
https://www.FannyWidget.com
MIT License
1.33k stars 103 forks source link

Feature/dynamic menubar icon #43

Closed asvela closed 4 years ago

asvela commented 4 years ago

Possible base for new feature for displaying the current CPU temperature rather than a static icon in the menubar (addressing feature request #42).

To do:

Tested on macOS 10.14.6.

(Let me know if I should have done this differently than opening a pull request, I am not familiar with how to contribute)

DanielStormApps commented 4 years ago

Thank you for taking a stab at this @asvela !

I'll review the PR and leave some feedback. In its current state with the TODO's I wouldn't want to merge this in. Would you be ok with me taking this feature over?

asvela commented 4 years ago

Thank you for taking a stab at this @asvela !

I'll review the PR and leave some feedback. In its current state with the TODO's I wouldn't want to merge this in. Would you be ok with me taking this feature over?

Sure, absolutely! I agree it is not ready to merge in quite yet, but was not sure how I would share it otherwise than making a pull request (if I should have done it differently please let me know).

As I said previously, I have no experience with this so please excuse the not so elegant way of doing it. Happy to assist if there are other things I could possibly do.

asvela commented 4 years ago

Made some changes to add icon/temperature/nothing preference option:

icon temperature

However, I am not sure how to remove/hide the menubar item all together. Currently it is just an empty narrow strip: Screenshot 2020-04-06 14 44 27

The storyboard constraints were confusing, so they might need some revision too.

vanthuanqs commented 4 years ago

Thank guys, I was looking for this feature for a long time, hope it's going to live soon

DanielStormApps commented 4 years ago

Thank you for taking a stab at this @asvela ! I'll review the PR and leave some feedback. In its current state with the TODO's I wouldn't want to merge this in. Would you be ok with me taking this feature over?

Sure, absolutely! I agree it is not ready to merge in quite yet, but was not sure how I would share it otherwise than making a pull request (if I should have done it differently please let me know).

As I said previously, I have no experience with this so please excuse the not so elegant way of doing it. Happy to assist if there are other things I could possibly do.

A PR is the right way to share ๐Ÿ‘

DanielStormApps commented 4 years ago

Made some changes to add icon/temperature/nothing preference option:

icon temperature

However, I am not sure how to remove/hide the menubar item all together. Currently it is just an empty narrow strip: Screenshot 2020-04-06 14 44 27

The storyboard constraints were confusing, so they might need some revision too.

Nice! Thank you! I wonโ€™t have time until later this week to go over it all. Will keep ya posted ๐Ÿ‘

DanielStormApps commented 4 years ago

@asvela Merged โœ…

Made some changes on another branch: https://github.com/DanielStormApps/Fanny/commit/b352a3f5a7405981b8e7f7b5292f804050f56115

I removed the "hidden" menu bar option. This isn't something I'd like to support. If you'd like to hide your menu bar icons take a look at Bartender: https://www.macbartender.com

v2.2.0 is ready for download and contains these new features.

Thank you for the PR! ๐Ÿ‘

asvela commented 4 years ago

Thanks for including this!

I posted a little comment on considering removing the decimals (possibly also the space) from the menubar as they take up space and are not really adding reliable information.

Regarding

I removed the "hidden" menu bar option. This isn't something I'd like to support.

I just thought I'd mention this from Apple's Human interface guidelines:

Let people decide whether to enable your menu bar extra. Users, not apps, should choose when a menu bar extra is added to the menu bar. Typically, this is done by changing a setting in an appโ€™s preferences window. To ensure discoverability, however, consider giving people the option of enabling the menu bar extra during setup.

It might be someone wants to use the nice widget but not the menubar icon. Relying on third party apps for hiding it is not ideal, and many programs include this feature of removing it (Dropbox, Alfred, Clipy are just some examples that came to mind). However, it seems the app needs some restructuring to do that properly, not just the cheesy way I did it, so it might be a lot of work for a niche feature.

DanielStormApps commented 4 years ago

Unfortunately there's no way around not having a menu bar icon. Today Extension widgets require that sandbox is enabled so the widget needs needs a "main" application to retrieve all the system values. The alternative would be having an application running in your dock at all times, which isn't better IMO. Setting the menu bar to an empty string with no icon will cause confusion.