daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
717 stars 56 forks source link

No icon when app is open #12

Closed ghost closed 6 years ago

ghost commented 6 years ago

App has its icon in application list, but when started the icon which appears in the task list is the generic icon, not the neovim-gtk one (the last one):

neovim_gtk_icon

Am I doing something wrong?

daa84 commented 6 years ago

This is not implemented. Added to my todo list 😄

ghost commented 6 years ago

Great! 👍

ghost commented 6 years ago

That was quick! 👍

I encountered another problem though: I am using budgie desktop on solus and I couldn't pin the app to the panel. Looking for how to solve this issue, I found out that it is due to the WM_CLASS value, so I tried to xprop WM_CLASS a NeovimGtk window but the output is: WM_CLASS(STRING) = ".", ".". So I decided to read gnome3 doc about this WM_CLASS and I found out these "guidelines": https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased Basically, they say that .desktop and .png file should have the same name of the application id: so I renamed nvim-gtk.png and nvim-gtk.desktop to org.daa.NeovimGtk.png and org.daa.NeovimGtk.desktop, I modified the Icon line in the .desktop file from Icon=nvim-gtk to Icon=org.daa.NeovimGtk and finally I removed the line you added with ea71ec2: gtk::Window::set_default_icon_name("nvim-gtk"); from main.rs. And done! Not only I solved the problem of pinning the app to the panel, but also the icon is the right one! So I solved both the issues I was having 😄

I decided to let you know this so that you could check if what I have done is ok. Thank you very much for this application!

daa84 commented 6 years ago

Ok, think your right, the same requirement for flatpak, think it is need to rename desktop file

LER0ever commented 6 years ago

Hi, sorry to bring this issue up again, but the icon is currently not working under KDE Plasma since the last commit to main.rs. (It works under GNOME though).

daa84 commented 6 years ago

I'm not user of KDE, so can't test, can it be that problem in desktop file? or it is better to make call set_default_icon in code? Does icon displayed in launcher?

LER0ever commented 6 years ago

It appears in the KDE Application Menu, so the .desktop file is correct. I would say it's probably the removal of set_default_icon, because the problem only occur in taskbar.

jacklenox commented 5 years ago

Sorry to bring this up again, but I'm experiencing this problem on Pop!_OS (a derivative of Ubuntu 18.04). I install the app manually by cloning the repo and then using cargo install. In app switcher mode I just get the default icon.

daa84 commented 5 years ago

cargo install does not install icon, you need make PREFIX="some_prefix" install

jacklenox commented 5 years ago

:man_facepalming: Thank you, sorted. Great to have the icon!