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


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
fi