Skip to content

Instantly share code, notes, and snippets.

@starenka
Created March 10, 2012 00:02
Show Gist options
  • Save starenka/2009396 to your computer and use it in GitHub Desktop.
Save starenka/2009396 to your computer and use it in GitHub Desktop.
pm-util script to turn thinkpad light after 10pm
#!/bin/bash
# On an IBM system. turn the light after 10pm
[ -f /proc/acpi/ibm/light ] || exit $NA
case "$1" in
thaw|resume)
time=$(date +%H)
if [[ "$time" -ge 22 ]] || [[ "$time" -le 6 ]] ;then
echo "on" > /proc/acpi/ibm/light
fi
;;
*) exit $NA
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment