From 5f256c3c82fc0ea0ee300f711bdff9e252816de5 Mon Sep 17 00:00:00 2001 From: yutent Date: Mon, 20 Nov 2023 09:41:22 +0800 Subject: [PATCH] Update home/local/bin/fuck_wine_shadow --- home/local/bin/fuck_wine_shadow | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/home/local/bin/fuck_wine_shadow b/home/local/bin/fuck_wine_shadow index b5f3a6a..7a46953 100644 --- a/home/local/bin/fuck_wine_shadow +++ b/home/local/bin/fuck_wine_shadow @@ -2,14 +2,26 @@ win_id=$(wmctrl -l -G -p -x | grep wechat.exe | awk '{print $1}') -win_id="${win_id:0:-4}0014" +shadow_id=${win_id: -4} +shadow_id=$(printf "%d" "0x$shadow_id") # 转十进制 +shadow_id=$((shadow_id + 4)) +shadow_id=$(printf "%x" $shadow_id) # 转回十六进制 +shadow_id=$(printf "%04d" "$shadow_id") # 不够4位补0 +win_id="${win_id:0:-4}${shadow_id}" +#echo $shadow_id, $win_id +if [ "$(pidof fuck_wine_shadow)"]; then + killall fuck_wine_shadow +fi if [ "$win_id" != "0014" ]; then while true; do xdotool windowunmap $win_id sleep 5 done +else + sleep 5 + fuck_wine_shadow fi