user1261558
user1261558

Reputation: 369

Initiate automatic commands in screen (Linux)

I want to initiate those commands automatically when attaching a screen:

Ctrl+a |

Then

Ctrl+a TAB

Then

Ctrl+a :resize 15

Anyway to do this in one command line?

Upvotes: 1

Views: 143

Answers (2)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657148

Split now supports the -v option

split -v
focus
resize 15

Upvotes: 0

user2845360
user2845360

Reputation:

You can put respective commands at the end of your ~/.screenrc file and they'll get executed every time you start screen. In case you'd like this happen only occasionally, you could create a special screenrc-file, e.g. ~/.screenrc.special and then run screen with screen -c ~/.screenrc.special when you want these things to happen.

Your ~/.screenrc in this case should have as last three lines this:

split
focus
resize 15

Upvotes: 1

Related Questions