I have a monitoring utility that consists of 8 individual utilities, to monitor multiple aspects of a system.
All of them kind of work like htop, in that they rewrite the screen periodically instead of exiting after they are run.
In order to make my life a little bit easier I thought it might be usefull to be able to create a script that I can run on a remote server that would open all of these commands up in a terminal multiplexer in some sort of sane way in equally sized panes (it would be nice if the stacking was automatically determined based on terminal size (ie 4×2 if viewed in full screen on a widescreen monitor, but not necessary).
Basically I want to be able to run 8 different commands simulataneously in different equally sized panes in a single terminal. I tried using tmux for this using the split-window argument, but that doesn't allow me to equally size the panes, since they are recursive and so the next pane is always half the size of the previous pane
Best Answer
Finally figured it out:
heres how it works: