Wanted: sw to produce audible alarm if laptop lid remains closed for >5s without entering suspend.
Yeah I think I know how it could be done. The issue is just annoying enough for me to want a solution but not annoying enough for me to want to script it myself. ;-)
-
-
this works on my machine :) i=0 while sleep 1; do if grep -q open /proc/acpi/button/lid/LID0/state; then i=0 else if [[
$i -ge 5 ]]; then aplay --duration=1 < /dev/urandom else let i++ fi fi done -
Yeah but that's more like a daemon that constantly polls. My LID script in /etc/acpi is currently just exec pm-suspend. Probably should run it in bg, sleep 5, check if lid is still closed, then alarm.
-
https://gist.github.com/envygeeks/462881bf979af8448f4b2c2eb1935f05 … should in theory work, it takes advantage of /etc/acpi to launch a script on the fly, then kills it once the computer comes back up.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.