From 83d10ca7570f9032d563420d5f4dc7bd2a93125a Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Thu, 12 Dec 2019 22:04:07 +0100 Subject: Moved label to script and added shortened output. --- i3blocks/i3mailbox.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'i3blocks') 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% }" -- cgit v1.2.1