1

I have this bash script:

#!/bin/bash

function foo() {
  terminator
  xdotool type 'myalias'
  xdotool key Return
  xdotool key ctrl+shift+t
  xdotool type 'cd ~/git/apps/myapp/client && gulp'
  xdotool key Return
}

foo

I run this script from a key shortcut.

It opens the terminal, but only executes the following commands after I close the terminal

Any idea around this?

1 Answer 1

3

The commands after terminator will not execute until terminator exits, so you will have to send it to the background:

terminator &

This will allow the script to continue with the other steps immediately after starting terminator (which may be too soon), so try:

...
terminator &
sleep 3
xdotool type 'myalias'
...
1
  • 2
    sleep 1 was enough :)
    – goldylucks
    Nov 9, 2014 at 10:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .