44Table of Contents *auto-dark-mode-table-of-contents*
55
661. auto-dark-mode.nvim | auto-dark-mode-auto-dark-mode.nvim |
7- - Installation | auto-dark-mode-auto-dark-mode.nvim-installation |
8- - Requirements | auto-dark-mode-auto-dark-mode.nvim-requirements |
9- - Configuration | auto-dark-mode-auto-dark-mode.nvim-configuration |
10- - Thanks To | auto-dark-mode-auto-dark-mode.nvim-thanks-to |
11- 2. Support | auto-dark-mode-support |
12- 3 . Links | auto-dark-mode-links |
7+ - 📋 Requirements | auto-dark-mode-auto-dark-mode.nvim-📋-requirements |
8+ - 📦 Installation | auto-dark-mode-auto-dark-mode.nvim-📦-installation |
9+ - ⚙️ Configuration | auto-dark-mode-auto-dark-mode.nvim-⚙️ -configuration |
10+ - 🚀 Usage | auto-dark-mode-auto-dark-mode.nvim-🚀-usage |
11+ - 💖 Contributors | auto-dark-mode-auto-dark-mode.nvim-💖-contributors |
12+ 2 . Links | auto-dark-mode-links |
1313
1414==============================================================================
15151. auto-dark-mode.nvim *auto-dark-mode-auto-dark-mode.nvim*
@@ -18,100 +18,99 @@ A Neovim plugin for macOS, Linux, and Windows that automatically changes the
1818editor appearance based on system settings.
1919
2020
21- INSTALLATION *auto-dark-mode-auto-dark-mode.nvim-installation *
21+ 📋 REQUIREMENTS *auto-dark-mode-auto-dark-mode.nvim-📋-requirements *
2222
23+ Your operating system needs to be:
2324
24- USING VIM-PLUG ~
25-
26- >vim
27- Plug 'f-person/auto-dark-mode.nvim'
28- <
25+ - a Linux desktop environment that implements
26+ `org.freedesktop.appearance.color - scheme` <https://github.com/flatpak/xdg-desktop-portal/issues/629 >,
27+ such as
28+ - Gnome <https://gnome.org >
29+ - KDE <https://kde.org >
30+ - darkman <https://gitlab.com/WhyNotHugo/darkman > for window managers
31+ - macOS Mojave or newer
32+ - Windows 10 or newer (or WSL)
2933
3034
31- REQUIREMENTS *auto-dark-mode-auto-dark-mode.nvim-requirements *
35+ 📦 INSTALLATION *auto-dark-mode-auto-dark-mode.nvim-📦-installation *
3236
33- - macOS, a Linux environment that implements
34- `org.freedesktop.appearance.color - scheme` <https://github.com/flatpak/xdg-desktop-portal/issues/629 >,
35- Windows 10+ or WSL
36- - Neovim
37+ Install the plugin with your preferred package manager:
3738
3839
39- CONFIGURATION *auto-dark-mode-auto-dark-mode.nvim-configuration*
40+ LAZY.NVIM ~
4041
41- You need to call `setup` for initialization. `setup` accepts a table with
42- options – `set_dark_mode` function, `set_light_mode` function, and
43- `update_interval` integer.
42+ >lua
43+ -- Lua
44+ {
45+ "f-person/auto-dark-mode.nvim",
46+ opts = {
47+ -- your configuration comes here
48+ -- or leave it empty to use the default settings
49+ -- refer to the configuration section below
50+ }
51+ }
52+ <
4453
45- `set_dark_mode` is called when the system appearance changes to dark mode, and
46- `set_light_mode` is called when it changes to light mode. By default, they just
47- change the background option, but you can do whatever you like.
4854
49- `update_interval` is how frequently the system appearance is checked. The value
50- needs to be larger than whatever time your system takes to query dark mode.
51- Otherwise you risk freezing neovim on shutdown. The value is stored in
52- milliseconds. Defaults to `3000 ` .
55+ VIM-PLUG ~
5356
54- >lua
55- local auto_dark_mode = require('auto-dark-mode')
56-
57- auto_dark_mode.setup({
58- update_interval = 1000,
59- set_dark_mode = function()
60- vim.api.nvim_set_option_value('background' , 'dark' , {})
61- vim.cmd('colorscheme gruvbox')
62- end,
63- set_light_mode = function()
64- vim.api.nvim_set_option_value('background' , 'light' , {})
65- vim.cmd('colorscheme gruvbox')
66- end,
67- })
57+ >vim
58+ Plug 'f-person/auto-dark-mode.nvim'
6859<
6960
7061
71- USING LAZY ~
62+ ⚙️ CONFIGURATION *auto-dark-mode-auto-dark-mode.nvim-⚙️-configuration*
63+
64+ **auto-dark-mode** comes with the following defaults:
7265
7366>lua
74- return {
75- "f-person/auto-dark-mode.nvim",
76- opts = {
77- update_interval = 1000,
67+ {
7868 set_dark_mode = function()
79- vim.api.nvim_set_option_value("background", "dark", {})
80- vim.cmd("colorscheme gruvbox")
69+ vim.api.nvim_set_option_value("background", "dark", {})
8170 end,
8271 set_light_mode = function()
83- vim.api.nvim_set_option_value("background", "light", {})
84- vim.cmd("colorscheme gruvbox")
72+ vim.api.nvim_set_option_value("background", "light", {})
8573 end,
86- },
74+ update_interval = 3000,
75+ fallback = "dark"
8776 }
8877<
8978
79+ `set_dark_mode` and `set_light_mode` are the hooks called when the system
80+ appearance changes. By default, they change the | background | option, overriding
81+ the function allows for further customization.
9082
91- DISABLE
83+ `update_interval` is how frequently the system appearance is checked, in
84+ milliseconds. The value needs to be higher than the amount of milliseconds it
85+ takes to query your system for the dark mode state. Otherwise, you risk
86+ freezing neovim on shutdown.
9287
93- You can disable `auto- dark- mode .nvim` at runtime via `lua
94- require('auto-dark-mode').disable()`.
88+ `fallback` specifies the theme to use when the auto-detection fails. This can
89+ be particularly useful to specify a default version when remotely connecting
90+ via SSH, or when using neovim on a tty.
9591
9692
97- THANKS TO *auto-dark-mode-auto-dark-mode.nvim-thanks-to *
93+ 🚀 USAGE *auto-dark-mode-auto-dark-mode.nvim-🚀-usage *
9894
99- - @nekowinston <https://github.com/nekowinston > for implementing Linux support and other contributions! <3
100- - @adityamwagh <https://github.com/adityamwagh > for implementing Windows support
10195
96+ DISABLING AT RUNTIME ~
97+
98+ You can disable `auto- dark- mode .nvim` at runtime via `lua
99+ require('auto-dark-mode').disable()`.
102100
103- ==============================================================================
104- 2. Support *auto-dark-mode-support*
105101
106- If you enjoy the plugin and want to support what I do
102+ 💖 CONTRIBUTORS *auto-dark-mode-auto-dark-mode.nvim-💖-contributors*
107103
104+ <https://github.com/f-person/auto-dark-mode.nvim/graphs/contributors >
108105
106+ 👩🎤 Special thanks to @nekowinston <https://github.com/nekowinston > for
107+ maintaining the plugin 👩🎤
109108
110109==============================================================================
111- 3 . Links *auto-dark-mode-links*
110+ 2 . Links *auto-dark-mode-links*
112111
113- 1. *@nekowinston *:
114- 2. *@adityamwagh *:
112+ 1. **: https://contrib.rocks/image?repo=f-person/auto-dark-mode.nvim
113+ 2. *@nekowinston *:
115114
116115Generated by panvimdoc <https://github.com/kdheepak/panvimdoc >
117116
0 commit comments