Skip to content

Commit

Permalink
detect all Xorgs #fixes #607
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeSmithxyz committed Jan 8, 2021
1 parent aec0f88 commit 913c877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/mailsync
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 913c877

Please sign in to comment.