Update run-sway-vm.sh
This commit is contained in:
@@ -21,6 +21,11 @@ script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|||||||
repo_root=$(CDPATH= cd -- "${script_dir}/../../.." && pwd)
|
repo_root=$(CDPATH= cd -- "${script_dir}/../../.." && pwd)
|
||||||
config="${repo_root}/compositor/sway/nebula-sway.conf"
|
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_CURRENT_DESKTOP="${XDG_CURRENT_DESKTOP:-NebulaOS}"
|
||||||
export XDG_SESSION_DESKTOP="${XDG_SESSION_DESKTOP:-nebula}"
|
export XDG_SESSION_DESKTOP="${XDG_SESSION_DESKTOP:-nebula}"
|
||||||
export XCURSOR_THEME="${XCURSOR_THEME:-Adwaita}"
|
export XCURSOR_THEME="${XCURSOR_THEME:-Adwaita}"
|
||||||
@@ -34,6 +39,24 @@ if [ ! -f "${config}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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}"
|
cd "${repo_root}"
|
||||||
echo "nebula: starting Sway with ${config}"
|
echo "nebula: starting Sway with ${config}"
|
||||||
exec sway -c "${config}" "$@"
|
exec sway -c "${config}" "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user