aboutsummaryrefslogtreecommitdiff
path: root/sway/run-sway.sh
blob: 9141b8eb139e4a6bd16f468ca22293b95b92cca2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

exec >~/.sway.log 2>&1

if ( ( command -v systemctl && systemctl --user is-system-running ) ||
     pgrep -U $(id -u) dbus-daemon ) >/dev/null; then
    exec sway
else
    exec dbus-run-session -- sway
fi