Maybe totally useless but some people get so excited about these things... ;)
From left to right:
Put this into your ~/.prompt.zsh:
function precmd { PR_APM_RESULT=`bat | awk '{print $3}'` MAIL=`/home/toxa/scripts/mmn.sh` } setprompt () { setopt prompt_subst PR_APM='${PR_APM_RESULT[(f)1]}%' PR_MAIL='${MAIL[(f)1]}%' PROMPT=$'%{\e[1;32m%}[(%{\e[0m%}%{\e[1;33m%}%T \ %{\e[0m%}%{\e[1;32m%})(%{\e[1;31m%}${(e)PR_APM} \ %{\e[0m%}%{\e[1;32m%})(%{\e[0m%}%{\e[1;35m%} \ ${(e)PR_MAIL} %{\e[0m%}%{\e[1;32m%}):%{\e[1;36m%}%~ \ %{\e[0m%}%{\e[1;32m%} ]%{\e[0m%} ' \ } setprompt
Put this into your ~/.zshrc:
source ~/.prompt.zsh
bat stands for vaiobat from vaiobat package
/home/toxa/scripts/mmn.sh is the simple script:
#!/bin/sh BOX="$HOME/Maildir/default" COUNT=`ls -l $BOX/new | wc -l` NEW=`expr $COUNT - 1` echo $NEW
If you want to get nifty popup notification in X:
Put this somethere (for example, ~/scritps/mmncron.sh)
#!/bin/sh BOX="$HOME/Maildir/default" COUNT=`ls -l $BOX/new | wc -l` NEW=`expr $COUNT - 1` export DISPLAY=:0.0 ps|grep xmessage|grep -v grep && /usr/bin/pkill -9 xmessage [ $NEW -gt 0 ] && ps|grep xinit|grep -v grep > /dev/null 2>&1 && \ /usr/X11R6/bin/xmessage -buttons Thanks -nearmouse "You've got $NEW new mail!" &
*/2 * * * * /home/toxa/scripts/mmncron.sh > /dev/null 2>&1
I used to be the maintainer of some FreeBSD ports in a official port tree
Also there are some ports for OpenBSD by me (unofficial yet)
Wardriving is cool! I'm living in Saint-Petersburg, Russia, and my goal
is to localise here as many AP as possible, and display it on a public maps,
such as Google Maps. It's so fun and easy, with car, laptop, wireless card,
GPS navigator and wireless sniffer, such as Kismet ;)