MATTR(1)

NAME
mattr - get information about a monitor

SYNOPSIS
mattr [-h] [-c] [-g] [inwhxyds] wid|mid

DESCRIPTION
mattr gets information (connection status, active status, width, height, x/y offset) about a monitor. A monitor can be specified by its xrandr id (mid), by a window id (wid). The information is printed to standard output. What information is presented depends on the commands given to.

Special flags
mattr accepts special flags which change it's default behavior of printing monitor info to standard output.

-g  Print mid's dimensions in standard geometry format (WIDTHxHEIGHT+X+Y).

-c  Return 0 if mid is connected, 1 otherwise. A monitor is marked as "connected" and not "active" when the monitor is physically connected to a graphics card output, but doesn't have an active Xorg screen.

Output modifier arguments
The queried arguments are printed in the order they are requested, separated by a space. If no commands are given, mattr will return 0 if the monitor exist, and 1 otherwise.

n   Print mid.

i   Print mid (wmutils compat) (DEPRECATED).

w   Print mid’s width.

h   Print mid’s height.

x   Print mid’s offset.

y   Print mid’s offset.

s   Print the mid/wid passed as an argument. Useful only when wid is passed. Otherwise equivalent to n.

d   Print mid’s Xorg screen number

SEE ALSO

lsm(1), pfm(1)