X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=screenrc.in;h=b04605aa1c3cdb3746b59968eca23e550d3bd7c0;hb=3085f6d8af8bd80ae2a7bd8f1e03450855caa78a;hp=02212fb20ef3472d9b38b27b13bd5ac3daa562c7;hpb=dfdcca5d5a039efd86e00f8c116b5ca7027dd4d0;p=config%2Fdotfiles.git diff --git a/screenrc.in b/screenrc.in index 02212fb..b04605a 100644 --- a/screenrc.in +++ b/screenrc.in @@ -3,8 +3,29 @@ # 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. +# +# (BATTERY) is only used on laptops, (ROOT) only if running as root. + +# Copyright (C) 2011-2012 Simon Ruderich +# +# This file is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . +# Automatically lock the screen after 10 minutes of inactivity if running as +# root. +idle 600 lockscreen # (ROOT) + # Don't display startup message. startup_message off @@ -17,7 +38,8 @@ defscrollback 10000 # Ignore case when searching. ignorecase on -# I prefer zsh as my shell. +# I prefer zsh as my shell. GNU screen displays a warning if the shell isn't +# available. shell zsh @@ -37,6 +59,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 @@ -61,6 +87,8 @@ 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 @@ -85,6 +113,7 @@ 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 ; command -c window bind -c window 0 select 10 bind -c window 1 select 11 bind -c window 2 select 12 @@ -95,8 +124,19 @@ 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 +# And to windows 20-29. +bind -c window ; command -c window2 +bind -c window2 0 select 20 +bind -c window2 1 select 21 +bind -c window2 2 select 22 +bind -c window2 3 select 23 +bind -c window2 4 select 24 +bind -c window2 5 select 25 +bind -c window2 6 select 26 +bind -c window2 7 select 27 +bind -c window2 8 select 28 +bind -c window2 9 select 29 # 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" +bind ^B eval "hardcopy $HOME/.tmp/screen-urlview" "screen urlview $HOME/.tmp/screen-urlview"