Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ntbbloodbath/daylight.nvim
Automatic colorscheme/background switcher for Neovim based on your current time
https://github.com/ntbbloodbath/daylight.nvim
neovim theme-switcher
Last synced: 22 days ago
JSON representation
Automatic colorscheme/background switcher for Neovim based on your current time
- Host: GitHub
- URL: https://github.com/ntbbloodbath/daylight.nvim
- Owner: NTBBloodbath
- License: gpl-3.0
- Created: 2022-09-02T00:21:50.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-13T00:22:05.000Z (11 months ago)
- Last Synced: 2024-10-10T23:27:39.347Z (about 1 month ago)
- Topics: neovim, theme-switcher
- Language: Lua
- Homepage:
- Size: 48.8 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# `daylight.nvim`
`daylight.nvim` is an automatic colorscheme/background switcher for Neovim based on your current local time by using a
LibUV timer to check your current time by using an interval.## Installation
Using packer:
```lua
use({
"NTBBloodbath/daylight.nvim",
config = function()
require("daylight").setup({
day = {
name = vim.g.colors_name,
time = 8, -- 8 am
},
night = {
name = vim.g.colors_name,
time = 19, -- 7 pm, changes to dark theme on 07:01
},
interval = 60000, -- Time in milliseconds, 1 minute
})
end,
})
```## Usage
`daylight.nvim` should work automatically once it gets loaded. However, if you want to start/stop it manually you can
use the following commands:
- `DaylightStop`
- `DaylightStart`
- `DaylightToggle`**NOTE**: This only handles `daylight.nvim` timer!
## Acknowledgements
I did take [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) `types/types.d.tl` file to be able to use
Neovim API (`vim` metatable) in Teal.## License
As always, this project is licensed under [GPLv3](./LICENSE) license.