1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | ## Start with a couple of windows
# default windows (name, index, command)
screen -t bash 9
# selects 8th window
select 9
## status bar
# backticks to display information in the statusbar
# git clone https://github.com/thewtex/screen-cpu-mem.git
# cmake . && make && sudo make install
backtick 1 0 0 /usr/local/bin/screen-mem-usage
backtick 2 0 0 /usr/local/bin/screen-cpu-usage
#hardstatus off
hardstatus alwayslastline
#hardstatus string '%{= kG}[%{G}%H%{g}][%{W}%l%{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%1`%{-} %2`%{-}][%{G}%C:%s%a | %M %d(%D), %Y%{g}]'
hardstatus string '%{= kG}[%{G}%H%{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{W}%1`%{-} %2`%{-}%{w}][%{G}%C:%s%a | %D, %d/%m/%Y%{g}]'
## Misc settings
# To clear the screen after closing some programs
altscreen on
# Do not show startup message
startup_message off
# erase background with current bg color
defbce "on"
# set TERM
term screen-256color-bce
#use scroll wheel
#termcapinfo xterm ti@:te@
# tell screen how to set colors. AB = background, AF=foreground
# termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
#caption always "%?%{ Wk}%-Lw%?%{Rk}%n*%f %t%?(%u)%?%?%{Wk}%+Lw%? %{Rk}%=%c %{rk}%d/%M/%Y"
defutf8 on
utf8 on
# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
defnonblock on
# Autodetach session on hangup instead of terminating screen completely
autodetach on
# Use a 30000-line scrollback buffer
defscrollback 30000
termcapinfo xterm ti@:te@
|
x
Notes
screen running ranger, he he ;)
See configurations here https://github.com/kra3/dot_files/tree/master/screen
It have a sub repo for a nice status bar for memory and cpu, which is piped into screen status bar