diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2024-01-08 18:50:10 +0100 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2024-01-08 18:50:10 +0100 |
| commit | 39abd6b00a427ac4d33564d9a00cde35abe90be8 (patch) | |
| tree | c92ea389ab832929263612b556f8f141feb9ea1a /sway/run-sway.sh | |
| parent | 52ee08731eeebed097cf2d17c76597d7ded5b038 (diff) | |
.
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 |
