Update home/local/bin/fuck_wine_shadow

master
yutent 2023-11-20 09:41:22 +08:00
parent a4bafb958b
commit 5f256c3c82
1 changed files with 13 additions and 1 deletions

View File

@ -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