# xdotool windowactivate xdotool search --desktop 0 --name "firefox"` key ctrl+q #找出firefox視窗,按按鍵ctrl+q
# xdotool get_desktop_viewport #工作區查詢
xdotool get_desktop
#xdotool search --onlyvisible --name "sTV Live" windowmove 1920 1080 windowsize 400 400 # 找到視窗名sTV Live後移至座標1920 1080位置,視窗縮小為400 400
#常用
xdotool mousemove x y click 1 1左鍵 2滾輪 3右鍵 4向上滾 5向下滾
xdotool key Return 確認鍵
xdotool keydown/keyup super 按下Win鍵不放
xdotool key Super_L 左Win
watch -n 5 xdotool key Return 搭配watch,5循環秒一次Enter
xdotool getwindowname 39845889 在以上指令列出的ID中獲取容器名稱
xdotool getactivewindow 獲取當前窗口
xdotool windowminimize 最小化窗口
xdotool windowminimize $(xdotool getactivewindow) 最小化當前窗口
xdotool key ctrl+q BackSpace 點擊ctrl+q,再BackSpace鍵
xdotool search --name abc key ctrl+c 在窗口abc上點擊ctrl+c
xdotool mousemove_relative 10 10 鼠標相對移動
xdotool mousemove_relative --sync 10 10 異步鼠標相對移動
xdotool click -repeat 1 3 鼠標右鍵點擊1次
xdotool mousedown/mouseup 滑鼠按放
xdotool getmouselocation 獲取鼠標位置
xdotool getmouselocation --shell 獲取鼠標位置(獲取數據)
eval $(xdotool getmouselocation --shell);echo $X,$Y獲得X Y位置
xdotool getactivewindow windowmove 50 80 移動當前窗口位置