A 【在命令行下关闭\打开显示器电源:】
cat offmonitor.sh
export DISPLAY=:0.0
xhost +
sleep 1&& xset dpms force off
#sleep 30 下面是打开电源
# xset dpms force on
B【在命令行下根据title刷新对应的窗口信息】
-
export DISPLAY=:0.0
-
winids=`xdotool search --name "页面载入出错"`
-
echo $winids
-
if [ -n "$winids" ];then
-
for i in $winids
-
do
-
xdotool windowfocus $i
-
xdotool key --window $i F5
-
sleep 1
-
done
-
fi
-
sleep 1
-
reid=`xdotool search " re:dash"`
-
if [ -n "$reid" ];then
-
xdotool windowfocus $reid
-
xdotool key --window $reid F5
-
fi
-
#!/bin/bash
-
export DISPLAY=:0.0
-
killall firefox
-
sleep 20
-
displayinfo=`/usr/bin/xrandr|grep Display|awk '{print $3,$4}'|awk '{if($1=="primary"){print $2}else{print $1}}'|awk -F "+" '{print $2":"$3}'`
-
echo $displayinfo
-
myurl=""
-
playnum=(3 5 4 4)
-
j=0
-
outfile="/tmp/rafana.sh"
-
echo "" >$outfile
-
for i in `echo "$displayinfo"`
-
do
-
echo "#####"
-
echo $i
-
if [ $j = 3 ];then
-
openurl=""
-
else
-
openurl="$myurl/${playnum[j]}"
-
fi
-
echo "$openurl"
-
firefox --new-window "$openurl"&
-
sleep 30
-
mywid=`xdotool getactiveWindow`
-
mxy=`echo $i|awk -F ":" '{print $1,$2}'`
-
#echo $mxy
-
echo "xdotool windowactivate $mywid" >>$outfile
-
echo "xdotool windowmove $mywid $mxy" >>$outfile
-
echo "xdotool key --clearmodifiers F11 " >>$outfile
-
a[$j]="xdotool windowactivate $mywid&&xdotool windowmove $mywid $mxy"
-
xdotool windowmove --sync $mywid $mxy
-
#sleep 1
-
xdotool key --clearmodifiers F11
-
((j++))
-
-
#sleep 1
-
done
-
#move again
-
echo "Move again"
-
for ((i=0;i<${#a[@]};i++))
-
do
-
echo "${a[$i]}"
-
${a[$i]}
-
sleep 1
-
done
-
#sendip to yzjshow@163.com
-
/bin/sh /home/yzj/sky/send2sky.sh
阅读(2665) | 评论(0) | 转发(0) |