XM(1x) XM(1x)

xm - quickly & interactively magnify/zoom part of the screen

xm [ -d)isplay DP ] [ -n)et ] [ -f)ont FN ] [ --fontH PX ] [ -x)mag PX ] [ -y)mag PX ] [ -o)utG XGEOM ] [ -i)nG XGEOM ] [ -u)nshifted PX ] [ -s)hifted PX ] [ --gHS PX ] [ --gHO PX ] [ --gVS PX ] [ --gVO PX ] [ -b)ox ] [ -B)Width PX ] [ -b)Color INT ] [ -c)hase ] [ -t)ime MILLISEC ] [ -w)atch PATH ] [ -h ]

X display to use.
Force network transparent graphics, not X11 shm. Default: off
Set font used for on-screen help. Default: none
Set height/spacing for on-screen help font. Default: 0|fontHeight
How many x pixels in magnified output for each 1 in input area.
How many y pixels in magnified output for each 1 in input area.
XParseGeometry size & position of OUT window. Default: WM Placed
XParseGeometry size & position of initial IN area. Dimensions are multiplied by mags to set OUT geometry. Default: 256 256
Step size in pixels for unshifted arrow key motion. Default: 8
Step size in pixels for shifted arrow key motion. Default: 1
grid Horizontal line Spacing in pixels. Default: 30
grid Horizontal line Offset in pixels. Default: 30
grid Vertical line Spacing in pixels. Default: 30
grid Vertical line Offset in pixels. Default: 30
Toggle drawing bounding box around zoomed area. Default: on
Set width in pixels of the edges of the bounding box. Default: 4
Set color as a decimal version of an 0xRRGGBB color. Default: 55 NOTE: bash&zsh let you convert to decimal with, e.g. $((16#B800B8)) which produces "MAG)enta".
Toggle chasing pointer to define the zoomed area. Default: on
Time to sleep between image captures. Default: 40_000 (~25 FPS). 0 means sample & repaint as fast as possible.
Monitor st_mtime of file PATH. If it changes, print configuration & toggle pointer chasing. This is useful if focus follows pointers to chase to a specific area, and then display/freeze it by invoking a WM action that updates WATCH.
Print a brief help message for the CLI.

${XM_CONFIG:-${XDG_CONFIG_HOME:-$HOME/.config}}/xm can set pre-command-line values for all above using full length option keys in Nim parsecfg syntax (~INI-file).

xm displays in its window a magnified area of the X11 display (which can include the magnified area itself). Users can interactively change various things as described below.

Once xm is running, users can enter keyboard commands:

NEXT +, -, g applies to only this axis, not both axes
NEXT +, - applies to larger of the two step sizes for arrows
+/-
increase / decrease selected value by 1
toggle Grid on & off -- sort of. Rather than a simple toggle, the action is align = scale - align. So, if alignment is never changed from 0, it is a toggle. Axis-specific g re-zeros alignment. E.g. x g y g g resets both aligns & then turns off the grid.
Operate By Shifted/Unshifted Step Sizes. Mnemonically, Ctrl is about SIZES while Alt is about the GRID.
Pan zoomed area in direction of arrow
Resize zoom view window by direction of arrow
Change spacing of xy-grid lines to move grid corners in direction of arrow (<-: -, ->: +)
Change alignment of xy-grid lines to move grid corners in direction of arrow (<-: -, ->: +)
toggle Box on & off
toggle pointer Chase on & off
Print a current configuration replicating relaunch command
toggle Help xor-overlay (activated by any illegal key)
Quit, printing frames processed

xmag(1x) xzoom(1x) XParseGeometry(3)

xm is given with no warranty but works for me.

† This complements xmag which has a very different "snapshot" usage.

† Pointer chasing can compete with both Window Manager (WM) resize ops and xm keyboard panning controls. Just disable chase as needed.

Itai Nahshon <nahshon@best.com> originally wrote xzoom in the mid-1990s. github.com/mbarakatt added pointer tracking to a heavily patched Debian variant. In 2025, Charles Blake rewrote the ideas into Nim xm, dropping rotation & title changes & extending CLI/UI, adding/re-thinking much, such as bounding box draws, chase/box/shm as run-time states, WM interactions, near screen edge behavior, kb-based resize/grid spec/edit/step size, help text overlay, watch files, cfg print, hash-based frame-write skips for >10x speed-up, etc., etc.