When using GNU screen, if you enter a screen session and then split it into desired layout. Is it possible to also have a full screen shell that you can switch to within the same session? Or once you start splitting does that mean you are constrained to one view and you can only alternate between visible split panes and then switch active shells within those panes?
I often split a screen session to monitor multiple logs or looped command output at the same time but I'd also like a full screen shell to work on as well without having to have a separate screen sessions that I need to detach from split/attach to full screen etc.
If the screen can't do this, can tmux, or similar do it?
GNU screen 4.2 (2014) added layout support for this:
Layouts will help organize your regions. You can create one layout of four horizontal regions and then create a separate layout of regions in a two by two array. The regions could contain the same windows, but they don’t have to. You can easily switch between layouts and keep them between detachments and reattachments.
The following is my keybindings:
bind y command -c layout
bind -c layout \' layout select
bind -c layout ? layout show
bind -c layout c layout new
bind -c layout d layout remove
bind -c layout i layout number
bind -c layout n layout next
bind -c layout p layout prev
bind -c layout 0 layout select 0
bind -c layout 1 layout select 1
bind -c layout 2 layout select 2
bind -c layout 3 layout select 3
bind -c layout 4 layout select 4
bind -c layout 5 layout select 5
bind -c layout 6 layout select 6
bind -c layout 7 layout select 7
bind -c layout 8 layout select 8
bind -c layout 9 layout select 9
And I have something like this in screenrc so it creates a few layouts on startup:
#
# +-------+
# | |
# | 0 |
# | |
# +-------+
#
layout new
screen 0
screen 1
screen 2
screen 3
select 0
#
# +---+---+
# | | 1 |
# | 0 |---+
# | | 2 |
# +-------+
#
layout new
select 0
split -v
focus right
select 1
split
focus down
select 2
focus left
#
# +---+---+
# | 0 | 2 |
# +---+---+
# | 1 | 3 |
# +---+---+
#
layout new
select 0
split -v
split
focus down
select 1
focus right
select 2
split
focus down
select 3
focus top
# Select the layout you prefer
#layout select 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With