Короч, показываю как надо(в ответ на #3A29S0):
nb-crunchbang :: ~ » cat /etc/acpi/lm_lid.sh
#! /bin/bash
# test -f /usr/sbin/laptop_mode || exit 0
# lid button pressed/released event handler
# /usr/sbin/laptop_mode auto
lid_state=`grep -o closed /proc/acpi/button/lid/LID0/state`
if [[ ! -f /run/lock/acpi.lid.lock && $lid_state != '' ]]; then
/usr/sbin/pm-suspend
fi
nb-crunchbang :: ~ » cat ~/bin/inhibit
#!/usr/bin/env bash
touch /run/lock/acpi.lid.lock
$@
rm /run/lock/acpi.lid.lock
if [[ `grep -o closed /proc/acpi/button/lid/LID0/state` != '' ]]; then
sudo /usr/sbin/pm-suspend
fi
Для сравнения:
nb-crunchbang :: ~ » wc -l dev/systemd-215/src/login/inhibit.c
285 dev/systemd-215/src/login/inhibit.c
Makes sense.