Answer the question
In order to leave comments, you need to log in
How to resize a window?
There is a console program written in C. OS - debian.
It is necessary that at startup the terminal unfolds to full screen.
ws.ws_col = cols;
ws.ws_row = rows;
ioctl(1, tiocswinsc, &ws);
Answer the question
In order to leave comments, you need to log in
wmctrl -r 'header line' -b toggle,maximized_vert,maximized_horz
Try looking in the wmctrl sources to see how it's implemented :)
In order for the graphical terminal window to expand to full screen, you need to interact with the window manager. You can use xdotool.
As you can see in the mana , the ioctl you're using doesn't have a single standard, which essentially means that on your system "it may or may not work, or it may work but not the way you expect". To change the size of the terminal, you can use escape sequences, but for different terminals they may differ, for XTerm examples are here . But by default they are ignored, in order for xterm to recognize them, you need to change the value of allowWindowOps:
echo "XTerm*allowWindowOps: true" > .Xresources
xrdb -merge .Xresources
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question