-
Notifications
You must be signed in to change notification settings - Fork 1
/
screenrc
120 lines (90 loc) · 4.01 KB
/
screenrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
### Created by Brad Sims <[email protected]> 25/06/2004
### I got tired of .screenrc's on the internet being so
### poorly commented... So being a good GNUbie I took matters
### into my own hands; and wrote this dotfile.
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
## Explanation of hardstatus line ##
# Ignore the ' marks if you use these examples for yourself
# Note that if you want to use the color brown under konsole
# You actually use bright yellow (%{Y}).
# Note the embedded space after the colon, I feel
# it just looks nicer with a blank between the
# text and console edge:
# '%{=b}%{G} Screens: '
# This prints the window listing in blue:
# '%{b}%w'
# This right-aligns what follows:
# '%='
# This displays the time (hours and minutes) in 12hr format
# and adds an AM/PM flag, in bold green:
# '%{G}%C%A'
# This displays the day of the week:
# '%D'
#This displays the date in Mon/day/year format:
# and again I embedded a space to give me one space
# between the text and console edge:
# '%M/%d/%Y '
# The resultsing command give you a status line that
# looks like this:
# | Screens: 0* bash <blanks zapped> 5:30PM Fri, Jun/25/2004 |
# (The pipes indicate the edges of the xterm/console).
# Green text, time, and date; windows in blue:
#hardstatus alwayslastline "%{=b}%{G} Screen(s): %{b}%w %=%{kG}%C%A %D, %M/%d/%Y "
#added from unix.abac.com's screenrc:
hardstatus alwayslastline
#hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]'
hardstatus string '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR} (%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}][%{Y}%l%{g}] %{=b C}[ %m/%d %c ]%{W}'
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
## Some general options ##
# Turn off start message:
startup_message off
# Set messages timeout to one second:
msgwait 1
# Warns of activity
activity "Activity in %t(%n)"
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
## Keybindings ##
# bind <F7> to detach screen from this terminal
# bind <F8> to kill current session
# bind <F10> to create a new screen
# bind <F9> to rename an existing window
# bind <F11> to move to previous window
# bind <F12> to move to next window
#bindkey -k k7 detach
#bindkey -k k8 kill
# space in keyboard
bindkey -k k; screen
#bindkey -k k9 title
bindkey -k F1 prev
bindkey -k F2 next
# set left and right meta key mods
#
#ALT-,. and ALT-<>
#
bindkey "^[<" eval number !echo $WINDOW-1|bc
bindkey "^[>" eval number !echo $WINDOW+1|bc
bindkey "^[," prev
bindkey "^[." next
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #
#
#
# scrollback for default windows
#
defscrollback 50000
# From http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html
# Q: My xterm scrollbar does not work with screen.
# A: The problem is that xterm will not allow scrolling if the alternate text buffer is selected. The standard definitions of the termcap initialize capabilities ti and te switch to and from the alternate text buffer. (The scrollbar also does not work when you start e.g. ‘vi’). You can tell screen not to use these initialisations by adding the line “termcapinfo xterm ti@:te@” to your ~/.screenrc file.
# termcap xterm 'is=\E]
# terminfo xterm 'is=\E]
termcapinfo xterm ti@:te@”
# From http://systemsandsoftware.blogspot.com/2011/06/preventing-screen-from-resizing-xterm.html
# we do not want the width to change to 80 characters on startup:
# on suns, /etc/termcap has :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l:
termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l']
#default screens
#screen -t root 0 sudo -i
#screen -t work 1
#screen -t shell 2
#screen -t linode 3 remotebashrc.sh justyns 22 linode