diff options
Diffstat (limited to 'sway/run-sway.sh')
| -rwxr-xr-x | sway/run-sway.sh | 4 |
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 |
