]> git.phdru.name Git - dotfiles.git/blobdiff - .screenrc
.screenrc: Change hardstatus colors
[dotfiles.git] / .screenrc
index bd1e01ca30d0bc47067409f08f59128725a95087..070b58656efcf0e369c1d434916639c66e2b6b2e 100644 (file)
--- a/.screenrc
+++ b/.screenrc
 # Allow virtual alternate screen
 altscreen on
 
-# detach on hangup
-autodetach on
+#autodetach off
 
-# status line at the bottom of terminal
-# display numbers and titles:
-# for inactive windows - black on cyan
-# for active window - white on blue
-hardstatus alwayslastline
-hardstatus string "%{= ck}%-w%{= bw}%n %t%{-}%+w %-="
+# don't display the copyright page
+startup_message off
+#nethack on
+
+#defflow on # will force screen to process ^S/^Q
 
-# set every new windows hardstatus line to somenthing descriptive
-# defhstatus "screen: ^E (^Et)"
+# make the shell in every window a login shell
+deflogin on
+shell -$SHELL
 
-# Increase scroll buffer
-defscrollback 1000
+# define a bigger scrollback, default is 100 lines
+defscrollback 1024
 
 # emulate .logout message
 pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."
 
-# make the shell in every window a login shell
-deflogin on
-shell -$SHELL
+# ------------------------------------------------------------------------------
+# SCREEN KEYBINDINGS
+# ------------------------------------------------------------------------------
 
-# don't display the copyright page
-startup_message off
+# Remove some stupid / dangerous key bindings
+bind ^k
+#bind L
+bind ^\
 
-################
-#
-# xterm tweaks
+# An example of a "screen scraper" which will launch urlview on the current
+# screen window
 #
+#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"
 
-################
-#
-# other terminals
-#
+# on backspace send ^H
+#bindkey -d -k kb stuff "\010"
+
+# Remap keypad
+#Home
+bindkey \033Ow stuff \033[1~
+#Up
+bindkey \033Ox stuff \033OA
+#PgUp
+bindkey \033Oy stuff \033[5~
+#Left
+bindkey \033Ot stuff \033OD
+#Right
+bindkey \033Ov stuff \033OC
+#End
+bindkey \033Oq stuff \033[4~
+#Down
+bindkey \033Or stuff \033OB
+#PgDn
+bindkey \033Os stuff \033[6~
+
+# ------------------------------------------------------------------------------
+# TERMINAL SETTINGS
+# ------------------------------------------------------------------------------
+
+# The vt100 description does not mention "dl". *sigh*
+termcapinfo vt100 dl=5\E[M
 
-################
+# turn sending of screen messages to hardstatus off
+hardstatus off
+# Set the hardstatus prop on gui terms to set the titlebar/icon title
+termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
+# use this for the hard status string
+#hardstatus string "%h%? users: %u%?"
+
+# An alternative hardstatus to display a bar at the bottom listing the
+# windownames and highlighting the current windowname in blue. (This is only
+# enabled if there is no hardstatus setting for your terminal)
 #
-# keybindings
+#hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
+
+# status line at the bottom of terminal
+# display numbers and titles:
+# for inactive windows - black on cyan
+# for active window - white on blue
+hardstatus alwayslastline
+hardstatus string "%{= yk}%-w%{= gk}%n%f %t%{-}%+w %-="
+
+# set these terminals up to be 'optimal' instead of vt100
+termcapinfo xterm*|rxvt*|linux*|Eterm* OP
+
+# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
+# (This fixes the "Aborted because of window size change" konsole symptoms found
+#  in bug #134198)
+termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
+
+# To get screen to add lines to xterm's scrollback buffer, uncomment the
+# following termcapinfo line which tells xterm to use the normal screen buffer
+# (which has scrollback), not the alternate screen buffer.
 #
+#termcapinfo xterm*|rxvt* ti@:te@
 
-# remove some stupid / dangerous key bindings
-bind h
-bind ^h
-bind k
-bind ^k
-bind z
-bind ^z
-bind .
-bind \\
-bind ^\
+# Use the alternate screen of the xterm-like terminal
+# https://unix.stackexchange.com/a/261939
+#termcapinfo xterm* 'ti=\E[?1049h:te=\E[?1049l'
+#termcapinfo rxvt* 'ti=\E7\E[?47h:te=\E[2J\E[?47l\E8'
 
-# on backspace send ^H
-#bindkey -d -k kb stuff "\010"
+# Do not use the alternate screen at all
+# run `tput smcup; screen -S test; tput rmcup`
+termcapinfo xterm*|rxvt* 'ti=:te='
+
+# Enable non-blocking mode to better cope with flaky ssh connections.
+defnonblock 5