]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - shell/screenrc.in
Merge branch 'os'
[config/dotfiles.git] / shell / screenrc.in
1 # GNU screen configuration file.
2 #
3 # Features which are only available in (very) recent screen releases or in
4 # current Git are marked with "(GIT)" so they can be removed by the setup
5 # script on machines with older versions.
6 #
7 # (BATTERY) is only used on laptops, (ROOT) only if running as root.
8
9 # Copyright (C) 2011-2013  Simon Ruderich
10 #
11 # This file is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
15 #
16 # This file is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this file.  If not, see <http://www.gnu.org/licenses/>.
23
24
25 # Automatically lock the screen after 10 minutes of inactivity if running as
26 # root.
27 #idle 600 lockscreen # handled by setup script
28
29 # Don't display startup message.
30 startup_message off
31
32 # Use visual bell instead of audible bell.
33 vbell on
34
35 # Increase the scrollback buffer.
36 defscrollback 50000
37
38 # Ignore case when searching.
39 ignorecase on
40
41 # I prefer zsh as my shell. GNU screen displays a warning if the shell isn't
42 # available.
43 shell zsh
44
45 # Don't "login" windows (= add them to the utmp database) by default. Not
46 # useful for me and the "$" flag clutters the window flags (displayed with
47 # %Lw).
48 deflogin off
49
50
51 # TERMINAL
52
53 # Enable 256 color mode.
54 term screen-256color
55 # Allow bold colors in XTerm (not necessary for Rxvt), not sure why this is
56 # necessary. Otherwise normal and bold colors are switched. Thanks to
57 # http://www.frexx.de/xterm-256-notes/.
58 attrcolor b ".I"
59
60
61 # CAPTION AND HARDSTATUS
62
63 # Use white on light blue background for highlighting and text messages (and
64 # for window borders in split mode).
65 sorendition = Bw
66
67 # Display current battery charge if running on a laptop. Redisplay every 3
68 # minutes.
69 backtick 1 180 180 $HOME/.shell/bin/battery.pl -s BATTERY # (BATTERY)
70 # Display current temperature if running on a laptop. Redisplay every minute.
71 backtick 2 60 60 $HOME/.shell/bin/temperature.pl -s TEMPERATURE # (TEMPERATURE)
72
73 # Make sure the temporary variable we use is empty. Thanks to
74 # http://gist.github.com/133000 for the idea to use setenv and to TauPan in
75 # #screen on Freenode (2010-03-10 16:11 CET) for reminding me of it and
76 # searching it again.
77 unsetenv s
78
79 # Always display the caption.
80 setenv s "$s%{= Bw}" # - white on light blue background, also reset all
81                      #   attributes (necessary so everything is displayed
82                      #   correctly)
83 setenv s "$s%?%P"    # - is copy mode enabled? (GIT)
84 setenv s "$s%{= wB}" #   - if so change colors to light blue on white (GIT)
85 setenv s "$s%?"      # - end if (GIT)
86 setenv s "$s%3n"     # - window number
87 setenv s "$s "       # - space
88 setenv s "$s%t"      # - window name
89 caption always "$s"
90 unsetenv s
91 # Always display the status line with open windows and the hostname.
92 setenv s "$s%Lw" # - number and names of windows, L displays window flags
93 setenv s "$s%="  # - right align the following text
94 setenv s "$s%l"  # - load average
95 setenv s "$s "   # - space
96 setenv s "$s%H"  # - hostname
97 setenv s "$s "   # - space          (TEMPERATURE)
98 setenv s "$s%2`" # - temperature    (TEMPERATURE)
99 setenv s "$s "   # - space          (BATTERY)
100 setenv s "$s%1`" # - battery status (BATTERY)
101 hardstatus alwayslastline "$s"
102 unsetenv s
103
104
105 # BINDINGS
106
107 # Remove some bindings I don't use to prevent using them accidentally. You
108 # probably don't want to copy this.
109 bind K  # kill
110 bind k  # kill
111 bind ^K # kill
112 bind \\ # quit
113 bind ^\ # quit
114 bind ^Z # suspend
115 bind z  # suspend
116 bind ^S # xoff
117 bind s  # xoff
118 bind ^Q # xon
119 bind q  # xon
120 bind ^G # visual bell
121 bind D  # power detach
122
123 # Bindings for fast switching to windows 10 to 19. Thanks to skizzhg in
124 # #screen on Freenode (2010-10-31 21:49 CET) for the suggestion.
125 bind ; command -c window
126 bind -c window 0 select 10
127 bind -c window 1 select 11
128 bind -c window 2 select 12
129 bind -c window 3 select 13
130 bind -c window 4 select 14
131 bind -c window 5 select 15
132 bind -c window 6 select 16
133 bind -c window 7 select 17
134 bind -c window 8 select 18
135 bind -c window 9 select 19
136 # And bindings for windows 20 to 29 with e.g. ;;1. Thanks to Kays in #irssi on
137 # Freenode (2012-10-18 16:25 CEST) for the suggestion to use ;;.
138 bind -c window ; command -c window2
139 bind -c window2 0 select 20
140 bind -c window2 1 select 21
141 bind -c window2 2 select 22
142 bind -c window2 3 select 23
143 bind -c window2 4 select 24
144 bind -c window2 5 select 25
145 bind -c window2 6 select 26
146 bind -c window2 7 select 27
147 bind -c window2 8 select 28
148 bind -c window2 9 select 29
149
150 # Run urlview on current screen content. Very useful to follow links. Make
151 # sure hardcopy_append is off before using this command.
152 bind ^B eval "hardcopy $HOME/.tmp/screen-urlview" "screen urlview $HOME/.tmp/screen-urlview"
153
154
155 # DIGRAPHS
156
157 digraph (, 「
158 digraph ), 」