Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 2 months ago
JSON representation

Watcher for macOS 10.14+ light/dark mode changes

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.

![Demo gif](demo.gif)

## 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.