From de11c946ea6891defb44b6adc4c0976d5577d291 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Wed, 28 Oct 2015 20:03:17 +0100 Subject: [PATCH] Initial commit --- 256color | 5 ++++ common | 41 +++++++++++++++++++++++++++++++++ keybindings | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ lockscreen | 3 +++ logging | 3 +++ screenrc | 8 +++++++ xterm | 38 ++++++++++++++++++++++++++++++ 7 files changed, 164 insertions(+) create mode 100644 256color create mode 100644 common create mode 100644 keybindings create mode 100644 lockscreen create mode 100644 logging create mode 100644 screenrc create mode 100644 xterm diff --git a/256color b/256color new file mode 100644 index 0000000..f0bf472 --- /dev/null +++ b/256color @@ -0,0 +1,5 @@ +# 256 Color +term screen-256color +terminfo rxvt-unicode 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' +termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' # tell screen how to set colors. AB = background, AF=foreground + diff --git a/common b/common new file mode 100644 index 0000000..7f10918 --- /dev/null +++ b/common @@ -0,0 +1,41 @@ +# +# see http://aperiodic.net/screen/ for some doc +# +startup_message off + +autodetach on + +vbell off +defscrollback 10000 +#defencoding UTF-8 + +#Fix for residual editor text +altscreen on + +shelltitle "$ |bash" + +activity "activity in %n (%t)^G" +bell_msg "/!\\ bell in %n (%t) /!\\" +sorendition "+b kr" + +hardstatus off +hardstatus string "screen running on %H (%t)" +#hardstatus alwayslastline "%{= KW}%-w%{= wk}%50>%n %t%{-}%+w%<" +#hardstatus always "%{= KW}%-w%{= wk}%50>%n %t%{-}%+w%<" + +#defhstatus "screen ^E (^Et) | $USER@^EH" + +#caption always "%?%F%{= gk}%:%{= wk}%? %n %?%F%{= wk}%? %C%A %{= wk} %t%= " +caption always "%{= kw}Screen on %H | %{= kG}%-w%{+b GK}%50>%n %t%{-}%+w%<" + +#termcapinfo xterm*|rxvt*|kterm*|Eterm* 'hs:ts=\E]0;:fs=\007:ds=\E]0;\007' +termcapinfo xterm 'hs:ts=\033]0;:fs=\007:ds=\033]0;\007' + +# The vt100 description does not mention “dl”. *sigh* +termcapinfo vt100 dl=5\E[M + + +# Window numbering starts at 1, not 0. +bind c screen 1 +bind " " screen 1 # open new tab with C-a space +bind 0 select 10 diff --git a/keybindings b/keybindings new file mode 100644 index 0000000..f374125 --- /dev/null +++ b/keybindings @@ -0,0 +1,66 @@ +# KEY BINDINGS +# =============================================================== + +#page up et page down when ^a Esc +bindkey -m “33[5~” stuff ^B +bindkey -m “33[6~” stuff ^F + +# Global +bindkey '^[1' select 1 +bindkey '^[2' select 2 +bindkey '^[3' select 3 +bindkey '^[4' select 4 +bindkey '^[5' select 5 +bindkey '^[6' select 6 +bindkey '^[7' select 7 +bindkey '^[8' select 8 +bindkey '^[9' select 9 +bindkey '^[0' select 10 + +# Experimental - must fix +#bindkey '^[&' select 1 +#bindkey '^[é' select 2 +#bindkey '^\"' select 3 +#bindkey '^\'' select 4 +#bindkey '^[(' select 5 +#bindkey '^[\\-' select 6 +#bindkey '^[è' select 7 +#bindkey '^[_' select 8 +#bindkey '^[ç' select 9 +#bindkey '^[à' select 10 + +# Xterm +bindkey "^[[1;5C" next # ctrl -> +bindkey "^[[1;5D" prev # ctrl <- +bindkey "^[[1;5P" select 1 # ctrl F1 +bindkey "^[[1;5Q" select 2 # ctrl F2 +bindkey "^[[1;5R" select 3 # ctrl F3 +bindkey "^[[1;5S" select 4 # ctrl F4 +bindkey "^[[15;5~" select 5 # ctrl F5 +bindkey "^[[17;5~" select 6 # ctrl F6 +bindkey "^[[18;5~" select 7 # ctrl F7 +bindkey "^[[19;5~" select 8 # ctrl F8 +bindkey "^[[20;5~" select 9 # ctrl F9 +bindkey "^[[21;5~" select 10 # ctrl F10 + +# Urxvt +bindkey "^[Oc" next # change window with ctrl-right +bindkey "^[Od" prev # change window with ctrl-left +bindkey "^[[11\^" select 1 # ctrl F1 +bindkey "^[[12\^" select 2 # ctrl F2 +bindkey "^[[13\^" select 3 # ctrl F3 +bindkey "^[[14\^" select 4 # ctrl F4 +bindkey "^[[15\^" select 5 # ctrl F5 +bindkey "^[[17\^" select 6 # ctrl F6 +bindkey "^[[18\^" select 7 # ctrl F7 +bindkey "^[[19\^" select 8 # ctrl F8 +bindkey "^[[20\^" select 9 # ctrl F9 +bindkey "^[[21\^" select 10 # ctrl F10 +#bindkey -k k8 hardstatus alwayslastline +#bindkey -k k9 hardstatus alwaysignore + +# Putty +#bindkey "^[[C" next # change window with ctrl-right +#bindkey "^[[D" prev # change window with ctrl-left + + diff --git a/lockscreen b/lockscreen new file mode 100644 index 0000000..8bb9bc8 --- /dev/null +++ b/lockscreen @@ -0,0 +1,3 @@ +idle 3600 lockscreen +#idle 300 eval "screen cmatrix -f -o -u 10" "idle 0" + diff --git a/logging b/logging new file mode 100644 index 0000000..cbb527f --- /dev/null +++ b/logging @@ -0,0 +1,3 @@ +# auto-log +logfile $HOME/logs/screen/%Y%m%d-%n.log +deflog on diff --git a/screenrc b/screenrc new file mode 100644 index 0000000..114e3ee --- /dev/null +++ b/screenrc @@ -0,0 +1,8 @@ +source $HOME/.screen/common +source $HOME/.screen/keybindings +source $HOME/.screen/logging +source $HOME/.screen/xterm +source $HOME/.screen/256color +source $HOME/.screen/lockscreen + +screen 1 bash diff --git a/xterm b/xterm new file mode 100644 index 0000000..4dbdd19 --- /dev/null +++ b/xterm @@ -0,0 +1,38 @@ +# XTERM TWEAKS +# =============================================================== + +# xterm understands both im/ic and doesn't have a status line. +# Note: Do not specify im and ic in the real termcap/info file as +# some programs (e.g. vi) will not work anymore. +#termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l +#terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l + +# 80/132 column switching must be enabled for ^AW to work +# change init sequence to not switch width +#termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l + +# Make the output buffer large for (fast) xterms. +# termcapinfo xterm* OL=10000 +#termcapinfo xterm* OL=100 + +# tell screen that xterm can switch to dark background and has function keys. +#termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l' +#termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' +#termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~' + +# special xterm hardstatus: use the window title. +#termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' + +#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l' +#termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' + +# Make shift-PgUp and shift-PgDn work like they do in xterm. (Note that this +# requires xterm to be configured to pass those keys through, and not try to +# act on them itself.) +#bindkey "^[[5;2~" eval "copy" "stuff ^u" +#bindkey -m "^[[5;2~" stuff ^u +#bindkey -m "^[[6;2~" stuff ^d + +# scrolling +termcapinfo xterm* ti@:te@ +termcapinfo rxvt* ti@:te@