feat(toggle): added zoom toggle

This commit is contained in:
Folke Lemaitre 2024-12-12 07:28:07 +01:00
parent 63506d5168
commit 3367705813
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -352,4 +352,21 @@ function M.zen()
})
end
function M.zoom()
return M.new({
id = "zoom",
name = "Zoom Mode",
get = function()
return Snacks.zen.win and Snacks.zen.win:valid() or false
end,
set = function(state)
if state then
Snacks.zen.zoom()
elseif Snacks.zen.win then
Snacks.zen.win:close()
end
end,
})
end
return M