From 4a25d79feef0dd6e462abfb48173da7e470127a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 15 Apr 2024 23:34:35 +0200 Subject: Replace i3blocks with swaybar --- config/waybar/email.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 config/waybar/email.sh (limited to 'config/waybar/email.sh') diff --git a/config/waybar/email.sh b/config/waybar/email.sh new file mode 100755 index 0000000..437566f --- /dev/null +++ b/config/waybar/email.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +filter=("tag:unread" "and" "not" "tag:killed") + +if allsync enabled 2>/dev/null; then + sync="󰑤" +else + sync="" +fi + +part=() +for mail in email gmail elektroline fel; do + counts="$(notmuch count -- "${filter[@]}" and "tag:$mail")" + [ "$counts" = "0" ] || \ + part+=("$mail:$counts") +done + +echo "$sync" "${part[@]}" +echo +echo "#email" -- cgit v1.2.3