1

Hello I am running custom terminator layout with splitted windows, each of the windows run it's specific command. When I run the terminator everything is fine the command execute as they should, but when ctrl+c is pressed in any of the window the command stops and the window is closed. I remember running in on some article something saying something about that but now it seems I can't find it. So any help welcome and suggestions.

0

You can set your command like this.

bash -c "trap $SHELL EXIT; <command>"

Anyway, you can also use Terminator Layout Builder to manage layout easily.

0
  1. In your ~/.zshrc or ~/.bashrc paste this script at the end of the file:
echo $INIT_CMD
if [ ! -z "$INIT_CMD" ]; then
    OLD_IFS=$IFS
    setopt shwordsplit
    IFS=';'
    for cmd in $INIT_CMD; do
        print -s "$cmd"  # add to history
        eval $cmd
    done
    unset INIT_CMD
    IFS=$OLD_IFS
fi
  1. In the custom command enter following: env INIT_CMD="cd bla; command_1; command_2;" zsh NOTE: Mind that if you have quotes you will have to escape them e.g. env INIT_CMD="java -argument=\"tmp/\" -jar my.jar \"serverIP=127.0.0.1\" \"serverPort=8088\"" zsh

I don't take the credit :) here is the full link: https://amir.rachum.com/blog/2015/11/28/terminator-multiple-custom-commands/

Hope it helps!

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.