From 4ec19d0e9a84b5155885e47908d7974d191f9492 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 14 Mar 2010 00:50:36 +0100 Subject: [PATCH] screenrc: Change hardstatus color when in copy mode. As this only works in recent Git versions drop this setting on older versions. --- screenrc.in | 7 +++++++ setup.sh | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/screenrc.in b/screenrc.in index 942893b..43f576d 100644 --- a/screenrc.in +++ b/screenrc.in @@ -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. @@ -40,6 +44,9 @@ unsetenv s 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 diff --git a/setup.sh b/setup.sh index 94301ce..857a1ce 100755 --- a/setup.sh +++ b/setup.sh @@ -17,6 +17,12 @@ if [ `hostname` != asp -a `hostname` != systemofadown ]; then s/screen-256color/screen/' screenrc > screenrc.tmp mv screenrc.tmp screenrc fi +# I use some features of screen which are only in Git. Drop them on machines +# which have older versions. They are marked as "(GIT)". +if [ `hostname` != asp ]; then + grep -v '(GIT)' screenrc > screenrc.tmp + mv screenrc.tmp screenrc +fi # Link setup for shells. link shell ~/.shell -- 2.45.2