Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dbinagi/nomodoro
Pomodoro time tracker for NeoVim written entirely in LUA
https://github.com/dbinagi/nomodoro
lua neovim plugin
Last synced: 3 days ago
JSON representation
Pomodoro time tracker for NeoVim written entirely in LUA
- Host: GitHub
- URL: https://github.com/dbinagi/nomodoro
- Owner: dbinagi
- License: mit
- Created: 2022-07-31T13:49:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-02T14:41:02.000Z (6 months ago)
- Last Synced: 2024-08-02T13:33:23.856Z (3 months ago)
- Topics: lua, neovim, plugin
- Language: Lua
- Homepage:
- Size: 297 KB
- Stars: 60
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ![logo](assets/logo.png)
Finally, Nvim + Pomodoro!
Yes, its another Pomodoro plugin for Nvim. Originally made to my own use and to learn the basics of plugin creation with Neovim.
I decided to leave this available for everyone that can find it useful also and please feel free to use, copy, comment or change anything you want.
![demo](assets/demo.gif)
# Features
* Setup your pomodoro sessions time
* Start and Stop sessions
* Show status realtime from other plugins
* Not just Pomodoro focused! Custom timer for any use# Quickstart
## Instalation
Using [vim-plug](https://github.com/junegunn/vim-plug)
```vim
Plug 'dbinagi/nomodoro'
```
## SetupTo load plugin with default configuration:
```lua
require('nomodoro').setup({})
```# Setup
## Default Configuration
```lua
require('nomodoro').setup({
work_time = 25,
short_break_time = 5,
long_break_time = 15,
break_cycle = 4,
menu_available = true,
texts = {
on_break_complete = "TIME IS UP!",
on_work_complete = "TIME IS UP!",
status_icon = "🍅 ",
timer_format = '!%0M:%0S' -- To include hours: '!%0H:%0M:%0S'
},
on_work_complete = function() end,
on_break_complete = function() end
})```
# Commands
| Command | Description |
| ----------- | ----------- |
| NomoWork | Start work timer |
| NomoBreak | Start break timer |
| NomoStop | Stop all timers |
| NomoStatus | Print time left manually |
| NomoTimer N | Runs a timer for N minutes |
| NomoPause | Pauses current timer |
| NomoContinue | Resumes current timer |# Configure keys
By default, no shortcuts are provided, you could configure the following.
```lua
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }map('n', 'nw', 'NomoWork', opts)
map('n', 'nb', 'NomoBreak', opts)
map('n', 'ns', 'NomoStop', opts)
```# Optional UI
## Integration with lualine
As an example, to integrate the status realtime with lualine use the following:
```lua
local lualine = require'lualine'
lualine.setup({
sections = {
lualine_x = {
require('nomodoro').status,
}
}
})
```## Integration with [nui.menu](https://github.com/MunifTanjim/nui.nvim)
If you like menus, you can install the dependency nui.menu and you will have enable a command `NomoMenu` to display options in a popup
![menu](assets/menu.png)
# Contributions
Contributions are more than welcome! Thanks to:
@gaardhus
@nfwyst