Kod: Markera allt
hardstatus alwayslastline "%-w%>%{= GW}%n %t%{-}%+w%< %=%{rd}%H %c:%s "
Kod: Markera allt
hardstatus alwayslastline "%-w%>%{= GW}%n %t%{-}%+w%< %=%{rd}%H %c:%s "
Kod: Markera allt
1 torrent [2 irc] 3 stats 4 sysmain 5 misc 6 misc2
[17:11:11] Sat 03/01 2009 | intIP: 192.168.0.2 | extIP: 81.224.122.48 | Up: 5:12 | Host: compton2 | Load average: 0.06 0.02 0.00
Kod: Markera allt
# show time, IP, uptime etc. in the hardstatus, always
hardstatus on
hardstatus alwayslastline
backtick 1 5 60 /home/erikw/bin/screen/hardstatus.sh
hardstatus string "[%c:%s] %D %d/%m %Y | %1` | Host: %H% | Load average: %l"
Kod: Markera allt
#!/bin/bash
# Prints customized single-line system stats in the screens hardstatusbar
#INTIP=`ifconfig eth0 | grep Mask | cut -d: -f2 | cut -d " " -f1`
INTIP=`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
EXTIP=`cat /tmp/extip.txt`
#UPTIME=`perl -pe 's/^(\d+).*/sprintf("%d", ($1\/(24*3600)))." days"/e' /proc/uptime`
UPTIME=`uptime | cut -d ' ' -f 5 | sed -e 's/^\(.*\).$/\1/'`
echo -n "intIP: $INTIP | extIP: $EXTIP | Up: $UPTIME"
Kod: Markera allt
wget -O - http://whatismyip.org/ 2>/dev/null > /tmp/extip.txt
Kod: Markera allt
backtick 1 1 1 uptime
hardstatus alwayslastline '%{= M} %H%{= B} %l %= %{= w}%-w%{+b r}%n*%t%{-b r}%{w}%+w %= %{c}%d %D %{B}%c '