aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-12-12 22:04:07 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2019-12-12 22:04:07 +0100
commit83d10ca7570f9032d563420d5f4dc7bd2a93125a (patch)
tree1084fdf944500c8497dfdc9c7c380827af38fc52
parent63112ef77d4b847ce96cb247ec0b53d799e61b74 (diff)
downloadscripts-83d10ca7570f9032d563420d5f4dc7bd2a93125a.tar.gz
scripts-83d10ca7570f9032d563420d5f4dc7bd2a93125a.zip
Moved label to script and added shortened output.
-rwxr-xr-xi3blocks/i3mailbox.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/i3blocks/i3mailbox.sh b/i3blocks/i3mailbox.sh
index 213eb6a..b78528c 100755
--- a/i3blocks/i3mailbox.sh
+++ b/i3blocks/i3mailbox.sh
@@ -16,21 +16,27 @@ case $BLOCK_BUTTON in
- Middle click syncs mail" ;;
esac
+label=📫
gmailInbox="$CONFIG_FOLDER_GMAIL_INBOX"
unioviInbox="$CONFIG_FOLDER_UNIOVI_INBOX"
-output=""
+output="$label"
+shortOutput="$label"
syncIcon=""
[ -n "$(pgrep mbsync)" ] && syncIcon="🔃"
output="$output$syncIcon"
+shortOutput="$shortOutput$syncIcon"
if [ -n "$gmailInbox" ]; then
gmailN="$(ls "$gmailInbox"/* 2>/dev/null | wc -l)"
output="$output Gmail: $gmailN "
+ shortOutput="$shortOutput G: $gmailN "
fi
if [ -n "$unioviInbox" ]; then
unioviN="$(ls "$unioviInbox"/* 2>/dev/null | wc -l)"
output="$output Uniovi: $unioviN "
+ shortOutput="$shortOutput U: $unioviN "
fi
#echo "$(cat /tmp/imapsyncicon) Gmail: $gmailN uniovi: $unioviN"
echo "${output% }"
+echo "${shortOutput% }"