A Neovim plugin designed to gently remind you to take breaks and stretch your gluteal muscles after prolonged periods of sitting. Avoid the "developer's slouch" and keep your hips happy!
- Multi-stage Notifications: Get progressive reminders based on your work duration.
- Idle Time Detection: The plugin intelligently detects prolonged inactivity and will stop the session, or even lock Neovim to ensure you get up and move.
- Interactive Lock Screen: When locked, Neovim presents a friendly ASCII art reminder (a coffee cup!) and a progress bar, encouraging you to step away. Any activity on the lock screen will reset the idle timer, prompting you to truly disengage.
- Customizable Durations: Adjust the timing of notifications and idle detection to fit your workflow.
- Activity Tracking: Monitors your cursor movements, typing, and file saves to determine activity.
You can install glute.nvim using your favorite Neovim package manager.
Lazy.nvim
-- lua/plugins/glute.lua
return {
'ryan331913/glute.nvim', -- Replace with your actual GitHub username and repo name
-- Ensure 'notify' is loaded before 'glute.nvim'
dependencies = { 'rcarriga/nvim-notify' },
config = function()
require('glute').setup({
-- Your custom configurations here
first_notify = 1800, -- First notification after 30 minutes (1800 seconds)
second_notify = 900, -- Second notification after an additional 15 minutes (900 seconds)
final_notify = 900, -- Final notification after an additional 15 minutes (900 seconds)
idle_time = 180, -- Maximum idle time before action (180 seconds = 3 minutes)
})
end,
}Packer.nvim
-- lua/plugins.lua
use {
'ryan331913/glute.nvim', -- Replace with your actual GitHub username and repo name
requires = { 'rcarriga/nvim-notify' }, -- Ensure 'notify' is installed
config = function()
require('glute').setup({
-- Your custom configurations here
first_notify = 1800,
second_notify = 900,
final_notify = 900,
idle_time = 180,
})
end
}Note: This plugin depends on nvim-notify for its notification system. Please ensure you have nvim-notify installed and configured.
You can customize the plugin's behavior by passing a table to the setup() function.
| Option | Type | Default Value | Description |
|---|---|---|---|
| first_notify | number | 1800 (30mins) | The duration in seconds after which the first notification will appear, prompting you to stand up and relax. |
| second_notify | number | 900 (15mins) | The duration in seconds after the first_notify stage ends, for the second notification to appear. |
| final_notify | number | 900 (15mins) | The duration in seconds after the second_notify stage ends, for the final stage check to occur. |
| idle_time | number | 180 (3mins) | The maximum duration in seconds that you can be inactive. If idle for this long at the end of a stage (or at the final stage), glute.nvim will either terminate the session or lock Neovim to encourage a break. |
require('glute').setup({
first_notify = 1200, -- 20 minutes
second_notify = 600, -- 10 minutes
final_notify = 600, -- 10 minutes
idle_time = 60, -- 1 minute
})Once installed and configured, glute.nvim will automatically start its activity monitoring when Neovim launches (or after you call require('glute').setup()).
| Command | Description |
|---|---|
| :GluteStart | Manually starts the glute session. If a session is already active, it will notify you. |
| :GluteStop | Manually stops the current glute session and clears all active timers. |
| :GluteStatus | Displays the current status of your glute session, including elapsed time and the current stage. |
| :GluteLock | (Debugging/Manual Override) Manually triggers the Neovim lock screen. Useful for testing the lock functionality or if you want to force a break. |
| :GluteUnLock | (Debugging/Manual Override) Manually unlocks Neovim if it's currently locked by glute.nvim. |