auto dark/light theme (from darkman)

This commit is contained in:
Miguel Palhas
2026-02-16 16:39:45 +00:00
parent fe1d5bdc83
commit a16bb42a45
6 changed files with 96 additions and 1 deletions
+14 -1
View File
@@ -2,6 +2,19 @@
-- https://github.com/NvChad/ui/blob/v2.5/lua/nvconfig.lua
-- Please read that file to know all available options :(
-- Get system theme from darkman
local function get_system_theme()
local handle = io.popen("darkman get 2>/dev/null")
if handle then
local result = handle:read("*a")
handle:close()
if result and result:match("light") then
return "onenord_light"
end
end
return "onenord" -- default dark theme
end
---@type ChadrcConfig
local M = {
ui = {
@@ -10,7 +23,7 @@ local M = {
},
},
base46 = {
theme = "onenord",
theme = get_system_theme(),
},
nvdash = {