From 2d735d829e6792e6cf5c6779754e3160534c47b6 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 20 Feb 2014 01:34:23 +0100 Subject: Updated howto for script --- bin/lid-switch-action | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3-54-g00ecf