Skip to main content

max / alloy

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