0

Terminator allows custom layouts with a command such as bash -lc 'npm start'; bash

However, triggering SIGKILL (CONTROL-C) will kill part of the terminal and mess up your layout. SIGQUIT works but that's hard to remember. Is there a way to have a layout with a bash command that drops into a bash interactive terminal after SIGKILL, instead of having to use SIGQUIT?

Ray Foss
  • 952
  • 1
  • 11
  • 23

1 Answers1

0

I ended up going with a .bashrc hack. If configure terminator to open one terminal in say, ~/git/proj1 and another in ~/git/proj2, I can check the pwd and run commands that way. For node projects this may be enough

if [ -f "$(pwd)/package.json" ]; then
  git pull
  npm start
fi

Or more generally

if [ "$(pwd)" == "/" ]; then
  echo "you are root!"
fi
Ray Foss
  • 952
  • 1
  • 11
  • 23