From 0ff14fee55e68e59df6a40d72205f8953df056a3 Mon Sep 17 00:00:00 2001
From: Clément DOUIN <soywod@users.noreply.github.com>
Date: Tue, 2 Feb 2021 22:49:15 +0100
Subject: fix notifications on Xwayland

---
 bin/mailsync | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/mailsync b/bin/mailsync
index 8ca83c6..6741804 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -39,7 +39,7 @@ case "$(uname)" in
 		messageinfo() { osascript -e "display notification with title \"📧 $from\" subtitle \"$subject\"" ;}
 		;;
 	*)
-		displays="$(pgrep -a Xorg | grep -wo "[0-9]*:[0-9]\+" | sort -u)"
+		displays="$(pgrep -a X\(org\|wayland\) | grep -wo "[0-9]*:[0-9]\+" | sort -u)"
 	    	notify() { for x in $displays; do
 				export DISPLAY=$x
 				notify-send --app-name="mutt-wizard" "mutt-wizard" "📬 $2 new mail(s) in \`$1\` account."
-- 
cgit v1.2.3