aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDavid Runge <david.runge@frqrec.com>2014-02-20 01:34:23 +0100
committerDavid Runge <david.runge@frqrec.com>2014-02-20 01:34:23 +0100
commit2d735d829e6792e6cf5c6779754e3160534c47b6 (patch)
tree0c261a3266804411ddbd42f60c743825b442e9bf /bin
parentfc8c4b6bca43efac5b36f6ef74258514dd9d5733 (diff)
downloaddotfiles-2d735d829e6792e6cf5c6779754e3160534c47b6.tar.gz
dotfiles-2d735d829e6792e6cf5c6779754e3160534c47b6.tar.bz2
dotfiles-2d735d829e6792e6cf5c6779754e3160534c47b6.tar.xz
dotfiles-2d735d829e6792e6cf5c6779754e3160534c47b6.zip
Updated howto for script
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lid-switch-action7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/lid-switch-action b/bin/lid-switch-action
index 1a22015..4b91d48 100755
--- a/bin/lid-switch-action
+++ b/bin/lid-switch-action
@@ -1,8 +1,11 @@
#!/bin/bash
# What action to take on closing the laptop lid,
-# depending on whether a screen is attached or not
+# depending on whether a screen is attached or not.
+# This implies setting HandleLidSwitch=ignore in /etc/systemd/logind.conf
+# Call this script from /etc/acpi/handler.sh (or other properly set up script
+# for handling button/lid acpi event) with parameter 0 and 1 for close and open respectively
-# Check whether first parameter is a number
+# Check whether first parameter is a number
re='^[0-9]+$'
if ! [[ $1 =~ $re ]]; then
echo "error: Not a number" >&2; exit 1