Created
October 4, 2018 13:05
-
-
Save MacRusher/f0b39a944275851a0596d0ad45f98a30 to your computer and use it in GitHub Desktop.
Execute commands in multiple terminal tabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
exec_in_new_tab() { | |
xdotool key 'ctrl+shift+t'; | |
sleep 1; | |
for cmd in "$@" | |
do | |
xdotool type --delay 1 --clearmodifiers "$cmd"; | |
xdotool key 'Return'; | |
done | |
} | |
#exec_in_new_tab "cd someDir" "yarn start"; | |
#exec_in_new_tab "npm run someCommand"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment