init
This commit is contained in:
36
nvim/lua/plugins/extras/util/pomo.lua
Normal file
36
nvim/lua/plugins/extras/util/pomo.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
{
|
||||
"epwalsh/pomo.nvim",
|
||||
cmd = { "TimerStart", "TimerStop", "TimerRepeat" },
|
||||
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,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user