I am using the screen
split in 3 with vim on the left, and two other screens split horizontally on the right. I know that when detaching from a screen, I can save the layout with :layout save my_layout_name
.
I already have layout autosave on
in my .screenrc
file, but that doesn't help with my issue.
How can I persist a screen's layout between different terminal sessions, and after pc restart? Or maybe as a workaround, is there a way to run screen (parameters) which split it, set up the bash on every window and save the layout?
Best Answer
Default layout for new screen's
Manage your regions, then execute code inside screen:
To save your current layout to file
.screen_layout
:To make it auto-loading with layout saving:
How it works
screen
.$HOME/.screenrc
:source .screen_layout
- read and execute commands from$HOME/.screen_layout
Regions now created.
layout save def
- save current regions as layout to keep it when you detach.layout dump .screen_layout
$HOME
directoryscreen -X command
command
in current screen session (if executed inside).Similar to ctrla then :
command
You may also
Disable copyright notice at startup:
Increase scroll buffer(def. 100)
Write own
.screen_layout
(50% / 50% vertical, with 2 shells):