refactor: Set light/dark mode more concisely

This commit is contained in:
Amanda Graven 2023-01-20 21:40:16 +01:00
parent ddefe39274
commit f453a3f2ec
Signed by: amanda
GPG key ID: F747582C5608F4CB

View file

@ -68,10 +68,8 @@ end
if vim.fn.executable('darkman') then
local mode = vim.trim(vim.fn.system('darkman get'))
if mode == 'dark' then
vim.o.background = 'dark'
elseif mode == 'light' then
vim.o.background = 'light'
if mode == 'dark' or mode == 'light' then
vim.o.background = mode
end
end