summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2021-01-07 20:55:43 -0500
committerLuke Smith <luke@lukesmith.xyz>2021-01-07 20:55:43 -0500
commit913c877448158ca6a97d6090884fc9ec9a3d9c68 (patch)
tree682bcb5d2922662c59376b14390f64d5a33fecb3
parentaec0f88c13469110ba2da8325c5aa3369e7444d4 (diff)
detect all Xorgs #fixes #607
-rwxr-xr-xbin/mailsync2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mailsync b/bin/mailsync
index 3fac7c5..980b015 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -42,7 +42,7 @@ case "$(uname)" in
messageinfo() { osascript -e "display notification with title \"📧 $from\" subtitle \"$subject\"" ;}
;;
*)
- displays="$(ps axo user,cmd | grep "^$USER\s\+.*Xorg" | grep -wo "[0-9]*:[0-9]\+")"
+ displays="$(pgrep -a Xorg | grep -wo "[0-9]*:[0-9]\+")"
notify() { for x in $displays; do
export DISPLAY=$x
notify-send --app-name="mutt-wizard" "mutt-wizard" "📬 $2 new mail(s) in \`$1\` account."