summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/mailsync9
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:
29export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus 29export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
30export DISPLAY=:0.0 30
31SESH=$(loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}')
32
33if [[ "$SESH" = "wayland" ]]; then
34 export WAYLAND_DISPLAY=wayland-1
35else
36 export DISPLAY=:0.0
37fi
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"