dotfiles/river-classic/.config/river/timeout.sh

16 lines
248 B
Bash
Raw Normal View History

2025-02-06 20:52:14 -08:00
#!/bin/sh
caffeine_file=$HOME/.cache/idle
if [[ ! -f $caffeine_file ]] then
echo 0 > $caffeine_file
fi
caffeine=$(<$HOME/.cache/idle)
if [[ $caffeine -eq 0 ]] then
swaylock -f -c 000000
else
notify-send 'Caffeine' 'Not sleeping'
fi