From 56f9b3da7fc2e7ecef4e8b92e92c37e6b7473f11 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 5 May 2022 13:56:08 +0200 Subject: [PATCH] Update decor scripts to detect foreground window --- bin/+decor | 2 +- bin/-decor | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/+decor b/bin/+decor index 56df9c7..746a287 100755 --- a/bin/+decor +++ b/bin/+decor @@ -1,7 +1,7 @@ #!/bin/sh if [ -z "$1" ] -then win_id=$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}') +then win_id=$(xdotool getwindowfocus) #$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}') else win_id=$1 fi diff --git a/bin/-decor b/bin/-decor index b78465a..43377ad 100755 --- a/bin/-decor +++ b/bin/-decor @@ -1,7 +1,7 @@ #!/bin/sh if [ -z "$1" ] -then win_id=$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}') +then win_id=$(xdotool getwindowfocus) #$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}') else win_id=$1 fi