On 9/20/05, Ajitabh Pandey <[EMAIL PROTECTED]> wrote: > * Aaron Griffin <[EMAIL PROTECTED]> [2005-09-15 12:51:38 -0500]: > >One feature I was thinking about a while back would be a multiline > >hardstatus... I use the hardstatus line for *alot* of stuff... cpu > >temp, battery levels, scaling freq, weather, and all that jazz - > >basically I use it in the same way most people use > > May I request you to share how you use hardstatus line to monitor all that. > If you use any external programs, it would be good to know about them as > well.
You can do it all with the backtick command... just note that the backtick command will not work with pipes or redierction, so complicated things must be thrown in a script. For example, I use: # backticks 1, 2, 4 and 5 omitted for example backtick 3 5 5 $HOME/.screen/therminfo hardstatus alwayslastline "%{+b kb}[%m.%d.%y %0C:%s%a]%{kw} %1` | %2` | %3` | %{kc}%4`%{-} | %{ky}%5`%{-} " NOTE: the undrawable characters below (before each {} set) are C-v,C-e in vim (^E) - they are escape characters that work insides scripts the same way % works in the hardstatus line. It allows me to color temp based on the value #! /bin/bash #therminfo stat=` acpi -tBf | tr -s , \ | cut -d\ -f4 ` temp=` acpi -tBf | tr -s , \ | cut -d\ -f5 ` t=${temp%%.*} color="{k.}" if [ $t -ge 130 ]; then color="{ky}" elif [ $t -ge 140 ]; then color="{kr}" fi echo "$color$stat:$temp{-}" I have similar scripts for weather (which simply scrapes a website) and net up/down statistics, but that one's a tad more complicated _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users