Icon in panel for yad script

Sure!

  1. You launch yad with your needed args:
yad --title="Backup" --text="Backup completed successfully." --button=OK 

Notice how I removed --window-icon='dialog-information', that hint is ignored under Wayland.

  1. Either press

Alt + F3 then M, W

OR

Right Click on the yad dialog titlebar then go Special Actions > Configure Special Window Settings...

  1. Write a name/description for the rule, then for the Window title option either write the whole title or use a regular expression (in this case it’s Backup, and for the regex you could use something like ^Backup)

  2. Press on + Add property..., search for Desktop file name, select it, change the apply mode to Force (so KWin always overrides the icon regardless of what the app reports), and write the name of your .desktop file.

e.g. if the filename is nvim.desktop then write nvim. KWin searches for a matching .desktop file in the standard XDG data directories (/usr/share/applications/, ~/.local/share/applications/, etc.)

  1. If you don’t have an existing .desktop file that uses the icon you want, you can create one pointing to the icon path you want:
cat > ~/.local/share/applications/myapp-custom.desktop << 'EOF'
[Desktop Entry]
Type=Application
Name=My App
Icon=/path/to/your/icon.png
NoDisplay=true
EOF

Then in the previous step instead of putting nvim as Desktop file name you’d put myapp-custom.