diff options
author | 2011-03-07 09:05:49 +0100 | |
---|---|---|
committer | 2011-03-07 09:05:49 +0100 | |
commit | ed945af1b6316fe485c3422e4a0c30bede834a8b (patch) | |
tree | 2f0ec365e6fca8cc03b1cfbea10b80518beb7216 | |
parent | 94d2fc1815a919734353c942f224db1de4b4fcb8 (diff) | |
download | dotfiles-ed945af1b6316fe485c3422e4a0c30bede834a8b.tar.gz dotfiles-ed945af1b6316fe485c3422e4a0c30bede834a8b.zip |
Getrootname
* Added a script that gets called by dwm to determine bar's text
-rwxr-xr-x | getrootname.sh | 40 | ||||
-rwxr-xr-x | install.sh | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/getrootname.sh b/getrootname.sh new file mode 100755 index 0000000..bf803ee --- /dev/null +++ b/getrootname.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +COWUPDT=`cower -u | wc -l` +if [ $COWUPDT -gt 0 ]; then + ROTNAME="aur: $COWUPDT | " +fi + +PACUPDT=`pacman -Qu | wc -l` +if [ $PACUPDT -gt 0 ]; then + ROTNAME="updates: $PACUPDT | $ROTNAME" +fi + +IACTCNT=`find ~/Mail/iactor/INBOX/new -maxdepth 1 -type f -print | wc -l` +if [ $IACTCNT -gt 0 ]; then + ROTNAME="iactor: $IACTCNT | $ROTNAME" +fi + +AETHCNT=`find ~/Mail/aethon/INBOX/new -maxdepth 1 -type f -print | wc -l` +if [ $AETHCNT -gt 0 ]; then + ROTNAME="aethon: $AETHCNT | $ROTNAME" +fi + +GMAILCT=`find ~/Mail/gmail/INBOX/new -maxdepth 1 -type f -print | wc -l` +if [ $GMAILCT -gt 0 ]; then + ROTNAME="gmail: $GMAILCT | $ROTNAME" +fi + +ARCHCNT=`find ~/Mail/arch/INBOX/new -maxdepth 1 -type f -print | wc -l` +if [ $ARCHCNT -gt 0 ]; then + ROTNAME="arch: $ARCHCNT | $ROTNAME" +fi + +FETCHING=`ps -A | grep offlineimap | wc -l` +if [ $FETCHING -gt 0 ]; then + ROTNAME="fetching mail... | $ROTNAME" +fi + +ROTNAME="$ROTNAME`date +%a\ %d\ %b\ %R\ %Z\ %Y`" + +echo $ROTNAME @@ -39,6 +39,7 @@ linkmy vim .vim linkmy Xdefaults .Xdefaults # XINITRC linkmy xinitrc .xinitrc +linkmy getrootname.sh .getrootname # XMODMAP linkmy Xmodmap .Xmodmap # ZSH |