aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2024-01-08 18:50:10 +0100
committerbozo.kopic <bozo@kopic.xyz>2024-01-08 18:50:10 +0100
commit39abd6b00a427ac4d33564d9a00cde35abe90be8 (patch)
treec92ea389ab832929263612b556f8f141feb9ea1a /sway
parent52ee08731eeebed097cf2d17c76597d7ded5b038 (diff)
.
Diffstat (limited to 'sway')
-rwxr-xr-xsway/run-sway.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/run-sway.sh b/sway/run-sway.sh
index 7a48353..ed0c0d7 100755
--- a/sway/run-sway.sh
+++ b/sway/run-sway.sh
@@ -1,6 +1,8 @@
#!/bin/sh
-if pidof dbus-daemon > /dev/null; then
+
+if ( ( command -v systemctl && systemctl --user is-system-running ) ||
+ pgrep -U $(id -u) dbus-daemon ) > /dev/null; then
exec sway > ~/.sway.log 2>&1
else
exec dbus-run-session -- sway > ~/.sway.log 2>&1