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