Make the screen hardstatus line configurable.
The default hardstatus line now includes the system load along with the hostname. Minor color changes.
Change-Id: I70ebeef0981c741dd647c0e98df3f4b7e09de9cd
diff --git a/AUTHORS b/AUTHORS
index 8645615..820a677 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -17,6 +17,7 @@
Jay Pipes <jaypipes@gmail.com>
Jesse Andrews <anotherjesse@gmail.com>
Johannes Erdfelt <johannes.erdfelt@rackspace.com>
+Josh Kearney <josh@jk0.org>
Justin Shepherd <galstrom21@gmail.com>
Ken Pepple <ken.pepple@rabbityard.com>
Kiall Mac Innes <kiall@managedit.ie>
diff --git a/stack.sh b/stack.sh
index 444a738..c82c296 100755
--- a/stack.sh
+++ b/stack.sh
@@ -748,6 +748,10 @@
restart_service mysql
fi
+if [ -z "$SCREEN_HARDSTATUS" ]; then
+ SCREEN_HARDSTATUS='%{= .} %-Lw%{= .}%> %n%f %t*%{= .}%+Lw%< %-=%{g}(%{d}%H/%l%{g})'
+fi
+
# Our screenrc file builder
function screen_rc {
SCREENRC=$TOP_DIR/stack-screenrc
@@ -755,7 +759,7 @@
# Name the screen session
echo "sessionname stack" > $SCREENRC
# Set a reasonable statusbar
- echo 'hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %= %H"' >> $SCREENRC
+ echo 'hardstatus alwayslastline "$SCREEN_HARDSTATUS"' >> $SCREENRC
echo "screen -t stack bash" >> $SCREENRC
fi
# If this service doesn't already exist in the screenrc file
@@ -792,7 +796,7 @@
screen -d -m -S stack -t stack -s /bin/bash
sleep 1
# set a reasonable statusbar
-screen -r stack -X hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %= %H"
+screen -r stack -X hardstatus alwayslastline "$SCREEN_HARDSTATUS"
# Horizon
# -------