Created
June 4, 2024 06:09
-
-
Save u1i/9f2c023d547511b45321c18d24011941 to your computer and use it in GitHub Desktop.
Mac: get mouse position
This file contains hidden or 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
# pip3 install pyobjc | |
while true; do clear; echo "Mouse Position:"; python3 -c 'import Quartz.CoreGraphics as CG; print(CG.CGEventGetLocation(CG.CGEventCreate(None)))'; sleep 0.1; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment