From d3f1b4a32b7ed1158fcc6c581bbcdeb0fdc3a4a5 Mon Sep 17 00:00:00 2001 From: MineralwaterXu Date: Mon, 21 Dec 2020 16:50:29 +0800 Subject: add mail status --- dwm-status-refresh.sh | 4 ++-- dwmbar-functions/dwm_mail.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dwm-status-refresh.sh b/dwm-status-refresh.sh index 73da128..c250d77 100755 --- a/dwm-status-refresh.sh +++ b/dwm-status-refresh.sh @@ -139,7 +139,7 @@ export IDENTIFIER="unicode" #. "$DIR/dwmbar-functions/dwm_cmus.sh" #. "$DIR/dwmbar-functions/dwm_resources.sh" #. "$DIR/dwmbar-functions/dwm_battery.sh" -#. "$DIR/dwmbar-functions/dwm_mail.sh" +. "$DIR/dwmbar-functions/dwm_mail.sh" #. "$DIR/dwmbar-functions/dwm_backlight.sh" . "$DIR/dwmbar-functions/dwm_alsa.sh" #. "$DIR/dwmbar-functions/dwm_pulse.sh" @@ -156,7 +156,7 @@ get_bytes vel_recv=$(get_velocity $received_bytes $old_received_bytes $now) vel_trans=$(get_velocity $transmitted_bytes $old_transmitted_bytes $now) -xsetroot -name " 💿 $(print_mem)M $(dwm_alsa) $(print_date) " +xsetroot -name " 💿 $(print_mem)M $(dwm_mail) $(dwm_alsa) $(print_date) " # Update old values to perform new calculations old_received_bytes=$received_bytes diff --git a/dwmbar-functions/dwm_mail.sh b/dwmbar-functions/dwm_mail.sh index 27f3d51..7373e93 100755 --- a/dwmbar-functions/dwm_mail.sh +++ b/dwmbar-functions/dwm_mail.sh @@ -7,7 +7,7 @@ # To count mail in an inbox, change "/path/to/inbox" below to the location of your inbox. For example, "/home/$USER/.mail/new" dwm_mail () { - MAILBOX=$(ls /path/to/inbox | wc -l) + MAILBOX=$(ls /home/$USER/.local/share/mail/mineralwater@m1neralwater.com/INBOX/new | wc -l) printf "%s" "$SEP1" if [ "$IDENTIFIER" = "unicode" ]; then -- cgit v1.2.1