Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I always start 3 terminals with a dev server in one, a python shell in the second one and a cd in the third one, ready for bash input.

I would like to have in my .bashrc a shortcut to set this up with one command: run screen, split it in 3 columns, and start a different command in each part of the screen.

How can I do that ?

EDIT: I already know I can make an alias to make screen -c and read from a specific config file, I'm just unsure of what to put in it.

share|improve this question

Are you looking for something like this?

$ cat s
screen -dm -S moo -t hello
screen  -S moo -X screen -t cruel
screen  -S moo -X screen -t world
screen  -S moo -p 0 -X stuff $'vim\r'
sleep 2
screen  -S moo -p 1 -X stuff $'watch dmesg\r'
sleep 2
screen  -S moo -p 2 -X stuff $'top\r'
share|improve this answer
    
No, it does not split the screen. It open several windows. – e-satis Oct 13 '12 at 14:53

You could use layouts in your screenrc

# ------------------------------------------------------------------------------
# STARTUP SCREENS
# ------------------------------------------------------------------------------

layout new
split -v
split -v
screen htop
focus next
screen -t python python
focus next 
chdir /srv
screen -t dir
share|improve this answer

Would Terminator be something of use to you?

From their site:

The goal of this project is to produce a useful tool for arranging terminals.
It is inspired by programs such as gnome-multi-term, quadkonsole, etc. in
that the main focus is arranging terminals in grids (tabs is the most common
default method, which Terminator also supports).
share|improve this answer
    
No. Terminator lacks of another feature that I value more than this. – e-satis Feb 12 '13 at 19:25

You must log in to answer this question.

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