]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - screenrc.in
screenrc: Display current battery charge.
[config/dotfiles.git] / screenrc.in
index ae65cfa3e380241fe03c3181a46c986422f50b9e..37d61da70fcff39640bcab3ee8a84d53a943f173 100644 (file)
@@ -37,6 +37,10 @@ attrcolor b ".I"
 # for window borders in split mode).
 sorendition = Bw
 
+# Display current battery charge if running on a laptop. Redisplay every 3
+# minutes.
+backtick 1 180 180 $HOME/.shell/bin/battery.pl -s # (BATTERY)
+
 # 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 CET) for reminding me of it and
@@ -56,11 +60,13 @@ setenv s "$s%t"      # - window name
 caption always "$s"
 unsetenv s
 # Always display the status line with open windows and the 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
+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
+setenv s "$s "   # - space          (BATTERY)
+setenv s "$s%1`" # - battery status (BATTERY)
 hardstatus alwayslastline "$s"
 unsetenv s
 
@@ -83,6 +89,20 @@ bind q  # xon
 bind ^G # visual bell
 bind D  # power detach
 
+# Bindings for fast switching to windows 10 to 19. Thanks to skizzhg in
+# #screen on Freenode (2010-10-31 21:49 CET) for the suggestion.
+bind -c window 0 select 10
+bind -c window 1 select 11
+bind -c window 2 select 12
+bind -c window 3 select 13
+bind -c window 4 select 14
+bind -c window 5 select 15
+bind -c window 6 select 16
+bind -c window 7 select 17
+bind -c window 8 select 18
+bind -c window 9 select 19
+bind ; command -c window
+
 # Run urlview on current screen content. Very useful to follow links. Make
 # sure hardcopy_append is off before using this command.
 bind ^B eval "hardcopy $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"