ransome1 / sleek

todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)
https://github.com/ransome1/sleek/wiki
MIT License
1.28k stars 99 forks source link

Support theme-based tray icon on Linux #593

Open andrei-a-papou opened 7 months ago

andrei-a-papou commented 7 months ago

Feature Request

Description: Currently, the tray icon on Linux is the same as the app icon, so it does not blend well with the overall look and feel for popular Linux desktop themes, most of which use monochrome icons. Here's a screenshot of the current situation, this uses the Papirus Dark theme:

image

To provide a better user experience, I propose picking an icon from the currently selected icon theme. If the icon is not there, fall back to the built-in app icon.

I've disabled the tray icon for now (thank you for this feature) as it looks too large and out of place in my tray, but would love to use it in the future. It's definitely not a deal breaker, but I do think the UX would benefit from an icon that matches the rest.

Implementation Details: Not sure electron supports themable notification area icons :( If it doesn't, perhaps a command line option could be implemented (e.g. --tray-icon=/path/to/icon.svg)?

andrei-a-papou commented 7 months ago

I don't know if electron supports SVG images already, but it seems there's a workaround to use them: https://github.com/electron/electron/issues/9642#issuecomment-986255696

Using SVG is important for Linux notification area as its height and/or size of icon slots can be dynamically changed by the user. An SVG image would then be resized as well, with no blurriness.