aboutsummaryrefslogtreecommitdiff
path: root/sway/run-sway.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sway/run-sway.sh')
-rwxr-xr-xsway/run-sway.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/sway/run-sway.sh b/sway/run-sway.sh
index 3b7b01b..6f6fcfb 100755
--- a/sway/run-sway.sh
+++ b/sway/run-sway.sh
@@ -5,8 +5,7 @@ exec >~/.sway.log 2>&1
export QT_QPA_PLATFORM=wayland
export XDG_CURRENT_DESKTOP=sway
-if ( ( command -v systemctl && systemctl --user is-system-running ) ||
- pgrep -U $(id -u) dbus-daemon ) >/dev/null; then
+if [ "$(ps -p 1 -o comm=)" = "systemd" ] || [ -n "$DBUS_SESSION_BUS_ADDRESS" ]; then
exec sway
else