Created
December 1, 2012 17:17
-
-
Save Andrew8xx8/4183308 to your computer and use it in GitHub Desktop.
Opens terminal with specified tabs
This file contains 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
#!/bin/bash | |
USAGE="Usage: -p Project path" | |
while getopts p: options; do | |
case $options in | |
p ) PROJECT="$OPTARG";; | |
esac | |
done | |
if [ $# -eq 0 ]; then | |
echo $USAGE | |
exit | |
fi | |
PROJECT_NAME=`basename $PROJECT` | |
GLOBAL_OPTIONS="--maximize --hide-menubar --disable-factory" | |
TAB1="zsh -c 'cd $PROJECT && vim'" | |
TITLE1="VIM | [$PROJECT_NAME]" | |
TAB2="sh -c 'cd $PROJECT; git st; exec zsh'" | |
TITLE2="CONSOLE | [$PROJECT_NAME]" | |
TAB3="sh -c 'cd $PROJECT; exec zsh'" | |
TITLE3="SERVER | [$PROJECT_NAME]" | |
mate-terminal $GLOBAL_OPTIONS --tab -e "$TAB1" --title "$TITLE1" --tab -e "$TAB2" --title "$TITLE2" --tab -e "$TAB3" --title "$TITLE3" |
For gnome terminal please relapse mate-terminal
by gnome-terminal
For bash shell replace zsh
by bash
or any another shell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
Enjoy!