summaryrefslogtreecommitdiff
path: root/extra/acpid/lid-closed
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
committerdavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
commit739c65c54cb0e957df5e9b76f93fb02554e5cac3 (patch)
tree09ddfa0a342f3ea9de136cb50abdd79821bf1b53 /extra/acpid/lid-closed
parent4c585ad54388285500fd18a6aaa516894e0f2c16 (diff)
moved everything to new file formatting
Diffstat (limited to 'extra/acpid/lid-closed')
-rw-r--r--extra/acpid/lid-closed21
1 files changed, 0 insertions, 21 deletions
diff --git a/extra/acpid/lid-closed b/extra/acpid/lid-closed
deleted file mode 100644
index 57ffb71..0000000
--- a/extra/acpid/lid-closed
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-# This script exits with status 0 if the latop's lid is closed, 1 if opened,
-# 10 if /proc/acpi/button/lid/LID/state does not exist or is not readable.
-set -u
-
-STATE_FILE='/proc/acpi/button/lid/LID/state'
-
-verbose=false
-[ "${1:-}" = '-v' ] && verbose=true
-
-if ! [ -r "$STATE_FILE" ]; then
- $verbose && echo "$STATE_FILE does not exist or is not readable!" >&2
- exit 10
-fi
-
-read -r _ state < "$STATE_FILE" || exit 10
-
-[ "$state" = 'closed' ]; rc=$?
-
-$verbose && echo $rc
-exit $rc