oskarsh / Yin-Yang

Auto Nightmode for KDE, Gnome, Budgie, VSCode, Atom and more
MIT License
638 stars 52 forks source link

no Icon shown in Task bar #303

Open Culain opened 5 months ago

Culain commented 5 months ago

What happened?

Hey,

is it possible to have an Icon for yin-yang in the Task bar? Right now there is an empty Spot between two icons and this message shows up in the console

Plugin Icons has no support for your desktop environment yet!

Any way to get this to work? I'm using the last Manjaro release with Plasma

Thanks alot!

Version

3.3

How did you install Yin & Yang?

AUR

What desktop environments are you seeing the problem on?

KDE

Which plugin causes the issue?

None

What software version do you use?

No response

Relevant log output

Plugin Icons has no support for your desktop environment yet!
l0drex commented 5 months ago

Are you on Wayland or x11?

Culain commented 5 months ago

I'm using X11

echo $XDG_SESSION_TYPE
x11
Covkie commented 5 months ago

I have this issue as well on Wayland. It shows up named as __main__.py image

major-mayer commented 4 months ago

In my case the name is correct, but the tray icon is still missing: grafik Operating System: Manjaro Linux KDE Plasma Version: 6.0.5 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.1 Kernel Version: 6.6.34-1-MANJARO (64-bit) Graphics Platform: Wayland Processors: 6 × Intel® Core™ i5-8600K CPU @ 3.60GHz Memory: 31.2 GiB of RAM Graphics Processor: AMD Radeon RX 6800 Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7B46 System Version: 1.0

2myaus commented 2 months ago

I had this issue on arch with KDE and fixed it by changing the icon file path in __main__.py

First I used ffmpeg to make a logo.png in out of resources/logo.svg, then changed icon = QSystemTrayIcon(QIcon(u':icons/logo'), app) to icon = QSystemTrayIcon(QIcon(u'resources/logo.png'), app)

Maybe a better fix could be added to the source code? I'm not familiar enough with QT to do it but it seems like the problem is with using an svg file.

the-maazu commented 1 month ago

To add to the discussion, for whatever reason icon works fine if you start the program with venv set with the dev dependencies in requirement.txt

major-mayer commented 1 month ago

I had this issue on arch with KDE and fixed it by changing the icon file path in __main__.py

First I used ffmpeg to make a logo.png in out of resources/logo.svg, then changed icon = QSystemTrayIcon(QIcon(u':icons/logo'), app) to icon = QSystemTrayIcon(QIcon(u'resources/logo.png'), app)

Maybe a better fix could be added to the source code? I'm not familiar enough with QT to do it but it seems like the problem is with using an svg file.

I can confirm that this approach works (at least on KDE Plasma). @oskarsh @l0drex Would you consider adding this change to the main repo?

the-maazu commented 1 month ago

I had this issue on arch with KDE and fixed it by changing the icon file path in __main__.py First I used ffmpeg to make a logo.png in out of resources/logo.svg, then changed icon = QSystemTrayIcon(QIcon(u':icons/logo'), app) to icon = QSystemTrayIcon(QIcon(u'resources/logo.png'), app) Maybe a better fix could be added to the source code? I'm not familiar enough with QT to do it but it seems like the problem is with using an svg file.

I can confirm that this approach works (at least on KDE Plasma). @oskarsh @l0drex Would you consider adding this change to the main repo?

@oskarsh @l0drex I am also getting an "error while loading translations" could be resource reference related too

Qianxilihulu commented 3 weeks ago

I have this issue as well on Wayland. It shows up named as __main__.py image

I'm having the same issue on KDE Plasma on Arch Linux. I installed the app from AUR. Simply add app.setApplicationName("Yin & Yang") and app.setApplicationDisplayName("Yin & Yang") solves it.

if QSystemTrayIcon.isSystemTrayAvailable():
        app.setQuitOnLastWindowClosed(False)

        // adding these two lines solves the problem
        app.setApplicationName("Yin & Yang")
        app.setApplicationDisplayName("Yin & Yang")

        icon = QSystemTrayIcon(QIcon(u'resources/icon.png'), app)
        icon.activated.connect(systray_icon_clicked)
        icon.setToolTip('Yin & Yang')

        menu = QMenu('Yin & Yang')
        menu.addAction(
            app.translate('systray', 'Open Yin Yang', 'Context menu action in the systray'),
            lambda: window.show())
....