aboutsummaryrefslogtreecommitdiff
path: root/sway/run-sway.sh
blob: 763d83fe0afe621249be449d8005aaaf771ced90 (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