nwg-piotr / nwg-panel

GTK3-based panel for sway and Hyprland Wayland compositors
MIT License
575 stars 41 forks source link

[BUG] Flatpak apps does not have icons #183

Closed kuba3351 closed 1 year ago

kuba3351 commented 1 year ago

Describe the bug Flatpak apps does not have icons on the nwg-panel

To Reproduce Steps to reproduce the behavior:

  1. Install any app as flatpak
  2. Launch the app
  3. See that app does not have icon on the nwg-panel

Expected behavior Flatpak apps should have an icon

Screenshots

The app icon is not visible on nwg-panel

screen

But launcher of the flatpak app is visible in nwg-drawer with icon:

screen2

Desktop (please complete the following information):

nwg-piotr commented 1 year ago

I can't confirm. Support for Flatpak dirs has been added to nwg-panel long time ago:

https://github.com/nwg-piotr/nwg-panel/blob/7c4eecfa96be4452e9cdbaecd985d44b1a9f5717/nwg_panel/tools.py#L67

and it works on my side:

image

...at least on Arch Linux. Need to try on Fedora.

[edit] Fedora. I couldn't find IntelliJ IDEA here, so tried with Epiphany:

obraz

kuba3351 commented 1 year ago

Tried to create another user account and fresh installed nwg-shell on it.

On fresh nwg-shell install, I have an Epiphany icon, but don't have Intellij IDEA icon:

image

On my regular nwg-shell install I don't have Epiphany and Intellij IDEA icon, so I probably messed up something in my config.

If you would like to install Intellij as flatpak on Fedora, you have to install Flathub by executing this: flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Because by default Flathub is filtered and limited to Fedora's approved apps, and this command disables the filter, so you will be able to install Intellij IDEA.

nwg-piotr commented 1 year ago

One way or another, if there's a correct .desktop file in /var/lib/flatpak/exports/share/applications/, the panel will display the icon. Otherwise, I can do nothing about it.

If you want my advice: the best way to install all the JetBrains stuff is to download .tar.gz from their download page, and unpack inside your $HOME (I use ~/.local/opt/). Than just go to the /bin folder, run with the script, and select "Create desktop entry" from the menu. This way it'll be capable of auto-updating.

kuba3351 commented 1 year ago

I checked out the .desktop files of Epiphany and Intellij IDEA and found that:

[jsierzega@NBJSIERZEGA applications]$ pwd
/var/lib/flatpak/exports/share/applications
[jsierzega@NBJSIERZEGA applications]$ cat org.gnome.Epiphany.desktop  | grep Icon
Icon=org.gnome.Epiphany
[jsierzega@NBJSIERZEGA applications]$ cat com.jetbrains.IntelliJ-IDEA-Ultimate.desktop | grep Icon
Icon=com.jetbrains.IntelliJ-IDEA-Ultimate
[jsierzega@NBJSIERZEGA applications]$ 

If you want my advice: the best way to install all the JetBrains stuff is to download .tar.gz from their download page, and unpack inside your $HOME (I use ~/.local/opt/). Than just go to the /bin folder, run with the script, and select "Create desktop entry" from the menu. This way it'll be capable of auto-updating.

I know that I can do it, but I prefer to keep my apps as Flatpaks. I don't have any problem with updating, just disabled auto-update in intellij and updating Intellij IDEA when new flatpak is available :) And Flatpak can rollback updates when something is wrong with new version of the app, If installed manually it is not that easy :) And flatpak updates are full transactional, it is not possible to partially update the app which is possible with Intellij IDEA auto-updater if for example disk will be out of free space in the middle of the update.

I am also using an ostree-based variant of Fedora which have 100% transactional updates even in major versions for example Fedora 37 -> Fedora 38 and I am able to rollback upodates without make a snapshot of the file system. This is reliable, stable and predictable environment for use to work everyday :) You can read about this, and try

nwg-piotr commented 1 year ago

This is reliable, stable and predictable environment for use to work everyday

Arch does the job on my development machine: I don't install my stuff as packages at all. I only do it on my testing lappy, that currently dual-boots Arch & Fedora. It seems I'll also need Slackware soon. 😨

nwg-piotr commented 1 year ago

Icon=com.jetbrains.IntelliJ-IDEA-Ultimate

Just select the Papirus icon theme or equivalent. I suspect you use a different one.

nwg-piotr commented 1 year ago

BTW: yesterday's update to nwg-shell-config brings the "System info" tab. I''m going to ask users to attach a screenshot of it to each bug report.

kuba3351 commented 1 year ago

Just select the Papirus icon theme or equivalent. I suspect you use a different one.

Thank you, selecting this theme bring me back the Epiphany icon on my main account but not helped with Intellij IDEA icon. Ok, it is minor issue, I created this because I hope that it can be easily fixed, but if not, you can close this.

nwg-piotr commented 1 year ago

You can always check the icon availability with nwg-icon-picker.

image