A simple Neovim plugin to remind you to take breaks while coding. This plugin automatically triggers wellness breaks after a random number of keystrokes (200-300 by default) to help maintain your health and productivity.
- 💧 Random wellness break reminders with encouraging messages
- ⏰ Configurable break duration and keystroke thresholds
- 🎯 Automatic keystroke counting
- 🚫 Non-intrusive floating window that doesn't interrupt your workflow
- 🎮 Manual break control commands
Using lazy.nvim
{
"CodeGeek04/wellness-break.nvim",
config = function()
require("wellness-break").setup()
end,
}Using packer.nvim
use {
"CodeGeek04/wellness-break.nvim",
config = function()
require("wellness-break").setup()
end
}Default configuration:
require("wellness-break").setup({
min_keystrokes = 200, -- Minimum keystrokes before break
max_keystrokes = 300, -- Maximum keystrokes before break
break_duration = 20, -- Break duration in seconds
keystroke_mode = "all", -- "all" or "insert_only" - when to count keystrokes
messages = { -- Custom break messages
"💧 Time to drink some water!",
"🚶 Take a quick walk around!",
"👁️ Close your eyes and rest for a moment",
"🧘 Take 3 deep breaths",
"💪 Do some quick stretches",
"🌅 Look away from the screen",
"🤸 Stand up and move around",
"☕ Maybe grab a coffee or tea?",
},
})keystroke_mode: Controls when keystrokes are counted toward break triggers"all"(default): Count keystrokes in all modes (normal, insert, visual, etc.)"insert_only": Only count keystrokes when in insert mode (i, R, Rv)
:WellnessBreakNow- Trigger a break immediately:WellnessBreakEnd- End current break early:WellnessBreakStatus- Show current keystroke count and status
The plugin monitors your keystrokes and triggers a break after a random number of keystrokes (between min_keystrokes and max_keystrokes). During a break:
- A floating window appears with a random wellness message
- The screen is "frozen" to encourage you to actually take the break
- A countdown timer shows the remaining break time
- The break automatically ends after the configured duration
MIT License