Eloy Perez

Just random things

Fixing generic Wayland icons on task bar/alt tab

Posted at — Nov 27, 2024

Some applications on Linux using Wayland display a generic icon instead of their real one. This can be frustrating when switching between applications using the taskbar or Alt-Tab.

For me, these applications were Obsidian and Sublime Merge.

Alt Tab

The fix (when using KDE) consists of adding a new KWin rule. To do this, follow these steps:

1. Access Window Rules

Go to “System Settings > Window Management > Window Rules”.

2. Create a New Rule (If None Exist)

If the application does not have any rules already, create a new one:

If you’re unsure of the value for the window class, click “Detect Window Properties”, then click on the application window. A pop-up with the detected properties will be shown, and you can select the correct value.

3. Add Property

Click on “Add Property” and select “Desktop File Name”.

4. Find the Correct Desktop File Name

KWin Window Rules

5. Apply Settings

Apply the new settings and close the application if it was open. The next time you open the application, it should show the correct icon.

Alt Tab Fixed