From f453a3f2ec6df0d343ea6ffaf9232c3f73301ec6 Mon Sep 17 00:00:00 2001 From: Amanda Graven Date: Fri, 20 Jan 2023 21:40:16 +0100 Subject: [PATCH] refactor: Set light/dark mode more concisely --- init.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index ca1df3d..a49c56a 100644 --- a/init.lua +++ b/init.lua @@ -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