/pommodoro-clock.nvim

yet another pommodoro neovim plugin that displays an ASCII timer in an overlay

Primary LanguageLua

pommodoro-clock.nvim

GitHub Workflow Status Lua

Pommodoro-Clock is a plugin that displays an ASCII timer in an overlay. It helps users stay focused and productive by using the Pomodoro Technique. Users can set a timer, view a countdown, and pause/resume the timer.

preview image

Installation

-- Packer
use({
  "jackMort/pommodoro-clock.nvim",
    config = function()
      require("pommodoro-clock").setup({
        -- optional configuration
      })
    end,
    requires = {
      "MunifTanjim/nui.nvim",
    }
})

Configuration

pommodoro-clock.nvim comes with the following defaults

{
  modes = {
    ["work"] = { "POMMODORO", 25 },
    ["short_break"] = { "SHORT BREAK", 5 },
    ["long_break"] = { "LONG BREAK", 30 },
  },
  animation_duration = 300,
  animation_fps = 30,
  say_command = "spd-say -l en -t female3",
  sound = "voice", -- set to "none" to disable
}

Usage

Plugin exposes the following public functions, here is a sample of the keybindings using which-key.

local function pc(func)
	return "<Cmd>lua require('pommodoro-clock')." .. func .. "<CR>"
end

p = {
	name = "Pommodoro",
	w = { pc('start("work")'), "Start Pommodoro" },
	s = { pc('start("short_break")'), "Short Break" },
	l = { pc('start("long_break")'), "Long Break" },
	p = { pc("toggle_pause()"), "Toggle Pause" },
	c = { pc("close()"), "Close" },
}

"Buy Me A Coffee"