Sunday, May 5, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 4265  / 1 Year ago, sat, december 17, 2022, 10:44:32

It know that it is possible to pass the --geometry=WxH arguments when using launcher, but how to set this option with the ~/.bashrc file.


More From » gnome-terminal

 Answers
0

You need to install the wmctrl package. Then, add this to your ~/.bashrc file:



HORIZONTAL=600
VERTICAL=400
wmctrl -r ":ACTIVE:" -e 0,-1,-1,${HORIZONTAL},${VERTICAL}


It will resize your active window (should be the terminal), to the size specified by the ${HORIZONTAL} and ${VERTICAL} variables. Note that these are measured in pixels. You can set your terminal's geometry to what you want, then use the screenruler package to measure the dimensions in pixels.



Hope this helps :)



EDIT: Actually you can run this to show the size of all the gnome-terminal's that are open:



wmctrl -l -x -G | grep gnome-terminal.Gnome-terminal | awk '{ print "Horizontal: "$5" pixels; Vertical: "$6" pixels" }'

[#44403] Monday, December 19, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
diffeah

Total Points: 78
Total Questions: 130
Total Answers: 98

Location: Peru
Member since Fri, Oct 14, 2022
2 Years ago
;