diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2021-05-30 21:21:31 -0400 | 
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2021-05-30 21:21:31 -0400 | 
| commit | 36788d9c439729f97edda2aba75bf477f029dca2 (patch) | |
| tree | de671f8f2028e99f5f835262d9abefa67ef2b695 /bin | |
| parent | a3185ccd2edae56bd4fdd62b8cd2bac998adaf4a (diff) | |
don't readlink for soystemd on mac
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/mailsync | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/bin/mailsync b/bin/mailsync index af7aa6c..f739584 100755 --- 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)" | 
