feat: Make the configuration relocatable by using relative paths
This commit is contained in:
		
							
								
								
									
										5
									
								
								conf.d/256color
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								conf.d/256color
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										41
									
								
								conf.d/common
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								conf.d/common
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
							
								
								
									
										66
									
								
								conf.d/keybindings
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								conf.d/keybindings
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								conf.d/lockscreen
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								conf.d/lockscreen
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
idle 3600 lockscreen
 | 
			
		||||
#idle 300 eval "screen cmatrix -f -o -u 10" "idle 0"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								conf.d/logging
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								conf.d/logging
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
# auto-log
 | 
			
		||||
logfile $HOME/logs/screen/%Y%m%d-%n.log
 | 
			
		||||
deflog on
 | 
			
		||||
							
								
								
									
										38
									
								
								conf.d/xterm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								conf.d/xterm
									
									
									
									
									
										Normal file
									
								
							@@ -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@
 | 
			
		||||
		Reference in New Issue
	
	Block a user