-
-
Save michaelskyba/b480633a07f4e9ed440085bb762b8e9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script to easily find xy values for moving the mouse | |
# This is a helper script for the "automate" script | |
# Usage: xy <list of titles> | |
# E.g. you are on youtube and want to move the mouse to a video thumbnail | |
# (maybe clicking it), then to the youtube logo | |
# You would do: | |
# xy "video thumbnail" "youtube logo" | |
# These titles are a thing so that it's much easier to keep track of which positions are which | |
# if you only need one coordinate, you can do "xy e" or something | |
# Move your mouse to the corresponding position (the video thumbnail in the | |
# previous example), and then press Enter in the terminal | |
# (obviously don't move your mouse to get to the terminal, or you will change the position) | |
for title in "$@" | |
do | |
read | |
eval $(xdotool getmouselocation --shell) | |
echo "-- $title --" | |
echo "move $X $Y" | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment