From c406150719e2c4dddcc56a78845c1d3675980687 Mon Sep 17 00:00:00 2001 From: Saumit Date: Tue, 23 Dec 2025 05:40:51 +0530 Subject: eyesight: Adding a reminder daemon for 20-20-20 rule --- .scripts/20-20-20.sh | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 .scripts/20-20-20.sh (limited to '.scripts/20-20-20.sh') diff --git a/.scripts/20-20-20.sh b/.scripts/20-20-20.sh new file mode 100755 index 0000000..2179643 --- /dev/null +++ b/.scripts/20-20-20.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +# 20-20-20 Eye Rest Reminder for Hyprland +# Every 20 minutes, shows a full-screen blocking reminder for 20 seconds + +INTERVAL=1200 # 20 minutes in seconds +DURATION=20 # 20 seconds break + +while true; do + sleep $INTERVAL + + # Show notification warning + notify-send -u critical -t 3000 "👁️ 20-20-20 EYE BREAK" "Eye break starting in 3 seconds..." + + sleep 3 + + # Create full-screen blocking overlay using yad + # Install: sudo pacman -S yad + yad --width=1920 --height=1080 \ + --center \ + --undecorated \ + --no-buttons \ + --timeout=$DURATION \ + --timeout-indicator=top \ + --skip-taskbar \ + --on-top \ + --sticky \ + --fixed \ + --title="Eye Break" \ + --text="👁️ EYE BREAK TIME 👁️ + +Look at something 20 FEET away (6 meters) + +For 20 SECONDS + +🪑 Stand up and look away from the screen + +This window will close automatically..." \ + --text-align=center \ + --back=1f1d2e \ + --borders=50 & + + YAD_PID=$! + + # Wait for the duration + sleep $DURATION + + # Kill yad if still running + kill $YAD_PID 2>/dev/null + + # Show completion notification + notify-send -u normal -t 3000 "✅ Eye Break Complete" "Great job! Back to work 💪" +done -- cgit v1.2.3