]> git.phdru.name Git - dotfiles.git/blob - .screenrc
bc562122d284998c81600cd247c9ac6b3fb3413b
[dotfiles.git] / .screenrc
1 # Allow virtual alternate screen
2 altscreen on
3
4 #autodetach off
5
6 # don't display the copyright page
7 startup_message off
8 #nethack on
9
10 #defflow on # will force screen to process ^S/^Q
11
12 # make the shell in every window a login shell
13 deflogin on
14 shell -$SHELL
15
16 # define a bigger scrollback, default is 100 lines
17 defscrollback 1024
18
19 # emulate .logout message
20 pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."
21
22 # ------------------------------------------------------------------------------
23 # SCREEN KEYBINDINGS
24 # ------------------------------------------------------------------------------
25
26 # Remove some stupid / dangerous key bindings
27 bind ^k
28 #bind L
29 bind ^\
30
31 # An example of a "screen scraper" which will launch urlview on the current
32 # screen window
33 #
34 #bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"
35
36 # on backspace send ^H
37 #bindkey -d -k kb stuff "\010"
38
39 # Remap keypad
40 #KP_Home
41 bindkey \033Ow stuff \033[1~
42 #KP_Up
43 bindkey \033Ox stuff \033OA
44 #KP_PgUp
45 bindkey \033Oy stuff \033[5~
46 #KP_Left
47 bindkey \033Ot stuff \033OD
48 #KP_Right
49 bindkey \033Ov stuff \033OC
50 #KP_End
51 bindkey \033Oq stuff \033[4~
52 #KP_Down
53 bindkey \033Or stuff \033OB
54 #KP_PgDn
55 bindkey \033Os stuff \033[6~
56
57 # ------------------------------------------------------------------------------
58 # TERMINAL SETTINGS
59 # ------------------------------------------------------------------------------
60
61 # The vt100 description does not mention "dl". *sigh*
62 termcapinfo vt100 dl=5\E[M
63
64 # turn sending of screen messages to hardstatus off
65 hardstatus off
66 # Set the hardstatus prop on gui terms to set the titlebar/icon title
67 termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
68 # use this for the hard status string
69 #hardstatus string "%h%? users: %u%?"
70
71 # An alternative hardstatus to display a bar at the bottom listing the
72 # windownames and highlighting the current windowname in blue. (This is only
73 # enabled if there is no hardstatus setting for your terminal)
74 #
75 #hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
76
77 # status line at the bottom of terminal
78 # display numbers and titles:
79 # for inactive windows - black on cyan
80 # for active window - white on blue
81 hardstatus alwayslastline
82 hardstatus string "%{= yk}%-w%{= gk}%n%f %t%{-}%+w %-="
83
84 # set these terminals up to be 'optimal' instead of vt100
85 termcapinfo xterm*|rxvt*|linux*|Eterm* OP
86
87 # Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
88 # (This fixes the "Aborted because of window size change" konsole symptoms found
89 #  in bug #134198)
90 termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
91
92 # To get screen to add lines to xterm's scrollback buffer, uncomment the
93 # following termcapinfo line which tells xterm to use the normal screen buffer
94 # (which has scrollback), not the alternate screen buffer.
95 #
96 #termcapinfo xterm*|rxvt* ti@:te@
97
98 # Use the alternate screen of the xterm-like terminal
99 # https://unix.stackexchange.com/a/261939
100 #termcapinfo xterm* 'ti=\E[?1049h:te=\E[?1049l'
101 #termcapinfo rxvt* 'ti=\E7\E[?47h:te=\E[2J\E[?47l\E8'
102
103 # Do not use the alternate screen at all
104 # run `tput smcup; screen -S test; tput rmcup`
105 termcapinfo xterm*|rxvt* 'ti=:te='
106
107 # Enable non-blocking mode to better cope with flaky ssh connections.
108 defnonblock 5