#!/bin/sh
# alloy-session — the Alloy session entry point.
#
# Puts the chosen day/night skeleton in place before sway reads its config.
# ~/.config/sway/config is one of the files that changes with the mode, and sway
# reads it exactly once at start, so applying afterwards would need a reload and
# would still leave every already-launched program on the old palette.
#
# `|| true` is load-bearing. greetd's --cmd points here, so this script is on the
# boot path: nothing it does before the exec is allowed to be the reason a login
# fails. `alloy theme apply` is written to exit 0 on every internal failure for
# the same reason; this is the second belt, for the case where the binary is
# missing altogether.
#
# Deliberately dependency-free: sh, one alloy call, one exec. Anything else here
# is another way a machine ends up with no way to log in.
alloy theme apply || true
exec sway "$@"
