5

I have found this answer providing how to manipulate the current xterm window's dimensions, ie:

echo -ne "\e[8;30;30t"

How can I modify this to maximize the window (xterm's alt + enter shortcut)?

Also, where do I find more info on these xterm command line modifiers?

UPDATE:

See multiple solutions below for both maximize and full screen (without title and borders)

ljs.dev
  • 2,127
  • 4
  • 19
  • 31
  • Take a look at xdotool, I'd use that method to do so. What you need should be in here: http://unix.stackexchange.com/a/6001/7453 – slm Nov 02 '13 at 00:14

2 Answers2

6

The commands are

echo -ne '\e[9;1t'

to maximize and

echo -ne '\e[9;0t'

to restore the original size. It's described in the xterm control sequences documentation.

Uwe
  • 3,257
  • 17
  • 19
  • Thanks Uwe. I needed to use 10 for maximizing. I don't need to restore the size after. Actually, what yours does is spread the xterm window over all 3 of my windows, not just the monitor it is on. – ljs.dev Nov 02 '13 at 00:29
  • Semantics, I had asked for "Maximize" which your answer I think is correct for. What I was looking for (kind of mentioned in question) was the shortcut for full screen, which is the `10` code. I'll award you the answer as it was first with the best information and leave mine for reference. – ljs.dev Nov 02 '13 at 00:33
6

The supplied answer from Uwe did not work for me, but this did:

echo -ne "\e[10;2;t"

From this page.

ljs.dev
  • 2,127
  • 4
  • 19
  • 31