https://github.com/cormacrelf/dark-notify
Watcher for macOS 10.14+ light/dark mode changes
https://github.com/cormacrelf/dark-notify
macos neovim
Last synced: 24 days ago
JSON representation
Watcher for macOS 10.14+ light/dark mode changes
- Host: GitHub
- URL: https://github.com/cormacrelf/dark-notify
- Owner: cormacrelf
- Created: 2020-09-17T09:05:00.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-05-26T00:34:58.000Z (about 2 months ago)
- Last Synced: 2025-05-26T01:32:34.222Z (about 2 months ago)
- Topics: macos, neovim
- Language: Rust
- Homepage:
- Size: 4.53 MB
- Stars: 200
- Watchers: 3
- Forks: 18
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dark-notify
It's a program for watching when macOS switches to dark mode. Useful for making
your text editor switch to a dark theme. Includes a Neovim (Lua) plugin to do
exactly that.
## Install
```sh
brew install cormacrelf/tap/dark-notify
```## Neovim usage
Requires neovim 0.4.4 or later.
Add a plugin with your favourite plugin manager:
```vim
Plug 'cormacrelf/dark-notify'
```Then add to your `init.vim`:
```
:lua < :lua require('dark_notify').toggle()
```### What if I just want the toggle functionality / am not on macOS?
Use the configure function instead.
```vim
:lua < General, switch back and forth
dark
light
dark
# ... ctrl-C to quit.
```You can also run another command whenever it changes:
```sh
$ dark-notify -c 'echo something'
something light
something dark
$ dark-notify -c 'python3 my-script.py'
````dark-notify -h` for more options.