Files
dotfiles/bin/MouseCenter

12 lines
317 B
Bash
Executable File

#!/bin/bash
# Get the necessary info
#Script copied from https://github.com/tatou-tatou
IFS=" " read -a window <<< $(wattr whxy $(pfw))
# Find the center of the window
center_x=$(( ${window[0]} / 2 + ${window[2]} ))
center_y=$(( ${window[1]} / 2 + ${window[3]} ))
# Move mouse
xdotool mousemove $center_x $center_y