XTGETXRES Request Resource Values
Ask xterm for the value of one of its X resources.
DCS + Q Pt ST
- xterm
- Device-Control functions
DCS + Q Pt ST asks for the values of xterm’s X resources, its settings, by name: Pt is the names in hexadecimal, separated by ;, like XTGETTCAP’s. The answer is DCS 1 + R name=value ST, with the value in hexadecimal as well, and the pairs for several names separated by ;. A name it does not have is written back with no value, and whether the answer starts 1 or 0 depends only on the first name (XTGETXRES, vt100ResourceToString). Booleans come back as true or false, numbers in decimal, and strings as they are; a string resource that is not set has no value to give.
A program can use it to find out, for instance, whether xterm will let it manipulate the window before trying (allowWindowOps). xterm always allows it. The cases ask for resources whose values in a default xterm come from its defaults: allowWindowOps is false, saveLines is 1024, and decTerminalID is 420.
The names are X resource names, so no other terminal has the same set, and libghostty-vt does not implement it: it consumes the string and does not answer. The cases are known differences.
Validation
XTGETXRES-1: A boolean
\eP+Q616C6C6F7757696E646F774F7073\e\\ # allowWindowOps
|______|
reply \eP1+R616C6C6F7757696E646F774F7073=66616C7365\e\\
XTGETXRES-2: Two at once
\eP+Q736176654C696E6573;6465635465726D696E616C4944\e\\ # saveLines;decTerminalID
|______|
reply \eP1+R736176654C696E6573=31303234;6465635465726D696E616C4944=343230\e\\
XTGETXRES-3: A name it does not have
\eP+Q6E6F537563684E616D65\e\\ # noSuchName
|______|
reply \eP0+R6E6F537563684E616D65\e\\
XTGETXRES-4: Nothing on screen
A
\eP+Q736176654C696E6573\e\\
B
|AB____|
cursor 1,3