diff options
-rwxr-xr-x | .local/bin/mailsync | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/.local/bin/mailsync b/.local/bin/mailsync index 40a2dee..abb4c18 100755 --- a/.local/bin/mailsync +++ b/.local/bin/mailsync | |||
@@ -27,7 +27,14 @@ command -v notify-send > /dev/null || echo 'Note that `libnotify` or `libnotify- | |||
27 | 27 | ||
28 | # Required to display notifications if run as a cronjob: | 28 | # Required to display notifications if run as a cronjob: |
29 | export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus | 29 | export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus |
30 | export DISPLAY=:0.0 | 30 | |
31 | SESH=$(loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}') | ||
32 | |||
33 | if [[ "$SESH" = "wayland" ]]; then | ||
34 | export WAYLAND_DISPLAY=wayland-1 | ||
35 | else | ||
36 | export DISPLAY=:0.0 | ||
37 | fi | ||
31 | 38 | ||
32 | # For individual configurations: | 39 | # For individual configurations: |
33 | [ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store" | 40 | [ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store" |