info-eyestrain: add script

This commit is contained in:
Žiga Leber 2019-04-13 11:45:23 +02:00 committed by x70b1
parent d9d00e831a
commit 4c8743b122
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# Script: info-eyestrain
A script for avoiding digital eye strain.
It follows the 20-20-20 rule. The timer displays how long it is until the next break. You can add this to send a notification and play a sound when the time is up.
## Module
```ini
[module/info-eyestrain]
type = custom/script
exec = ~/polybar-scripts/info-eyestrain.sh
interval = 60
```

View File

@ -0,0 +1,10 @@
#!/bin/sh
time=$((20 - $(date '+%-M') % 20))
#if [ $time -eq 20 ]; then
# notify-send 'Break' &
# ogg123 beep.ogg &> /dev/null &
#fi
echo "$time"