]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - screenrc.in
screenrc: Display current battery charge.
[config/dotfiles.git] / screenrc.in
1 # 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
8 # Don't display startup message.
9 startup_message off
10
11 # Use visual bell instead of audible bell.
12 vbell on
13
14 # Increase the scrollback buffer.
15 defscrollback 10000
16
17 # Ignore case when searching.
18 ignorecase on
19
20 # I prefer zsh as my shell.
21 shell zsh
22
23
24 # TERMINAL
25
26 # Enable 256 color mode.
27 term screen-256color
28 # Allow bold colors in XTerm (not necessary for Rxvt), not sure why this is
29 # necessary. Otherwise normal and bold colors are switched. Thanks to
30 # http://www.frexx.de/xterm-256-notes/.
31 attrcolor b ".I"
32
33
34 # CAPTION AND HARDSTATUS
35
36 # Use white on light blue background for highlighting and text messages (and
37 # for window borders in split mode).
38 sorendition = Bw
39
40 # Display current battery charge if running on a laptop. Redisplay every 3
41 # minutes.
42 backtick 1 180 180 $HOME/.shell/bin/battery.pl -s # (BATTERY)
43
44 # Make sure the temporary variable we use is empty. Thanks to
45 # http://gist.github.com/133000 for the idea to use setenv and to TauPan in
46 # #screen on Freenode (2010-03-10 16:11 CET) for reminding me of it and
47 # searching it again.
48 unsetenv s
49
50 # Always display the caption.
51 setenv s "$s%{= Bw}" # - white on light blue background, also reset all
52                      #   attributes (necessary so everything is displayed
53                      #   correctly)
54 setenv s "$s%?%P"    # - is copy mode enabled? (GIT)
55 setenv s "$s%{= wB}" #   - if so change colors to light blue on white (GIT)
56 setenv s "$s%?"      # - end if (GIT)
57 setenv s "$s%3n"     # - window number
58 setenv s "$s "       # - space
59 setenv s "$s%t"      # - window name
60 caption always "$s"
61 unsetenv s
62 # Always display the status line with open windows and the hostname.
63 setenv s "$s%w"  # - number and names of windows
64 setenv s "$s%="  # - right align the following text
65 setenv s "$s%l"  # - load average
66 setenv s "$s "   # - space
67 setenv s "$s%H"  # - hostname
68 setenv s "$s "   # - space          (BATTERY)
69 setenv s "$s%1`" # - battery status (BATTERY)
70 hardstatus alwayslastline "$s"
71 unsetenv s
72
73
74 # BINDINGS
75
76 # Remove some bindings I don't use to prevent using them accidentally. You
77 # probably don't want to copy this.
78 bind K  # kill
79 bind k  # kill
80 bind ^K # kill
81 bind \\ # quit
82 bind ^\ # quit
83 bind ^Z # suspend
84 bind z  # suspend
85 bind ^S # xoff
86 bind s  # xoff
87 bind ^Q # xon
88 bind q  # xon
89 bind ^G # visual bell
90 bind D  # power detach
91
92 # Bindings for fast switching to windows 10 to 19. Thanks to skizzhg in
93 # #screen on Freenode (2010-10-31 21:49 CET) for the suggestion.
94 bind -c window 0 select 10
95 bind -c window 1 select 11
96 bind -c window 2 select 12
97 bind -c window 3 select 13
98 bind -c window 4 select 14
99 bind -c window 5 select 15
100 bind -c window 6 select 16
101 bind -c window 7 select 17
102 bind -c window 8 select 18
103 bind -c window 9 select 19
104 bind ; command -c window
105
106 # Run urlview on current screen content. Very useful to follow links. Make
107 # sure hardcopy_append is off before using this command.
108 bind ^B eval "hardcopy $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"