wmi

git clone git://oldgit.suckless.org/wmi/
Log | Files | Refs | LICENSE

statustext-gavin.sh (697B)


      1 #!/bin/sh
      2 
      3 # Gavin McCullagh proposed following change to the original
      4 # statustext.sh (only works under GNU/Linux):
      5 
      6 ##########################
      7 # time format
      8 TFORMAT="%d.%m.%Y, %H:%M"
      9 # give wmi time to start.
     10 sleep 2
     11 
     12 while pgrep wmi &>/dev/null
     13 do
     14      MSG=`date "+${TFORMAT}"`
     15      APM=`cat /proc/apm| awk '{ print $7 }'`
     16 
     17      wmiremote -t "[$APM]  [$MSG]"
     18      # launched every 10 seconds, wait until wmi is up.
     19      sleep 10
     20 done
     21 
     22 # Additionally just uncomment and add following lines to
     23 # your .xinitrc or .xsession file:
     24 
     25 ##############################################
     26 # if ! pgrep statustext.sh;  then
     27 #     exec ~/bin/statustext.sh &
     28 # fi
     29 ##############################################