From 6abab8f906b623e4a9fd7ba33fe44630a15d2c51 Mon Sep 17 00:00:00 2001 From: "shane.xb.qian" Date: Tue, 14 Feb 2023 20:16:13 +0800 Subject: [PATCH 1/2] fix: mailsync looks no '-q' parameter or made it fail // solution: remove '-q' Signed-off-by: shane.xb.qian --- bin/mw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mw b/bin/mw index 1a0cc2d..44a6566 100755 --- a/bin/mw +++ b/bin/mw @@ -217,7 +217,7 @@ togglecron() { cron="$(mktemp)" sed -ibu /mailsync/d "$cron"; rm -f "$cron"bu else echo "Adding automatic mailsync every ${cronmin:-10} minutes..." - echo "*/${cronmin:-10} * * * * $prefix/bin/mailsync -q" >> "$cron" + echo "*/${cronmin:-10} * * * * $prefix/bin/mailsync" >> "$cron" fi && crontab "$cron"; rm -f "$cron" ;} From 7de48da554c5d079e3d692ae949ab68edd2ec7af Mon Sep 17 00:00:00 2001 From: "shane.xb.qian" Date: Tue, 14 Feb 2023 20:29:19 +0800 Subject: [PATCH 2/2] fix: displays fallback of default looks should be ':0' // solution: changed from '0:' to ':0' Signed-off-by: shane.xb.qian --- bin/mailsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mailsync b/bin/mailsync index 537e0f1..f4d9488 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -43,7 +43,7 @@ case "$(uname)" in displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)" [ -z "$displays" ] && [ -d /tmp/.X11-unix ] && displays=$(cd /tmp/.X11-unix && for x in X*; do echo ":${x#X}"; done) - notify() { [ -n "$pgrepoutput" ] && for x in ${displays:-0:}; do + notify() { [ -n "$pgrepoutput" ] && for x in ${displays:-:0}; do export DISPLAY="$x" notify-send --app-name="mutt-wizard" "$1" "$2" done ;}