Yes, you could use xseticon xseticon
It's an application that can set any window icon.
I's a little old and needs a couple small patches in the source code and Makefile but it works .
Install build depends: sudo apt install libx11-dev libxmu-dev libgd2-xpm-dev
Also make sure you have installed build-essential and pkg-config
download the tar.gz file and extract it.
Open the text editor and patch the xseticon.c and Makefile
Patch to make it comipile in ubuntu mate 17.10:
xseticon.c line 312:
printf("Have selected window 0x%08x\n", window);
change it to
printf("Have selected window 0x%08lx\n", window);
xseticon.c at line 32 add next:
#include <string.h>
Patch the Makefile:
Line 21
gcc ${LIBS} $^ -o $@
Replace it with:
gcc $^ -o $@ ${LIBS}
Then open terminal and change directory to the folder you extracted
cd ~/Downloads/xseticon-0.1+bzr13
run make
make
Don't run "sudo make install" just copy the binary to the home dir /home/meme/bin
and use it to set the icon.
You'll need a wrapper script for each application.
This is an example for zathura:
[code]#!/bin/bash
zathura $@ & APP_PID=$!
until xdotool getwindowname $(xdotool search --pid "$APP_PID" | tail -1) &>/dev/null; do # sleep until the window opens
sleep 0.1
done
One second extra
sleep 1
get window name
WINDOW_NAME="$(xprop -id $(xdotool search --pid "$APP_PID" | tail -1) _NET_WM_NAME | awk -F'"' '{print $2}')"
~/Downloads/xseticon-0.1+bzr13/xseticon -name "$WINDOW_NAME" /path/to/icon.png
wait $APP_PID
echo $?[/code]