aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/waybar/executable_tb-unread.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/waybar/executable_tb-unread.sh')
-rw-r--r--dot_config/waybar/executable_tb-unread.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/dot_config/waybar/executable_tb-unread.sh b/dot_config/waybar/executable_tb-unread.sh
index ebf2fd4..3c3e1c7 100644
--- a/dot_config/waybar/executable_tb-unread.sh
+++ b/dot_config/waybar/executable_tb-unread.sh
@@ -18,12 +18,12 @@ emit() { printf '%s\n' "$1"; exit 0; }
# Cheap reachability probe — avoids a 30s python TLS timeout when the bridge
# is down (e.g. before it has finished unlocking on a fresh login).
ncat -z -w 1 "$HOST" "$PORT" 2>/dev/null || \
- emit '{"text":"MAIL ?","tooltip":"bridge unreachable","class":"error","alt":"error"}'
+ emit '{"text":"󰵂","tooltip":"bridge unreachable","class":"error","alt":"error"}'
user=$(pass show "$PASS_USER" 2>/dev/null) || \
- emit '{"text":"MAIL ?","tooltip":"missing pass entry: '"$PASS_USER"'","class":"error","alt":"error"}'
+ emit '{"text":"󰵂","tooltip":"missing pass entry: '"$PASS_USER"'","class":"error","alt":"error"}'
pw=$(pass show "$PASS_PW" 2>/dev/null) || \
- emit '{"text":"MAIL ?","tooltip":"missing pass entry: '"$PASS_PW"'","class":"error","alt":"error"}'
+ emit '{"text":"󰵂","tooltip":"missing pass entry: '"$PASS_PW"'","class":"error","alt":"error"}'
n=$(PROTONMAIL_BRIDGE_USER="$user" PROTONMAIL_BRIDGE_PASS="$pw" \
python3 - "$HOST" "$PORT" <<'PY' 2>/dev/null || true
@@ -45,7 +45,7 @@ PY
)
case "$n" in
- '') emit '{"text":"MAIL ?","tooltip":"IMAP query failed","class":"error","alt":"error"}' ;;
- 0) emit '{"text":"MAIL 0","tooltip":"Inbox: no unread","class":"empty","alt":"empty"}' ;;
- *) emit "$(printf '{"text":"MAIL %s","tooltip":"Inbox: %s unread","class":"unread","alt":"unread"}' "$n" "$n")" ;;
+ '') emit '{"text":"󰵂","tooltip":"IMAP query failed","class":"error","alt":"error"}' ;;
+ 0) emit '{"text":"󰇮","tooltip":"Inbox: no unread","class":"empty","alt":"empty"}' ;;
+ *) emit "$(printf '{"text":"󰇮 %s","tooltip":"Inbox: %s unread","class":"unread","alt":"unread"}' "$n" "$n")" ;;
esac