I'm using Arch Linux on an Acer Spin 5 laptop. The laptop lid can be turned backwards and then be used as a tablet. In Windows this is detected automatically and the keyboard is deactivated then. Arch seems to detect this, too, because when I turn the screen about 180° the keyboard gets deactivated, too.
I have tried to read out
/proc/acpi/button/lid/LID0/state (with a script) when the lid is turned more 180°, but the state is still just "open" then. So how can I detect whether the lid is just open or open more than 180°?
Also Windows seems to be able to detect the device orientation and adjusts screen orientation accordingly (like holding it sideways), is it possible, to detect this in Arch, too?