index.md - sites - public wiki contents of suckless.org
(HTM) git clone git://git.suckless.org/sites
(DIR) Log
(DIR) Files
(DIR) Refs
---
index.md (1753B)
---
1 autodarkmode
2 ============
3
4 Description
5 -----------
6 This patch lets you define separate dark and light color schemes, and
7 provides a way to switch between them automatically.
8
9 If dwm finds a file named `.lightmode` in your home directory it will
10 start up in light mode, otherwise it uses dark mode. dwm re-checks for
11 this file upon receiving SIGHUP, so you can use tools like
12 [darkman](https://darkman.whynothugo.nl/) or
13 [Redshift](http://jonls.dk/redshift/) to change dwm's colors at sunset
14 and sunrise.
15
16 An example setup is described
17 [here](https://plexwave.org/blog/auto-dark-mode).
18
19 Configuration
20 -------------
21 static const char *colorsdark[][3] = {
22 /* fg bg border */
23 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
24 [SchemeSel] = { col_gray4, col_cyan, col_cyan },
25 };
26 static const char *colorslight[][3] = {
27 /* fg bg border */
28 [SchemeNorm] = { col_gray1, col_gray3, col_gray2 },
29 [SchemeSel] = { col_cyan, col_gray4, col_cyan },
30 };
31
32 static const char *dmenudark[] = { "dmenu_run", "-m", dmenumon, "-i", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
33 static const char *dmenulight[] = { "dmenu_run", "-m", dmenumon, "-i", "-fn", dmenufont, "-nb", col_gray3, "-nf", col_gray1, "-sb", col_cyan, "-sf", col_gray4, NULL };
34
35 /* You must use spawndmenu instead of spawn for your dmenu bindings */
36 static const Key keys[] = {
37 { MODKEY, XK_p, spawndmenu, {0} },
38 }
39
40 Download
41 --------
42 * [dwm-autodarkmode-20250224-6.5.diff](dwm-autodarkmode-20250224-6.5.diff)
43
44 Author
45 ------
46 * Spencer Williams - <spnw@plexwave.org>