28 lines
576 B
Bash
28 lines
576 B
Bash
#!/bin/bash
|
|
|
|
win_id=$(wmctrl -l -G -p -x | grep wechat.exe | awk '{print $1}')
|
|
|
|
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
|
|
|
|
|