Update README with auto dark mode info
This commit is contained in:
parent
7187d52ee6
commit
84ac855934
1 changed files with 34 additions and 0 deletions
34
README.md
34
README.md
|
@ -31,3 +31,37 @@ git config --global user.email "$GIT_AUTHOR_EMAIL"
|
||||||
|
|
||||||
Run `./boostrap.sh`, this will create all the necessary symlinks, then source
|
Run `./boostrap.sh`, this will create all the necessary symlinks, then source
|
||||||
`.zshrc`. This is a **destructive** process, so backup your dotfiles first.
|
`.zshrc`. This is a **destructive** process, so backup your dotfiles first.
|
||||||
|
|
||||||
|
## Auto switch between light and dark mode
|
||||||
|
|
||||||
|
To switch between dark and light mode automatically, we use a helper lib.
|
||||||
|
|
||||||
|
Clone it from `https://github.com/bouk/dark-mode-notify` then run `make` and `make install`.
|
||||||
|
|
||||||
|
Then make a script to run is automatically, put the plist where your system can find it: `~/Library/LaunchAgents/ke.bou.dark-mode-notify.plist` with the following content:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
|
||||||
|
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>Label</key>
|
||||||
|
<string>ke.bou.dark-mode-notify</string>
|
||||||
|
<key>KeepAlive</key>
|
||||||
|
<true/>
|
||||||
|
<key>StandardErrorPath</key>
|
||||||
|
<string>/Users/jonny/.local/var/log/dark-mode-notify-stderr.log</string>
|
||||||
|
<key>StandardOutPath</key>
|
||||||
|
<string>/Users/jonny/.local/var/log/dark-mode-notify-stdout.log</string>
|
||||||
|
<key>ProgramArguments</key>
|
||||||
|
<array>
|
||||||
|
<string>/usr/local/bin/dark-mode-notify</string>
|
||||||
|
<string>/Users/jonny/git/dotfiles/zsh/dark-mode-notify.zsh</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
```
|
||||||
|
|
||||||
|
Make the log file and script file point to the right location. For clarity `dark-mode-notify.zsh` is in this repo.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue