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
This commit is contained in:
Josh Kearney 2012-04-04 17:47:56 -05:00
parent b24fca07fa
commit 0a7a41eb1e
2 changed files with 7 additions and 2 deletions

View File

@ -17,6 +17,7 @@ Jason Cannavale <jason.cannavale@rackspace.com>
Jay Pipes <jaypipes@gmail.com> Jay Pipes <jaypipes@gmail.com>
Jesse Andrews <anotherjesse@gmail.com> Jesse Andrews <anotherjesse@gmail.com>
Johannes Erdfelt <johannes.erdfelt@rackspace.com> Johannes Erdfelt <johannes.erdfelt@rackspace.com>
Josh Kearney <josh@jk0.org>
Justin Shepherd <galstrom21@gmail.com> Justin Shepherd <galstrom21@gmail.com>
Ken Pepple <ken.pepple@rabbityard.com> Ken Pepple <ken.pepple@rabbityard.com>
Kiall Mac Innes <kiall@managedit.ie> Kiall Mac Innes <kiall@managedit.ie>

View File

@ -748,6 +748,10 @@ EOF
restart_service mysql restart_service mysql
fi fi
if [ -z "$SCREEN_HARDSTATUS" ]; then
SCREEN_HARDSTATUS='%{= .} %-Lw%{= .}%> %n%f %t*%{= .}%+Lw%< %-=%{g}(%{d}%H/%l%{g})'
fi
# Our screenrc file builder # Our screenrc file builder
function screen_rc { function screen_rc {
SCREENRC=$TOP_DIR/stack-screenrc SCREENRC=$TOP_DIR/stack-screenrc
@ -755,7 +759,7 @@ function screen_rc {
# Name the screen session # Name the screen session
echo "sessionname stack" > $SCREENRC echo "sessionname stack" > $SCREENRC
# Set a reasonable statusbar # 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 echo "screen -t stack bash" >> $SCREENRC
fi fi
# If this service doesn't already exist in the screenrc file # If this service doesn't already exist in the screenrc file
@ -792,7 +796,7 @@ function screen_it {
screen -d -m -S stack -t stack -s /bin/bash screen -d -m -S stack -t stack -s /bin/bash
sleep 1 sleep 1
# set a reasonable statusbar # 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 # Horizon
# ------- # -------