refactor: Set light/dark mode more concisely
This commit is contained in:
parent
ddefe39274
commit
f453a3f2ec
6
init.lua
6
init.lua
|
@ -68,10 +68,8 @@ end
|
||||||
|
|
||||||
if vim.fn.executable('darkman') then
|
if vim.fn.executable('darkman') then
|
||||||
local mode = vim.trim(vim.fn.system('darkman get'))
|
local mode = vim.trim(vim.fn.system('darkman get'))
|
||||||
if mode == 'dark' then
|
if mode == 'dark' or mode == 'light' then
|
||||||
vim.o.background = 'dark'
|
vim.o.background = mode
|
||||||
elseif mode == 'light' then
|
|
||||||
vim.o.background = 'light'
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue