Skip to content

Instantly share code, notes, and snippets.

View justinboswell's full-sized avatar
🏠
Working from home

Justin Boswell justinboswell

🏠
Working from home
  • Secret Dimension
  • California, USA
  • X @jboswell
View GitHub Profile
#!/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