summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2022-05-31 16:33:36 +0000
committerGitHub <noreply@github.com>2022-05-31 16:33:36 +0000
commitcc92d1f48448f30d001e2e29d9e872e9de008ce6 (patch)
tree026b892e07d7b4bebf1adaed41582415e422a91a /bin
parente489ae965ae2dbc165c7ee7530460a35e2316745 (diff)
parentf2014408b984c7e5814d1021cab55624cbed7ae6 (diff)
Merge pull request #846 from Kr1ss-XD/fix-845
fix notifications when the Xorg process is just X
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mailsync2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mailsync b/bin/mailsync
index 97cd224..2f32c14 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -42,7 +42,7 @@ case "$(uname)" in
*systemd*|*openrc*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
esac
# remember if a display server is running since `ps` doesn't always contain a display
- pgrepoutput="$(pgrep -a X\(org\|wayland\))"
+ pgrepoutput="$(pgrep -ax X\(\|org\|wayland\))"
displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)"
notify() { [ -n "$pgrepoutput" ] && for x in ${displays:-0:}; do
export DISPLAY=$x