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