Score:0

Properly launch a custom layout in Terminator

kr flag

I develop VueJS app with a NodeJS server. I'd like to automatically launch a 4-window setup in my terminal with:

.-----.-----.
!  1  !  2  !
!-----!-----!
!  3  !  4  !
'-----'-----'
  1. the VueJS client console (npm run serve)
  2. the folder of the VueJS client
  3. the NodeJS server console (npm run serve also)
  4. the folder of the NodeJS server

I have almost everything working with this layout:

  [[myapp]]
    [[[root]]]
      position = -4:0
      type = Window
      order = 0
      parent = ""
      size = 1072, 1884

    [[[grand]]]
      position = 536
      type = HPaned
      order = 0
      parent = root
    [[[left]]]
      position = 942
      type = VPaned
      order = 0
      parent = grand
    [[[right]]]
      position = 942
      type = VPaned
      order = 1
      parent = grand

    [[[terminal1]]]
      profile = default
      type = Terminal
      order = 0
      parent = left
      title = CLIENT DEV
      command = cd ~/projects/node/myapp/client && npm run serve; bash
    [[[terminal2]]]
      profile = default
      type = Terminal
      order = 1
      parent = left
      title = SERVER DEV
      command = cd ~/projects/node/myapp/server && npm run serve; bash
    [[[terminal3]]]
      profile = default
      type = Terminal
      order = 0
      parent = right
      title = CLIENT cmd
      command = cd ~/projects/node/myapp/client; bash
    [[[terminal4]]]
      profile = default
      type = Terminal
      order = 1
      parent = right
      title = SERVER cmd
      command = cd ~/projects/node/myapp/server; bash

What does work?

  1. VueJS client lauches correctly and I can access the app with the browser;
  2. I am in the correct folder and I can write commands;
  3. The NodeJS app seems to work (it writes "app launched on port XXXX", where XXX is the correct port)
  4. I am in the correct folder and I can write commands;

What doesn't work?

  • 1 & 3) I can interrupt the VueJS client and the NodeJS server with a "CTRL+C" but when I do I just have a "^C" written in the window, the VueJS client and NodeJS server stops as expected but I can't write anything else, such as "npm run serve to launch the client or the server again". Only the "^C" is showing, I'd like to be able to restart both Vue client and NodeJS server;
  • 2 & 4) OK

Is there anything I am missing here? Thanks in advance for your help.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.