summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Sever2024-08-08 11:01:06 +0200
committerYigit Sever2024-08-08 11:01:06 +0200
commit45550488f9f4effc3b9dc5bc0fc4c25c130d69fd (patch)
treedd306773bd27caa99385e07c42491cfbb47a0e0e
parente7133668e8cd3909d808678f0b690052f75a3d52 (diff)
downloaddotfiles-45550488f9f4effc3b9dc5bc0fc4c25c130d69fd.tar.gz
dotfiles-45550488f9f4effc3b9dc5bc0fc4c25c130d69fd.tar.bz2
dotfiles-45550488f9f4effc3b9dc5bc0fc4c25c130d69fd.zip
mailsync: add wayland/x11 guard
-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"