1

I am new with terminator. I am trying to figure out how to setup a config file that will open one window with multiple tabs.

So far all the config files I have found do not seem to do anything with tabs.

Does anyone have a simple example of a config file that opens up multiple tabs in a window?

1
0

This answer is not using the config, but a script I wrote based on another script I wrote for my job that opens multiple Cluster SSH windows all at once. One thing I have noticed and that is if you click on the close X in the upper right corner of Terminator it leaves the instance open for some reason and the --new-tab doesn't quite work properly. So, you might want to run sudo pkill terminator before running the script. But, if you do type in exit into each tab while closing it, it does close properly.

Every once in a while a terminator hangs on and won't close properly so it opens a single window with errors about key_bindings, but if I run it again it works fine.

The script: You can name it whatever you want. For now, mine is term_test.bsh.

#!/bin/bash

#Kill any previous Terminators.
killall -9 terminator >/dev/null 2>&1

if [[ $1 == "" ]]; then
    echo -n "Please enter number of Terminator tabs you want to open: "
    read num1
else
    num1=$1
fi

if [[ ! ${num1} || ${num1} = *[^0-9]* ]]; then
    echo "${num1} is invalid input.  Please only use numbers."
    exit 1
fi

$(terminator >/dev/null 2>&1 &) && for i in $(seq $((num1-1))); do terminator --new-tab; done
disown -a

Example:

term_test.bsh 4

enter image description here

Hope this helps!

3
  • when I ran your script it opened 3 separate windows, not tabs as indicated in your screenshot Jan 4 at 14:23
  • @BarryKimelman See if the updated script works.
    – Terrance
    Jan 4 at 14:57
  • the updated script seems to be working fine. thanks. Jan 4 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.