Change the icon displayed by Task Switcher?

Hi all,

I'm still learning my way around KDE. I modified the .desktop file for an application because it wasn't using the BeautyLine icon that comes with Garuda Dragonized. It now shows up correctly in the task bar which is part of Latte-Dock if I understand correctly. However, the original icon for the application (Joplin) still shows up in the Task Switcher, which is a separate application, again, if I understand correctly.

How do I get Task Switcher to use the icon I specified in the .desktop file?

Thank you:-)

You can try creating the. desktop file with the icon you want to use on your desktop. Then try dragging the newly created laucher to your dock/bar from your desktop. If that works then delete the old launcher afterwards.

2 Likes

Thank you for getting back to me on this. I tired what you said and pressing alt-tab to bring up the task switcher still brings up the original icon, not the BeautyLine icon.

Could the task switcher be getting the application from the binary of the program?

Are you sure the BeautyLine icon theme has the proper name for Joplin?
Joplin includes their icon that is installed in hicolor icons.
Proper name (as in .dektop file) is @joplinapp-desktop.
If it is not found in DE selected icons theme, the standard icon will be used.
Check and post the settings and explain exactly how you changed the user account icon. What file have you edited/created with what Icon= value.

3 Likes

Hi, and thank you for looking into this.
Using the icon browser application I saw three icons available for Joplin:

Name:  joplin
Sizes: 32x32 96x96 128x128 24x24 512x512 16x16 48x48 256x256 scalable 72x72 
Filename: /home/john/.local/share/icons/BeautyLine/apps/scalable/joplin.svg

Name: Joplin
Sizes: scalable
Filename: /home/john/.local/share/icons/BeautyLine/apps/scalable/Joplin.svg

Name:  joplin-desktop
Sizes: scalable
Filename: /home/john/.local/share/icons/BeautyLine/apps/scalable/joplin-desktop.svg

Note that the first and third start wit a lower case j, and the second one starts with a capital J.

Then I modified the joplin.desktop file found in /usr/share/applications. Here is the original file:

[Desktop Entry]
Name=Joplin
Comment=Joplin - a note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS.
Exec=/usr/bin/joplin-desktop
Icon=/usr/share/joplin-desktop/resources/build/icons/128x128.png
Terminal=false
Type=Application
Categories=Application;Office;

All I did was modify the “Icon=” line to point to one of the icons listed above, from running the icon browser. I think I tried all 3 icons. I will repeat that to be sure.

I installed Joplin from the chaotic-AUR. I also tried to install it from the AUR but there were build issues. I tried to sort those out with what I could find but neither solution worked for me.

I wasn’t sure exactly what your reply meant, but I did find an executable called @joplin-desktop:

/usr/share/joplin-desktop/@joplin-desktop

I modified the “Exec=” line of joplin.desktop to point at this and it didn’t make a difference.

I also uninstalled and reinstalled Joplin as some other threads suggested when having icon issues.

You said:

Blockquote
If it is not found in DE selected icons theme, the standard icon will be used.

I’m not sure how do check this, but if you tell me, I will.

Thanks again. Any help is appreciated.

You are doing it wrong, as you may have suspected :wink:
The Icon= value is not supposed to be a file name. Check every .desktop file and you will confirm that.
It is the icon file name without the extension.

What you have to do:
Undo your changes so far. (I hope you kept some notes :laughing: )
Rename BeautyLine icon file names to @joplinapp-desktop.* (replace asterisk with existing extension, i.e. svg)
If you have copied a joplin.desktop file in $HOME/.local/share/applications (or it exists there), either delete it, or make sure the Icon value is @joplinapp-desktop.
Do this also in autostart folder, if you have added Joplin to Autostart apps using System Settings (and edited the file). A simple way is to remove and re-add with System Settings.

Also post a bug report to BeautyLine icon theme dev for this name change of Joplin (it is introduced from upstream Joplin).

4 Likes

Thank you petsam. I have done what you suggested and still have the issue with the icon ONLY in the task switcher (alt-tab). So out of the four places the icon shows up, it is correct in three of them. It is correct in the menu (super key), it is correct as it bounces up and down near the mouse pointer while it launches, and it is correct in the dock at the bottom of my screen. When I go to change application focus by using alt-tab, I get what looks like the standard icon.

Here is my .desktop file:
/usr/share/applications/joplin.desktop

[Desktop Entry]
Name=Joplin
Comment=Joplin - a note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS.
Exec=/usr/bin/joplin-desktop
Icon=@joplinapp-desktop
Terminal=false
Type=Application
Categories=Application;Office;

Here is list of all the Joplin icons I could find:
/usr/share/icons/BeautyLine/apps/scalable

╭─john@littlesilver in repo: BeautyLine/apps/scalable🔒 on  master [!+?] took 2s
 ╰─λ ls | grep -i joplin
.rw-r--r-- 2.0k root 14 Apr 18:06  @joplinapp-desktop.svg   <-- I copied each of the below icon files here, they all worked. 
.rw-r--r-- 2.0k root 30 Mar 05:22  appimagekit-joplin.svg
.rw-r--r-- 2.0k root 14 Apr 17:39  joplin-desktop.svg       <-- I accidentally overwrote this one.
.rw-r--r-- 2.0k root 30 Mar 05:22  Joplin.svg
.rw-r--r-- 2.0k root 30 Mar 05:22  joplin.svg
.rw-r--r-- 2.0k root 30 Mar 05:22  net.cozic.joplin_desktop.svg
.rw-r--r-- 2.0k root 30 Mar 05:22  org.joplinapp.joplin.svg

I did a lot of searching but could find no documentation on how "Task Switcher" gets it's icon. I'm sure I just don't know where this is documented other than in the source code. I also, just as a test, put the timeshift icon in the joplin.desktop file and as expected, it showed up instead of the joplin icon, except in task switcher, which still showed the default joplin icon.

I also reinstalled both Joplin and the BeautyLine icon set from the chaotic AUR.

Any more help would be appreciated.

The usual advice is … reboot :stuck_out_tongue_winking_eye: , but I think you only need to clear your cache folder.

rm -r $HOME/.cache/*

and re-login.

3 Likes

Hi, tried both clearing cache and restarting my computer. Still not displaying the correct icon in the task switcher. Maybe it's time to grab another laptop and do a fresh install.

Just curious, does Joplin display the proper icons for anyone else?

Where can I learn how the task switcher application gets icons to display?

Thanks again.

Because of Joplin icon on task switcher with BeautyLine icon theme? You must be kidding… :man_facepalming:

1st thing that comes into my mind is to look into plasma-workspace and kwin source code. I am sure it will be there!

3 Likes

It’s not because of the icon, it’s a desire to understand how things work. If I didn’t care how things worked, I’d just keep using my Mac :grin:

Thanks for pointing me in the right direction. Your posts got most of my icon issues resolved to the point, as you rightly insinuated, where it’s more than good enough.

1 Like

I mark-it-solved ! :slight_smile:

If you think another post from petsam is better, use that one.

5 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.