Wrt https://github.com/EndeavourOS-Community-Editions/sway/blob/main/.config/sway/scripts/clamshell.sh,
My Dell Vostro 3590 and Inspiron 15-3567 have
/proc/acpi/button/lid/LID0/state
and not
/proc/acpi/button/lid/LID/state
So maybe the script can have something more general like
/proc/acpi/button/lid/*/state