diff options
author | ben <ben@nagy.contact> | 2025-01-10 11:14:29 -0800 |
---|---|---|
committer | ben <ben@nagy.contact> | 2025-01-10 11:14:29 -0800 |
commit | fb4f206e21cc2853e904e8e548b3d4450b208c8d (patch) | |
tree | 92044e436174b598bbb831473412ee4382a05396 /scripts/util/afk.sh | |
parent | 7339a5dae5f48ba37d44094f8aaa9915695f86e5 (diff) |
added scriptsmain
Diffstat (limited to 'scripts/util/afk.sh')
-rwxr-xr-x | scripts/util/afk.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/util/afk.sh b/scripts/util/afk.sh new file mode 100755 index 0000000..34d1226 --- /dev/null +++ b/scripts/util/afk.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# Prevent screen from sleeping or trick websites to think you're present while afk + +dzen_opts="-bg white -fg black -p 1 -x -475 -y 50 -w 475 -h 50" +message="Away from keyboard for ~$1 minutes" + +while true; do + for direction in "10 0" "0 10" "-10 0" "0 -10"; do # move around + xdotool mousemove_relative -- $direction + printf '%s\n' "$message" | dzen2 $dzen_opts + done + + xdotool mousemove 2880 540 # someplace near the middle +done + +rm "$PID_FILE" |