From 59d69796126ef1ff500c3559f0bcb86ce3d0f47a Mon Sep 17 00:00:00 2001 From: Richard Grenville Date: Fri, 9 Nov 2012 00:03:22 +0800 Subject: [PATCH] Bug fix: compton-trans -s does not work My silly mistake. :-) --- bin/compton-trans | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/compton-trans b/bin/compton-trans index 523264c..55b29ed 100755 --- a/bin/compton-trans +++ b/bin/compton-trans @@ -56,7 +56,11 @@ if [ -z "$opacity" ]; then fi # Get ID of the target window -wid=$(xwininfo $wprefix"$window" | sed -n 's/^xwininfo:.*: \(0x[[:xdigit:]]*\).*$/\1/p') +if [ -z "$wprefix" ]; then + wid=$(xwininfo | sed -n 's/^xwininfo:.*: \(0x[[:xdigit:]]*\).*$/\1/p') +else + wid=$(xwininfo $wprefix"$window" | sed -n 's/^xwininfo:.*: \(0x[[:xdigit:]]*\).*$/\1/p') +fi if [ -z "$wid" ]; then echo "Failed to find window."