Auto light and dark mode

This commit is contained in:
2025-02-13 21:41:22 -05:00
parent ab5cc25c44
commit e357644563
6 changed files with 31 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
{
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
"auto-dark-mode.nvim": { "branch": "master", "commit": "02ef9553e2a1d6e861bc6955d58ce5883d28a6ad" },
"cloak.nvim": { "branch": "main", "commit": "648aca6d33ec011dc3166e7af3b38820d01a71e4" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
@@ -16,6 +17,7 @@
"neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" },
"neotest-rspec": { "branch": "main", "commit": "f8c91edc5dd87ca467a624652f365ac217d7cc1c" },
"nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-dap": { "branch": "master", "commit": "52302f02fea3a490e55475de52fa4deb8af2eb11" },
"nvim-dap-ruby": { "branch": "main", "commit": "93cae460d1a9bced94cf7b45748351b6cddd4ab4" },
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },

View File

@@ -0,0 +1,15 @@
return {
'f-person/auto-dark-mode.nvim',
lazy = false,
opts = {
update_interval = 3000,
set_dark_mode = function()
vim.api.nvim_set_option_value("background", "dark", {})
vim.cmd.colorscheme('tempus_classic')
end,
set_light_mode = function()
vim.api.nvim_set_option_value("background", "light", {})
vim.cmd.colorscheme('tempus_past')
end,
}
}

View File

@@ -0,0 +1,8 @@
return {
'norcalli/nvim-colorizer.lua',
config = function()
vim.opt.termguicolors = true
require('colorizer').setup()
end,
}

View File

@@ -38,5 +38,3 @@ vim.api.nvim_create_autocmd(
end,
}
)
vim.cmd.colorscheme('tempus_past')

View File

@@ -23,7 +23,7 @@ brights = [
cursor_bg = "#ff76ff"
cursor_border = "#ff76ff"
cursor_fg = "#53545b"
background = "f3f2f4"
background = "#f3f2f4"
foreground = "#53545b"
selection_bg = "#53545b"
selection_fg = "#f3f2f4"

View File

@@ -1,3 +1,6 @@
local LIGHT_THEME = 'Tempus Past'
local DARK_THEME = 'Tempus Classic'
local wezterm = require('wezterm')
local config = wezterm.config_builder()
config.font = wezterm.font('TX-02')
@@ -12,9 +15,9 @@ end
local function scheme_for_appearance(appearance)
if appearance:find 'Dark' then
return 'Tempus Classic'
return DARK_THEME
else
return 'Tempus Past'
return LIGHT_THEME
end
end