]> git.phdru.name Git - dotfiles.git/blob - .screenrc
.screenrc: Map additional keypad keys
[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 #KP_minus
57 bindkey \033Om stuff -
58 #KP_plus
59 bindkey \033Ok stuff +
60 #KP_slash
61 bindkey \033Oo stuff /
62 #KP_asterisk
63 bindkey \033Oj stuff *
64 #KP_Enter
65 bindkey \033OM stuff \015
66
67 # ------------------------------------------------------------------------------
68 # TERMINAL SETTINGS
69 # ------------------------------------------------------------------------------
70
71 # The vt100 description does not mention "dl". *sigh*
72 termcapinfo vt100 dl=5\E[M
73
74 # turn sending of screen messages to hardstatus off
75 hardstatus off
76 # Set the hardstatus prop on gui terms to set the titlebar/icon title
77 termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
78 # use this for the hard status string
79 #hardstatus string "%h%? users: %u%?"
80
81 # An alternative hardstatus to display a bar at the bottom listing the
82 # windownames and highlighting the current windowname in blue. (This is only
83 # enabled if there is no hardstatus setting for your terminal)
84 #
85 #hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
86
87 # status line at the bottom of terminal
88 # display numbers and titles:
89 # for inactive windows - black on cyan
90 # for active window - white on blue
91 hardstatus alwayslastline
92 hardstatus string "%{= yk}%-w%{= gk}%n%f %t%{-}%+w %-="
93
94 # set these terminals up to be 'optimal' instead of vt100
95 termcapinfo xterm*|rxvt*|linux*|Eterm* OP
96
97 # Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
98 # (This fixes the "Aborted because of window size change" konsole symptoms found
99 #  in bug #134198)
100 termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
101
102 # To get screen to add lines to xterm's scrollback buffer, uncomment the
103 # following termcapinfo line which tells xterm to use the normal screen buffer
104 # (which has scrollback), not the alternate screen buffer.
105 #
106 #termcapinfo xterm*|rxvt* ti@:te@
107
108 # Use the alternate screen of the xterm-like terminal
109 # https://unix.stackexchange.com/a/261939
110 #termcapinfo xterm* 'ti=\E[?1049h:te=\E[?1049l'
111 #termcapinfo rxvt* 'ti=\E7\E[?47h:te=\E[2J\E[?47l\E8'
112
113 # Do not use the alternate screen at all
114 # run `tput smcup; screen -S test; tput rmcup`
115 termcapinfo xterm*|rxvt* 'ti=:te='
116
117 # Enable non-blocking mode to better cope with flaky ssh connections.
118 defnonblock 5