pommodoro-clock.nvim
pommodoro-clock.nvim copied to clipboard
Make the size configurable?
Firstly absolutely love the styling of this plugin, however I'd love to make it a bit smaller via options if possible? Or would this break the ASCII art?
First: Love this - been looking for a good pommodoro timer for a while. Thanks for building this!
I have the same issue. Even better if there was an option to show the timer in lualine instead on top of buffer, so that it stays in there discreetly and out of the way.
you should change the size of the ASCII art itself:
in utils.lua
file replace these numbers
local M = {}
local zero = [[
█▀▀█
█ █
█▄▄█
]]
local one = [[
▄█░
░░█░
░▄█▄
]]
local two = [[
░█▀█
░▄▀
░█▄▄
]]
local tree = [[
█▀▀█
░░▀▄
█▄▄█
]]
local four = [[
░█▀█
█▄▄█
░░░█
]]
local five = [[
█▀▀
▀▀▄
░▄▄▀
]]
local six = [[
▄▀▀▄
█▄▄░
▀▄▄▀
]]
local seven = [[
▀▀▀█
░░█░
░▐▌░
]]
local eight = [[
███
█ █
█ █
███
]]
local nine = [[
▄▀▀▄
▀▄▄█
░▄▄▀
]]
local separator = [[
▄
░
▀
]]
local clock = [[
██
]]
local chars = {
["0"] = zero,
["1"] = one,
["2"] = two,
["3"] = tree,
["4"] = four,
["5"] = five,
["6"] = six,
["7"] = seven,
["8"] = eight,
["9"] = nine,
[":"] = separator,
["c"] = clock,
}
M.split_string_by_line = function(text)
local lines = {}
for line in text:gmatch("([^\n]*)\n?") do
table.insert(lines, line)
end
return lines
end
M.str_to_ascii = function(str)
local lines = {
{},
{},
{},
{},
}
for _, s in ipairs(str) do
local char = chars[s]
local char_lines = M.split_string_by_line(char)
for i, line in ipairs(char_lines) do
table.insert(lines[i], line)
end
end
return {
table.concat(lines[1], " "),
table.concat(lines[2], " "),
table.concat(lines[3], " "),
}
end
return M