]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - screenrc.in
screenrc: Change hardstatus color when in copy mode.
[config/dotfiles.git] / screenrc.in
index 7b74b11f25a00c283fb50440301db61dd87f9e65..43f576d5b0965dc47dee2145d232512696b1928f 100644 (file)
@@ -1,4 +1,8 @@
 # Screen configuration file.
+#
+# Features which are only available in (very) recent screen releases or in
+# current Git are marked with "(GIT)" so they can be removed by the setup
+# script on machines with older versions.
 
 
 # Don't display startup message.
@@ -10,6 +14,9 @@ vbell on
 # Increase the scrollback buffer.
 defscrollback 10000
 
+# Ignore case when searching.
+ignorecase on
+
 
 # TERMINAL
 
@@ -27,18 +34,32 @@ attrcolor b ".I"
 # for window borders in split mode).
 sorendition = Bw
 
+# Make sure the temporary variable we use is empty. Thanks to
+# http://gist.github.com/133000 for the idea to use setenv and to TauPan in
+# #screen on Freenode (2010-03-10 16:11) for reminding me of it and searching
+# it again.
+unsetenv s
+
 # Always display the caption.
-caption always "%{= Bw}%3n %t"
-# %{= Bw} - white on light blue background, also reset all attributes
-#           (necessary so everything is displayed correctly)
-# %3n     - window number
-# %t      - window name
+setenv s "$s%{= Bw}" # - white on light blue background, also reset all
+                     #   attributes (necessary so everything is displayed
+                     #   correctly)
+setenv s "$s%?%P"    # - is copy mode enabled? (GIT)
+setenv s "$s%{= wB}" #   - if so change colors to light blue on white (GIT)
+setenv s "$s%?"      # - end if (GIT)
+setenv s "$s%3n"     # - window number
+setenv s "$s "       # - space
+setenv s "$s%t"      # - window name
+caption always "$s"
+unsetenv s
 # Always display the status line with open windows and the hostname.
-hardstatus alwayslastline "%w%=%l %H"
-# %w - number and names of windows
-# %= - right align the following text
-# %l - load average
-# %H - hostname
+setenv s "$s%w" # - number and names of windows
+setenv s "$s%=" # - right align the following text
+setenv s "$s%l" # - load average
+setenv s "$s "  # - space
+setenv s "$s%H" # - hostname
+hardstatus alwayslastline "$s"
+unsetenv s
 
 
 # BINDINGS