Skip to content

Commit 0a7a41e

Browse files
committed
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
1 parent b24fca0 commit 0a7a41e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Jason Cannavale <[email protected]>
1717
Jay Pipes <[email protected]>
1818
Jesse Andrews <[email protected]>
1919
Johannes Erdfelt <[email protected]>
20+
Josh Kearney <[email protected]>
2021
Justin Shepherd <[email protected]>
2122
Ken Pepple <[email protected]>
2223
Kiall Mac Innes <[email protected]>

stack.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,14 +748,18 @@ EOF
748748
restart_service mysql
749749
fi
750750

751+
if [ -z "$SCREEN_HARDSTATUS" ]; then
752+
SCREEN_HARDSTATUS='%{= .} %-Lw%{= .}%> %n%f %t*%{= .}%+Lw%< %-=%{g}(%{d}%H/%l%{g})'
753+
fi
754+
751755
# Our screenrc file builder
752756
function screen_rc {
753757
SCREENRC=$TOP_DIR/stack-screenrc
754758
if [[ ! -e $SCREENRC ]]; then
755759
# Name the screen session
756760
echo "sessionname stack" > $SCREENRC
757761
# Set a reasonable statusbar
758-
echo 'hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %= %H"' >> $SCREENRC
762+
echo 'hardstatus alwayslastline "$SCREEN_HARDSTATUS"' >> $SCREENRC
759763
echo "screen -t stack bash" >> $SCREENRC
760764
fi
761765
# If this service doesn't already exist in the screenrc file
@@ -792,7 +796,7 @@ function screen_it {
792796
screen -d -m -S stack -t stack -s /bin/bash
793797
sleep 1
794798
# set a reasonable statusbar
795-
screen -r stack -X hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %= %H"
799+
screen -r stack -X hardstatus alwayslastline "$SCREEN_HARDSTATUS"
796800

797801
# Horizon
798802
# -------

0 commit comments

Comments
 (0)