瀏覽代碼

fix notifications when the Xorg process is just X

To close #845 :

I added the `-x` flag to prevent the regex from matching on _every_ pro-
cess name containing an `X`.

Because I'm not entirely sure about portability (does every `pgrep` va-
riant support that flag), I didn't push this directly.

So what do you think @LukeSmithxyz ?
pull/846/head
Kr1ss 1 年之前
父節點
當前提交
f2014408b9
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 23F078862ACFE50
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      bin/mailsync

+ 1
- 1
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


Loading…
取消
儲存