#!/bin/bash lid_state=/proc/acpi/button/lid/C25B/state test -e $lid_state || exit 0 #if cat $lid_state | grep open > /dev/null # then echo "lid open -> reinitializing video" # /root/restoreVideo.sh # DISPLAY=:0 xmodmap /home/knoppix/.Xmodmap #fi if cat $lid_state | grep closed > /dev/null then echo "lid closed -> suspending" /usr/sbin/hibernate-ram fi