This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# number of seconds between checks for idle/mouse moves | |
interval=30 | |
# power supply status, check /sys/class/power_supply for the name | |
power_supply=/sys/class/power_supply/AC | |
lastpos=$(xdotool getmouselocation) | |
while [ 1 ]; do | |
# if plugged in |