summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-08-17 11:20:48 +0200
committerJoe <bousset.rudy@gmail.com>2022-08-17 11:20:48 +0200
commit01fb0f0361e3a9085f977eeb328590a1bdf2b7e8 (patch)
treee27cca9d7deac3d04a86a1ce5b50eaf2d8af947d /.local/bin
parentupdate (diff)
downloaddotfiles-bsd-01fb0f0361e3a9085f977eeb328590a1bdf2b7e8.tar.gz
dotfiles-bsd-01fb0f0361e3a9085f977eeb328590a1bdf2b7e8.tar.bz2
dotfiles-bsd-01fb0f0361e3a9085f977eeb328590a1bdf2b7e8.tar.xz
dotfiles-bsd-01fb0f0361e3a9085f977eeb328590a1bdf2b7e8.tar.zst
dotfiles-bsd-01fb0f0361e3a9085f977eeb328590a1bdf2b7e8.zip
update
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/status/sb-mailbox21
-rwxr-xr-x.local/bin/status/sb-memory2
2 files changed, 18 insertions, 5 deletions
diff --git a/.local/bin/status/sb-mailbox b/.local/bin/status/sb-mailbox
index ed41b03..21a9ab0 100755
--- a/.local/bin/status/sb-mailbox
+++ b/.local/bin/status/sb-mailbox
@@ -13,8 +13,21 @@ case $BLOCK_BUTTON in
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
-unread="$(ls "${MAIL:-/var/mail/jozan}"/bousset.rudy@gmail.com/INBOX/new/ | wc -l 2>/dev/null)"
+icon=""
-pidof mbsync >/dev/null 2>&1 && icon=""
-[ "$icon" = "" ] && icon=""
-[ "$unread" -eq 0 ] || echo "$icon " $unread
+mb_a="$(ls "${MAIL:-/var/mail/jozan}"/bousset.rudy@gmail.com/INBOX/new/ | wc -l 2>/dev/null)"
+if [ "$mb_a" -gt 0 ]; then
+ echo -n " $icon A:" $mb_a
+fi
+
+mb_b="$(ls "${MAIL:-/var/mail/jozan}"/olsen.oyvind.nor@gmail.com/INBOX/new/ | wc -l 2>/dev/null)"
+if [ "$mb_b" -gt 0 ]; then
+ echo -n " $icon B:" $mb_b
+fi
+
+mb_c="$(ls "${MAIL:-/var/mail/jozan}"/rbousset@secuserve.com/INBOX/new/ | wc -l 2>/dev/null)"
+if [ "$mb_c" -gt 0 ]; then
+ echo -n " $icon C:" $mb_c
+fi
+
+pidof mbsync >/dev/null 2>&1 && echo " "
diff --git a/.local/bin/status/sb-memory b/.local/bin/status/sb-memory
index 0a9221c..2ab06bd 100755
--- a/.local/bin/status/sb-memory
+++ b/.local/bin/status/sb-memory
@@ -1,3 +1,3 @@
#!/bin/sh
-freecolor -o | sed -n '2p' | awk '{printf ("﬙ %2.2fGB/%2.2fGB\n", ($3 / (1024 ^ 2)), ($2 / (1024 ^ 2)))}'
+freecolor -o | sed -n '2p' | awk '{printf ("﬙ %2.2fG/%2.2fG\n", ($3 / (1024 ^ 2)), ($2 / (1024 ^ 2)))}'