Skip to content

Instantly share code, notes, and snippets.

View timup's full-sized avatar
🏴
Awesome. Awesome to the max.

Tim Upchurch timup

🏴
Awesome. Awesome to the max.
View GitHub Profile
@timup
timup / xscreensaver-suspend
Created March 6, 2023 16:29 — forked from mozbugbox/xscreensaver-suspend
Auto suspend Linux box with xscreensaver
#!/bin/bash
# suspend/sleep linux system on xscreensaver activation
#
# run the bash script in your .xsession,
# or something like .config/lxsession/LXDE/autostart for lxde
timeout=60 # After xscreensaver activated, wait timeout to suspend
read_timeout=5 # timeout for read from `xscreensaver-command -watch`
SUSPEND_BIN=/usr/sbin/pm-suspend