Micro-break reminder script for KWin (KDE Plasma 6+)
KBreakReminder periodically forces short breaks by flashing the active window (minimize → restore cycle).
It is designed to help reduce eye strain, encourage micro-breaks, and interrupt long periods of continuous work.
Unlike traditional break tools such as rsibreak on Wayland, which can often be easily bypassed (for example by simply switching the active window), this script works directly at the KWin level and cannot be dismissed that way.
Breaks are intended not only to rest your eyes, but also to remind you to stand up, stretch, and step away from the computer. Sitting for long, uninterrupted periods is known to negatively affect overall health.
- You work normally
- After the configured interval (default: 15 min)
- A break starts:
- (NEW) 5-second OSD warning
- active window flashes (minimize ↔ restore)
- Work resumes
Breaks are triggered automatically after a configurable time interval.
Default behavior:
| Setting | Default |
|---|---|
| Break interval | 15 minutes |
| Short break duration | 15 seconds |
| Long break duration | 60 seconds |
| Long break frequency | every 4 cycles |
Instead of passive notifications, the script temporarily hides the active window.
restore → minimize → restore → minimize
This forces a short pause without locking the screen.
The script detects system inactivity:
| Situation | Behavior |
|---|---|
| short inactivity | main timer restarts |
| system suspend / resume | timers reset |
This prevents:
• break triggers immediately after wake • flashing windows after system resume
Before each break, a 5-second on-screen countdown is displayed:
Break in 5s → 4s → 3s → ...
This helps you prepare for the interruption instead of being surprised.
All timing parameters can be configured in the script settings.
Main parameters:
intervalMinutes
longEveryNCycles
shortTotalSeconds
shortFlashIntervalMs
longTotalSeconds
longFlashIntervalMs
Break cycle types:
15 seconds flashing
interval: 500 ms
60 seconds flashing
interval: 1000 ms
Long breaks occur every N short cycles.
- Download the latest package:
KBreakReminder.kwinscript
- Open:
System Settings → Window Management → KWin Scripts
-
Click Install from File…
-
Select the downloaded package.
-
Enable KBreakReminder.
-
Apply changes.
The script will now be active.
Clone the repository:
git clone https://github.com/mtriam/KBreakReminder.git
cd KBreakReminder
Run installer:
chmod +x KBreakReminder.sh
./KBreakReminder.sh install
You can remove the script either using the installer script or from KDE settings.
./KBreakReminder.sh uninstall
- Open System Settings → Window Management → KWin Scripts
- Disable KBreakReminder
- Click Remove
Project structure:
src/
├ metadata.json
└ contents/
├ code/main.js
├ config/main.xml
└ ui/config.ui
Installed to:
~/.local/share/kwin/scripts/KBreakReminder
This project was developed with assistance from AI tools to accelerate development, testing and documentation.
Human design, testing and final decisions remain under the project author.
GPL-3.0
triamond