8 lines
621 B
Bash
8 lines
621 B
Bash
#!/bin/sh
|
|
# B13W: Sway (debug/remote compositor) with /usr/local/lib/b13/run/sway.conf. STOP_X=1 stops X11 first.
|
|
. /usr/local/lib/b13/run/wl-common.sh
|
|
x_guard; seatd_up; t0=$(now)
|
|
setsid sway -c /usr/local/lib/b13/run/sway.conf > $S/sway.log 2>&1 < /dev/null &
|
|
echo $! > $S/sway.pid; W=$(wait_socket) || { log "FAIL: sway socket (see $S/sway.log)"; tail -20 $S/sway.log; exit 1; }
|
|
echo $W > $S/wayland-display; i=0; while ! pidof foot >/dev/null && [ $i -lt 100 ]; do sleep 0.1; i=$((i+1)); done
|
|
log "SWAY UP socket=$W pid=$(pidof sway) foot=$(pidof foot) start=$(awk -v a=$t0 -v b=$(now) 'BEGIN{printf "%.2f", b-a}')s"
|