refactor: Set light/dark mode more concisely

main
Amanda Graven 2023-01-20 21:40:16 +01:00
parent ddefe39274
commit f453a3f2ec
Signed by: amanda
GPG Key ID: F747582C5608F4CB
1 changed files with 2 additions and 4 deletions

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