summaryrefslogtreecommitdiffstats
path: root/.config/sway/i3blocks_modules
diff options
context:
space:
mode:
Diffstat (limited to '.config/sway/i3blocks_modules')
-rwxr-xr-x.config/sway/i3blocks_modules5
1 files changed, 3 insertions, 2 deletions
diff --git a/.config/sway/i3blocks_modules b/.config/sway/i3blocks_modules
index ad4bbba..2bc6ed5 100755
--- a/.config/sway/i3blocks_modules
+++ b/.config/sway/i3blocks_modules
@@ -41,8 +41,9 @@ case "$1" in
;;
mail)
check_online
- mail_password=$(rbw get 'yandex mail')
- mail_count=$(curl --silent --netrc-file <(cat <<<"machine $MAILSERVER login $EMAIL password $mail_password") "imaps://$MAILSERVER" -X 'STATUS INBOX (UNSEEN)')
+ mail_server=$(rbw get 'email' --full | awk -F: '/Incoming/ {gsub(/ /,""); print $2}')
+ mail_password=$(rbw get 'email')
+ mail_count=$(curl --silent --netrc-file <(cat <<<"machine $mail_server login $EMAIL password $mail_password") "imaps://$MAILSERVER" -X 'STATUS INBOX (UNSEEN)')
printf " %s\n" "$(printf "$mail_count" | awk -F"[][()]" '{print substr ($2, 8 )}')"
;;
power)