LID-STATE(1)
π LID-STATE(1) β the manual page, but make it cute π
okay so bestie, welcome to lid-state(1) β the little script that tells you whether your laptop lid is open or closed. yes, that's literally it. and it ate. β¨
πΈ NAME πΈ
lid-state β query state of the device's lid
like, it queries. the state. of the lid. icon behavior honestly.
π¦ SYNOPSIS π¦
lid-state
lid-state (--open | --closed) [-- <cmd...>]
lid-state (--version | --help)
three whole modes, all main character energy π
π DESCRIPTION π
so here's the tea, and there are three whole vibes depending on how you invoke it:
lid-state, if invoked without any arguments β prints the current state of the lid:openorclosed. that's it. that's the whole job. π«Άlid-state, invoked with--openor--closedand no cmd β exits with status0if the current lid state corresponds to the specified option, otherwise exits with status1. so it's basically a vibe check for your lid. β / βlid-state, invoked with cmd β runs the cmd if the current lid state corresponds to the specified option, otherwise just exits with status0. no drama, no error, it simply does nothing and leaves. π
β¨ OPTIONS β¨
-o,--openβ if cmd is given: execute cmd if the lid is open, otherwise do nothing and exit with0. if cmd is not given: exit with0if the lid is open, otherwise exit with1. open lid = slay, closed lid = not slay (in this mode anyway). π-c,--closedβ analogous to--open. literally the same energy, just flipped. π¦-V,--versionβ print script name & version and exit. a little "hi, it's me" moment. π-h,--helpβ print the help message and exit. your bestie when you're lost. π«Ά
π FILES π
/proc/acpi/button/lid/LID/stateβ state of the lid exported by the ACPI subsystem. this is the source of truth, the blueprint, the oracle. ngl it's where all the answers live. π₯
π EXIT CODES π
0β clean exit, no error has encountered. we love a peaceful ending. β¨1β see DESCRIPTION. (iykyk π)100β invalid usage. you did it wrong bestie, no cap. π101β failed to read/proc/acpi/button/lid/LID/state. the file ghosted us. π
and heads up: if cmd is given and the condition (--openor--closed) is met,lid-stateexits with the exit status of the cmd. so whatever cmd says, that's the final word. periodt. π
πΊ AUTHORS πΊ
Jakub Jirutka β the icon, the legend, the main character who wrote this. ππ
π§ REPORTING BUGS π§
found a bug? don't suffer in silence, bestie β report bugs to the project's issue tracker at https://github.com/jirutka/acpi-utils/issues. that's the group chat for problems. π«Ά
and that's the whole page, babe π
β¨ β this is lid-state(1), dated 2021-10-19, from the acpi-utils source, and it's giving iconic. now go check that lid. ππ¦
π¦ where this page comes from
- alpine 3.24: acpi-utils-doc 0.1.0-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms