diff --git a/logout.sh b/logout.sh index db92259..7937b6d 100755 --- a/logout.sh +++ b/logout.sh @@ -9,7 +9,7 @@ # MIT License menu() { - dmenu "$@" -p "action >>>" -fn saucecodepronerdfont-9 -l 6 -nb black -nf grey50 -sb "#1f9b92" -sf black + dmenu "$@" -p "action >>>" -fn saucecodepronerdfont-9 -l 6 -nb black -nf "#c9c9c9" -sb "#1f9b92" -sf black } @@ -29,13 +29,14 @@ handler() { zzz ;; logout) - if pgrep sddm-helper; then - killall sddm-helper - elif pgrep ryudo; then - killall ryudo - else - killall fluxbox - fi +# if pgrep sddm-helper; then +# killall sddm-helper +# elif pgrep ryudo; then +# killall ryudo +# else +# killall fluxbox +# fi + killall Xorg ;; hibernate) ZZZ diff --git a/sirius.sh b/sirius.sh index b46967e..f863891 100755 --- a/sirius.sh +++ b/sirius.sh @@ -4,7 +4,37 @@ # Derek Stevens # MIT License -while true; do - mbsync -a - sleep 5m -done +inbox=~/lib/mail/zoho/INBOX + +if [ "$1" = "-s" ]; then + oldnew=$(\ls -1 ${inbox}/new | wc -l) + + msg="syncing." + mbsync -a & + + while pgrep mbsync; do + notify-send -c mail 'mail' "[${msg}]" + sleep 1 + msg=${msg}. + done + newnew=$(\ls -1 ${inbox}/new | wc -l) + + if [ ${newnew} -gt ${oldnew} ]; then + notify-send -c mail 'new mail' "[${newnew}]" + else + notify-send -c mail 'mail' "[sync complete]" + fi + +else + oldnew=0 + while true; do + mbsync -a + newnew=$(\ls -1 ${inbox}/new | wc -l) + + if [ ${newnew} -gt ${oldnew} ]; then + notify-send -c mail 'new mail' "[${newnew}]" + fi + oldnew=${newnew} + sleep 5m + done +fi diff --git a/t2stats.sh b/t2stats.sh index 133f7a2..5f18e1a 100755 --- a/t2stats.sh +++ b/t2stats.sh @@ -8,7 +8,7 @@ if [ "$1" = "-l" ]; then load=$(cat /proc/loadavg) set -- ${load} - load=$3 + load=$1 memdata=$(free -h --si | grep Mem) swapdata=$(free -h --si | grep Swap)