☀️ You're coding during the day and don't want to max out the brightness of your screen and drain your battery just to see the code you are writing, so you use a light colorscheme.
🌙 During the night, a light colorscheme is too bright so you change back to a night-themed colorscheme, but manually switching is annoying!
- right-mode.nvim is the best of light mode and night mode, switching your colorscheme for you based on the time of day!
- As a bonus, since there are so many beautiful colorschemes, it will randomize the colorscheme for day and night so you don't have to choose just one theme to use!
lazy.nvim
{
"rohitpoduval1/right-mode.nvim",
config = function()
require("right-mode").setup({
light_themes = { },
dark_themes = { },
day_start = 8, -- Light theme starting from 8 AM
night_start = 20, -- Dark theme starting from 8 PM
})
end,
}packer.nvim
use {
"rohitpoduval1/right-mode",
config = function()
require("right-mode").setup({
light_themes = { },
dark_themes = { },
day_start = 8, -- Light theme starting from 8 AM
night_start = 20, -- Dark theme starting from 8 PM
})
end
}It is highly recommended to call right-mode.setup() for the best experience, although the plugin will still work without it.
Default Configuration
require("right-mode").setup({
light_themes = { }, -- Your desired colorschemes as strings separated by commas
dark_themes = { },
day_start = 8, -- Light theme starting from 8 AM
night_start = 20, -- Dark theme starting from 8 PM
})Example Configuration
require("right-mode").setup({
light_themes = { "kanagawa-lotus", "catppuccin-latte" },
dark_themes = { "kanagawa-dragon" },
day_start = 8, -- Light theme starting from 8 AM
night_start = 20, -- Dark theme starting from 8 PM
})- right-mode will randomize from the given list of installed colorschemes starting light mode from
day_startand starting night mode fromnight_start, both of which are in a 24 hour time format. - If the arguments for
light_themesanddark_themesare empty, right-mode will randomize from the list of installed colorschemes. (It is possible to have just 1 colorscheme inlight_themesordark_themesif you prefer)