# Allow virtual alternate screen altscreen on #autodetach off # don't display the copyright page startup_message off #nethack on #defflow on # will force screen to process ^S/^Q # make the shell in every window a login shell deflogin on shell -$SHELL # define a bigger scrollback, default is 100 lines defscrollback 1024 # emulate .logout message pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." # ------------------------------------------------------------------------------ # SCREEN KEYBINDINGS # ------------------------------------------------------------------------------ # Remove some stupid / dangerous key bindings bind ^k #bind L bind ^\ # 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" # on backspace send ^H #bindkey -d -k kb stuff "\010" # ------------------------------------------------------------------------------ # 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) # #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 "%{= ck}%-w%{= bw}%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@ # 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' # 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