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