Just finished the last few tweaks for now. This is a modified version of one I stumbled across (between pages 300 and 600, maybe) on this topic.
ip.sh:
Code:
#!/bin/bash
# From default conky config I think
wget http://checkip.dyndns.org/ -q -O - |
grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'
nvid.sh
Code:
#!/bin/bash
# Created Apr 28, 2012
# Last modified Apr 28, 2012
total=1279
used=`nvidia-smi -q | grep Used | cut -c34-37`
#echo "$used/$total"
#my_value=$(($used / $total))
result=$(echo scale=4\; $used '/' $total '* 100' | bc -l)
echo $result
ping_test.sh
Code:
#!/bin/bash
# http://linuxexpresso.wordpress.com/2009/12/20/conky-ip-monitor/
if ping -c 1 -W 2 $1 > /dev/null; then
echo "Up"
else
echo "Down"
fi
startupconky.sh:
Code:
#!/bin/bash
conk_root="/home/$USER/.Conky"
config="conky"
case "$1" in
now)
conky -c $conk_root/$config &
;;
test)
echo "Test"
echo "$log"
echo "Done"
;;
'stop' | 'kill')
killall conky
;;
login)
sleep 30 && # 0 good for Xfce - use 20 to 30 for Gnome
conky -c $conk_root/$config &
;;
*)
echo "usage: startconky [now|test|(stop|kill)|login]"
echo "\"now\" start conky instantly"
echo "\"login\" starts conky 30 seconds after it is called"
;;
esac
Bookmarks