Skip to content

Instantly share code, notes, and snippets.

@Postrediori
Last active August 21, 2025 14:04
Show Gist options
  • Save Postrediori/9f1a5e1fa27df656838f33e3c4b5776f to your computer and use it in GitHub Desktop.
Save Postrediori/9f1a5e1fa27df656838f33e3c4b5776f to your computer and use it in GitHub Desktop.

Revisions

  1. Postrediori renamed this gist Jun 8, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. Postrediori revised this gist Jun 2, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Icons.md
    Original file line number Diff line number Diff line change
    @@ -29,7 +29,7 @@ Click **+ Add New...** and set the parameters:

    ![Setup screenshot](https://gist.github.com/assets/856993/aaea10a2-0cdb-4662-aa14-f417e9291f58)

    **Alternatvelly** one can use the [FirefoxDesktopFile.kwinrule](FirefoxDesktopFile.kwinrule) file provided. In the **Window Rules** dialog click **Import...** and set the actual `.desktop` file name afterwards.
    **Alternatvelly** one can use the [WaylandDesktopFile.kwinrule](WaylandDesktopFile.kwinrule) file provided. In the **Window Rules** dialog click **Import...** and set the actual `.desktop` file name afterwards.

    ## Links
    * https://old.reddit.com/r/kde/comments/15m2aak/after_switching_slack_firefox_to_use_wayland/
  3. Postrediori revised this gist Jun 2, 2024. 2 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
  4. Postrediori created this gist Jun 2, 2024.
    7 changes: 7 additions & 0 deletions FirefoxDesktopFile.kwinrule
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    [Firefox icon]
    Description=Firefox icon
    desktopfile=firefox_firefox.desktop
    desktopfilerule=3
    wmclass=firefox
    wmclasscomplete=true
    wmclassmatch=2
    37 changes: 37 additions & 0 deletions UbuntuWaylandIcons.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    # Fix Wayland icons of apps after switching to KDE & Wayland [Ubuntu 24.04]

    ## Description

    After switching to Wayland some apps have default Wayland icon:

    ![Default icons screenshot](https://gist.github.com/assets/856993/dfbcafb4-fe2f-4ffc-9e53-c8968a54f68a)

    ## Example setup for Firefox

    The solution is to setup proper `.desktop` file name for windows of these apps.

    1. Find the proper name of Firefox `.desktop` file:

    ```
    $ find ~ -iname *firefox*.desktop
    ~/.local/share/applications/firefox_firefox.desktop
    ```

    2. Setup KDE window rule.

    Open **System Settings** -> **Window Management** -> **Window Rules**.

    Click **+ Add New...** and set the parameters:
    * **Window class (application)** -> **Exact Match**, enter `firefox`
    * **Match whole window class** -> `Yes`
    * Click **+ Add Property...** -> Select **Desktop file name** and enter name of `.desktop` file, e.g. `firefox_firefox.desktop` in the example above.

    ![Setup screenshot](https://gist.github.com/assets/856993/aaea10a2-0cdb-4662-aa14-f417e9291f58)

    **Alternatvelly** one can use the [FirefoxDesktopFile.kwinrule](FirefoxDesktopFile.kwinrule) file provided. In the **Window Rules** dialog click **Import...** and set the actual `.desktop` file name afterwards.

    ## Links
    * https://old.reddit.com/r/kde/comments/15m2aak/after_switching_slack_firefox_to_use_wayland/
    * https://imgur.com/3yb0g0j