From 852a5fe82edfeec09629008baa132db1df0dbd4f Mon Sep 17 00:00:00 2001 From: Andrew Zambazos Date: Wed, 26 Aug 2026 23:16:01 +1200 Subject: [PATCH] Update run-sway-vm.sh --- compositor/sway/dev/run-sway-vm.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/compositor/sway/dev/run-sway-vm.sh b/compositor/sway/dev/run-sway-vm.sh index 72d9bc4..58428f9 100644 --- a/compositor/sway/dev/run-sway-vm.sh +++ b/compositor/sway/dev/run-sway-vm.sh @@ -21,6 +21,11 @@ script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) repo_root=$(CDPATH= cd -- "${script_dir}/../../.." && pwd) config="${repo_root}/compositor/sway/nebula-sway.conf" +if command -v realpath >/dev/null 2>&1; then + repo_root=$(realpath "${repo_root}") + config=$(realpath "${config}") +fi + export XDG_CURRENT_DESKTOP="${XDG_CURRENT_DESKTOP:-NebulaOS}" export XDG_SESSION_DESKTOP="${XDG_SESSION_DESKTOP:-nebula}" export XCURSOR_THEME="${XCURSOR_THEME:-Adwaita}" @@ -34,6 +39,24 @@ if [ ! -f "${config}" ]; then exit 1 fi +if grep -q '^[[:space:]]*title_format\>' "${config}"; then + echo "nebula: refusing to start; ${config} still contains title_format" >&2 + echo "nebula: this Sway build does not support that command." >&2 + exit 1 +fi + +echo "nebula: repo ${repo_root}" +echo "nebula: config ${config}" +echo "nebula: sway $(command -v sway 2>/dev/null || echo missing)" + +if [ -n "${SWAYSOCK:-}" ]; then + echo "nebula: SWAYSOCK is set to ${SWAYSOCK}" >&2 + echo "nebula: you are already inside a compositor session." >&2 + echo "nebula: log out of that session or switch to a TTY (Ctrl+Alt+F3)," >&2 + echo "nebula: then start Sway from ~/Nebula-OS so this config is used." >&2 + exit 1 +fi + cd "${repo_root}" echo "nebula: starting Sway with ${config}" exec sway -c "${config}" "$@"