https://github.com/cosmicboots/system-theme.nvim
Keep Neovim in sync with your system color scheme
https://github.com/cosmicboots/system-theme.nvim
neovim neovim-plugin theme-switching
Last synced: 2 months ago
JSON representation
Keep Neovim in sync with your system color scheme
- Host: GitHub
- URL: https://github.com/cosmicboots/system-theme.nvim
- Owner: cosmicboots
- License: mit
- Created: 2024-07-04T05:27:25.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-31T05:15:12.000Z (almost 2 years ago)
- Last Synced: 2025-08-20T04:40:00.188Z (11 months ago)
- Topics: neovim, neovim-plugin, theme-switching
- Language: Lua
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# system-theme.nvim
This plugin uses system D-Bus messages to automatically switch Neovim between
light and dark modes.
## Installation
Because this plugin depends on [Luarocks](https://luarocks.org/) packages, it's
recommended to install using [lazy.nvim](https://github.com/folke/lazy.nvim)
(version 11.x or later):
```lua
{
"cosmicboots/system-theme.nvim",
config = {
dark_theme = "sorbet",
light_theme = "morning",
},
}
```
## Configuration
The configuration passed into the setup function follows this format:
```lua
{
light_theme = "your-light-theme", -- Light theme to use
dark_theme = "your-dark-theme", -- Dark theme to use
hooks = {
light = function()
-- This is run after the light theme is applied
end,
dark = function()
-- This is run after the dark theme is applied
end,
},
}
```
All settings are optional. If `light_theme` or `dark_theme`
aren't set, the global vim variables `g:light_theme` and
`g:dark_theme` will be used, respectively.
## Usage
This plugin will try to stay out of your way.
If you need to terminate the thread processing system D-Bus messages, the
`:SysThemeDbusKill` command is provided. This will prevent the plugin from
listening for system theme changes until Neovim is restarted.