mirror of
https://github.com/NotAShelf/specs.nvim.git
synced 2024-12-29 06:02:24 +00:00
Add new exponential fader
This commit is contained in:
parent
29a51d432c
commit
aa5bd1fba4
1 changed files with 11 additions and 3 deletions
|
@ -52,6 +52,17 @@ function M.linear_fader(win_id, cnt)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--[[ ▁▁▁▁▂▂▂▃▃▃▄▄▅▆▇ ]]--
|
||||||
|
|
||||||
|
function M.exp_fader(win_id, cnt)
|
||||||
|
local new_bl = math.floor(opts.popup.blend+math.exp(cnt/10))
|
||||||
|
if new_bl < 100 then
|
||||||
|
vim.api.nvim_win_set_option(win_id, "winblend", new_bl)
|
||||||
|
return false
|
||||||
|
else return true end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--[[ ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁ ]]--
|
--[[ ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁ ]]--
|
||||||
|
|
||||||
function M.pulse_fader(win_id, cnt)
|
function M.pulse_fader(win_id, cnt)
|
||||||
|
@ -65,9 +76,6 @@ function M.pulse_fader(win_id, cnt)
|
||||||
else return true end
|
else return true end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- function M.exp_fader()
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
|
|
||||||
--[[ ░░▒▒▓█████▓▒▒░░ ]]--
|
--[[ ░░▒▒▓█████▓▒▒░░ ]]--
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue