swiftbar / SwiftBar

Powerful macOS menu bar customization tool
https://swiftbar.app
MIT License
2.93k stars 92 forks source link

[Request] Replace error icon #315

Closed xilopaint closed 2 years ago

xilopaint commented 2 years ago

I usually get distracted during my work when the yellow warning sign (⚠️) appears on my menu bar. It's obtrusive and not consistent with the b&w standard of macOS native menu bar icons.

It wouldn't be such a big problem if one gets errors just for plugins in development, but that's not the case. If a plug-in relies on internet connection, errors will happen whenever there is a lack of connectivity. Because of this I get myself catching exceptions just for avoiding the yellow icon. For example:

try:
    conn = http.client.HTTPSConnection(host)
    conn.request(method, url, headers=headers)
    res = conn.getresponse()
except (gaierror, http.client.RemoteDisconnected, ConnectionResetError) as err:
    logging.error(err, exc_info=True)
    print("No Connectivity")
    time.sleep(900)
    sys.exit()

I think the icon should be less obtrusive and aimed to warn the user only when they are looking at the menu bar plugin and not when they are doing something else. So I suggest replacing the yellow warning icon with some b&w version from SF Symbols, which are much more SwiftBar friendly:

I see two options. This is a warning symbol:

Screen Shot 2022-05-06 at 09 56 50

And this is a truly error symbol:

Screen Shot 2022-05-06 at 10 13 57

Personally, I find the second one more appropriate as we're talking about errors and not just warnings, but both are good for me.

xilopaint commented 2 years ago

@melonamin what's your opinion here?

melonamin commented 2 years ago

Implemented as requested.

But overall if I were you I would explicitly handle "no internet" condition and would output a custom icon\message.

xilopaint commented 2 years ago

Hey @melonamin, what's the source of the icon? It seems to me slightly small:

Screen Shot 2022-10-23 at 12 09 12