---
name: "xmousepos"
section: "1"
platform: "linux"
package: "xautomation"
version: "1.09-6"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/xmousepos"
---

# xmousepos(1)

Gets and prints the current mouse position

## NAME

xmousepos - Gets and prints the current mouse position

## SYNOPSIS

**xmousepos** *\[windowid\]*

## DESCRIPTION

**xmousepos** is a program that gets and prints the current mouse position in the window specified by *windowid* or from the current window by default. The output has the form *X Y U V* where

- *X*

  \- root x position

- *Y*

  \- root y position

- *U*

  \- mouse relative x position to the window.

- *V*

  \- mouse relative y position to the window.

## SEE ALSO

[**pat2ppm**(1)](/pat2ppm/1.md), [**patextract**(1)](/patextract/1.md), [**png2pat**(1)](/png2pat/1.md), [**rgb2pat**(1)](/rgb2pat/1.md), [**visgrep**(1)](/visgrep/1.md).

## AUTHOR

**xmousepos** was written by Steve Slaven \<bpk@hoopajoo.net\>.

This manual page was written by Kapil Hari Paranjape \<kapil@debian.org\>, for the Debian project (but may be used by others).
