That’s having any $COLUMNS and $LINES (tput cols and tput lines) you want as long as they can fit in the physical size.
1 Virtual Console
In Virtual Vonsole (VC) or Virtual Terminal (VT) or TTY, you can simply does:
$ stty cols 80 rows 24 $ echo $COLUMNS $LINES 80 24
It also have effects on terminal emulator in X Window, but it may not really result in that geometry entirely as you hope to see, even you does get 80 24.
2 Terminal Emulator in X Window
To resize the window size of a terminal emulator in X Window as in pixels, there are many tools to choose from, such as wmctrl or xdotool. You need one can use window sizing hints as described in xdotool(1) under windowsize command:
- --usehints
- Use window sizing hints (when available) to set width and height. This is useful on terminals for setting the size based on row/column of text rather than pixels.
Example: To set a terminal to be 80x24 characters, you would use:
$ xdotool windowsize --usehints some_windowid 80 24
After invoking the example command, you can see the terminal size (geometry) is 80 by 24 and the window size in pixel changes accordingly.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.