How to resize all windows evenly?

Asked by Patrick

I'd like to be able to resize a number of terminals in a terminator tab or window so that every single one has the same size. For example, if I have one very wide terminator window and I split this once, then the left and the right terminal have the same size. When I split one of these again, the layout becomes a little weird. I'd like to be able to do ctrl+shift+magic and then all three would be the same size.

If this feature already exists I apologize for wasting your time, but I didn't find it after reading the man pages and googling.

If this feature does not exist, it shouldn't be too hard to add. Calculate the total size, see how many windows there are, divide, and redistribute. Or at least that's what I thought.

Question information

Language:
English Edit question
Status:
Solved
For:
Terminator Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen Boddy
Solved:
Last query:
Last reply:
Revision history for this message
Stephen Boddy (stephen-j-boddy) said :
#1

Hi Patrick,

The feature does exist. You double click a splitter to redistribute that splitter. Use Shift modifier to redistribute all children as well. Use Super (Windows key) modifier to redistribute all parents. Use Shift+Super to redistribute everything. There is a wishlist item for keyboard shortcuts, but for now it's only a mouse action. Obviously you need to have non-zero size for the splitters.

Yes, it sounds like it should be easy. I assure you it wasn't because of braindead gtk way of doing splitters. I wrote the code, and frankly I doubt I could understand it now.

If this answers your question please remember to mark it as solved.

Revision history for this message
Patrick (94bc1052) said :
#2

Hi Stephen

Thank you for answering. Double-clicking on the splitter does nothing for me. Was this feature added in a recent version? I have 0.95-1 from the Debian 7 repositories.

Revision history for this message
Best Stephen Boddy (stephen-j-boddy) said :
#3

Woah! That's old! Yeah, the splitter clicking is only available from 0.97. You have the option of checking out and locally using the 0.97 (or trunk.) Building a deb pkg is pretty easy too, so you don't have to refer to the local checkout.

One of the issues with Debian is that they are so far behind, as they have pick up the release and then have really long stabilisation periods before releasing.
2010-08-24 Terminator 0.95 released
2011-02-06 Debian 6 released
2011-09-23 Terminator 0.96 released
2013-04-30 Terminator 0.97 released
2013-05-04 Debian 7 released

So 7 probably picked Terminator from the repository a couple of years ago.

The next version (testing) has 0.97, but if it's anything like the stabilisation period for 7, you'll be waiting a couple of years! I think there might be something in Debian about pinning a testing package into a stable release though. Perhaps you could try that?
http://serverfault.com/questions/22414/how-can-i-run-debian-stable-but-install-some-packages-from-testing

Revision history for this message
Patrick (94bc1052) said :
#4

Thanks Stephen Boddy, that solved my question.

Revision history for this message
Anaximander Thales (chris-cuberootent) said :
#5

Sorry to revive an old thread -- since the question has already been asked, I'll ask in here, if I see no response, I'll open a new thread.

I had been looking for a way to evenly resize the panes as well. While it's great that I can double click the splitter, is there a way to make that occur on startup of terminator? I have to power off the computer when I am away (corporate policy, longer than 15 minute idle time invokes a power down -- not sleep, an actual power down), which could mean potentially having to resize four and five times a day due to meetings. Having this just be resized on start would be awesome.

I have played around with setting the proper sizes in the config file, but those sizes are not honored at start up, they revert to the 50:50 split.

I saw that you'd prefer wishlist items added to the bug report so you can move them yourself. Is this already available to have proper sizes on start up? Are you already working on it or should I add that to the bug report?

Revision history for this message
Alex Copeland (o-alex-e) said :
#6

I am using terminator 0.97 and have had the same issue with evenly resizing panels at startup. Dividing the panes by double clicking the splitter works fine, but every time I opened my sessions, on half would be 80 characters wide, and the other half would be 79. Double clicking the splitter makes them both 80.

I came up with a workaround using the following additional packages: wmctrl, sleepenh and xdotool

I made the following script to open my terminator sessions.

Hopefully this is helpful to someone.

#/bin/bash
# terminatoropen

i=0

# open terminator with whatever options
terminator -l local4 &

# use wmctrl to watch for the terminator window
until wmctrl -l | tail -1 |

# put whatever your terminator widow title is when it initially opens in <title string>
grep "<title string>" >/dev/null 2>&1 || [ $i -gt 1000 ]; do

# count 1000 so this process does not run away if the window isn't found
  i=$((++i))
done

# wait for .5 seconds before doing anything
# timing may vary; this worked for me
# you can just put sleep 1 here if a second is OK
sleepenh 0.5 > /dev/null 2>&1

# move the mouse to the coordinates of the divider bar, double click, then move it back
# replace x y with the coordinates of your setup
xdotool mousemove x y click --repeat 2 1 mousemove restore

exit 0