✨ feat(nvim): added pomo extra
pomodoro plugin
This commit is contained in:
parent
b1e9679621
commit
3a92a180cb
2 changed files with 40 additions and 2 deletions
|
@ -73,4 +73,3 @@
|
||||||
},
|
},
|
||||||
"version": 2
|
"version": 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
39
.config/nvim/lua/plugins/extras/util/pomo.lua
Normal file
39
.config/nvim/lua/plugins/extras/util/pomo.lua
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"epwalsh/pomo.nvim",
|
||||||
|
cmd = { "TimerStart", "TimerStop", "TimerRepeat" },
|
||||||
|
dependencies = {
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
notifiers = {
|
||||||
|
{
|
||||||
|
name = "Default",
|
||||||
|
opts = {
|
||||||
|
sticky = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
local function pomoTimer()
|
||||||
|
local ok, pomo = pcall(require, "pomo")
|
||||||
|
if not ok then
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
|
||||||
|
local timer = pomo.get_first_to_finish()
|
||||||
|
if timer == nil then
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
|
||||||
|
return " " .. tostring(timer)
|
||||||
|
end
|
||||||
|
table.insert(opts.sections.lualine_x, { pomoTimer })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue