commit 36788d9c439729f97edda2aba75bf477f029dca2
parent a3185ccd2edae56bd4fdd62b8cd2bac998adaf4a
Author: Luke Smith <luke@lukesmith.xyz>
Date: Sun, 30 May 2021 21:21:31 -0400
don't readlink for soystemd on mac
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bin/mailsync b/bin/mailsync
@@ -25,9 +25,6 @@ eval "$(grep -h -- \
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.config/zsh/.zprofile" "$HOME/.zshenv" \
"$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" "$HOME/.pam_environment" 2>/dev/null)"
-case "$(readlink -f /sbin/init)" in
- *systemd*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
-esac
export GPG_TTY=$TTY
[ -n "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" || MBSYNCRC="$HOME/.mbsyncrc"
@@ -39,6 +36,9 @@ case "$(uname)" in
messageinfo() { osascript -e "display notification with title \"📧 $from\" subtitle \"$subject\"" ;}
;;
*)
+ case "$(readlink -f /sbin/init)" in
+ *systemd*) 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\))"
displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)"