From 9655c15f306782f4fdacfa28b5f593c526a1a426 Mon Sep 17 00:00:00 2001 From: hiisukun Date: Mon, 14 Sep 2015 18:10:37 +0930 Subject: [PATCH] adds application name fix for gnome panel and dock --- build/resources/linux/start.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/build/resources/linux/start.sh b/build/resources/linux/start.sh index d521869826..83ac380d95 100644 --- a/build/resources/linux/start.sh +++ b/build/resources/linux/start.sh @@ -49,4 +49,20 @@ if [[ ! -z `ldd $HERE/$EXEC | grep "libudev.so.0 => not found"` ]]; then fi # run the application -exec -a "$0" "$HERE/$EXEC" "$@" +exec -a "$0" "$HERE/$EXEC" "$@" & +pid=$! + +# fix application name in gnome panel +# consider for: GNOME / Unity / KDE / XFCE / X-Cinnamon / LXDE +# useful also for cairo-dock, gnome dash-to-dock, and plank/docky +if ( [[ "$XDG_CURRENT_DESKTOP" = "GNOME" ]] && [[ ! -z `which wmctrl` ]] ); then + sleep 1 + while [ -z $winid ] + do + sleep 1 + winid=$(wmctrl -lpx | grep $pid | cut -d' ' -f 1) + done + xprop -id ${winid} -f WM_CLASS 8s -set WM_CLASS "Livestreamer Twitch GUI" +fi + +wait $pid