Terminal Guide

Report Terminal Window Size in Pixels

ESC1B[5B 1431 34 ;3b cmd t74
urxvt
xterm
🔧
vte
konsole
cmd = 0

Report terminal window size in pixels.

The terminal replies:

ESC1b [5b 434 ;3b heightpx ;3b widthpx t74 

Where heightpx and widthpx are the size of the terminal window in pixels.

If cmd = 2 then the size including window decorations and scrollbar/toolbar is reported.

urxvt ( ✓ )

🛈 the reported width includes the scrollbar but not window decorations. 🛈 The value of cmd is ignored.

vte ( ✓ )

🛈 The reported height and width are the area of the cell grid. 🛈 The value of cmd is ignored.