[dwm][patches][flyschemes] DWM 6.7 update - sites - public wiki contents of suckless.org
HTML git clone git://git.suckless.org/sites
DIR Log
DIR Files
DIR Refs
---
DIR commit ba0a830e67eea5fe7ac718fd641869aa4941386c
DIR parent ec43643a1702093a1a8042db9e7ac656fb10bfcb
HTML Author: faradayawerty <faradayawerty@gmail.com>
Date: Mon, 12 Jan 2026 17:08:32 +0300
[dwm][patches][flyschemes] DWM 6.7 update
Diffstat:
A dwm.suckless.org/patches/flyscheme… | 440 +++++++++++++++++++++++++++++++
A dwm.suckless.org/patches/flyscheme… | 206 +++++++++++++++++++++++++++++++
M dwm.suckless.org/patches/flyscheme… | 12 +++++++++---
3 files changed, 655 insertions(+), 3 deletions(-)
---
DIR diff --git a/dwm.suckless.org/patches/flyschemes/dwm-flyschemes-6.7-alpha.diff b/dwm.suckless.org/patches/flyschemes/dwm-flyschemes-6.7-alpha.diff
@@ -0,0 +1,440 @@
+diff -upN dwm-6.7/config.def.h dwm-6.7-patched-flyschemes-alpha/config.def.h
+--- dwm-6.7/config.def.h 2026-01-10 13:33:58.160268753 +0300
++++ dwm-6.7-patched-flyschemes-alpha/config.def.h 2026-01-12 17:04:07.189883454 +0300
+@@ -7,16 +7,22 @@ static const int showbar = 1;
+ static const int topbar = 1; /* 0 means bottom bar */
+ static const char *fonts[] = { "monospace:size=10" };
+ static const char dmenufont[] = "monospace:size=10";
+-static const char col_gray1[] = "#222222";
+-static const char col_gray2[] = "#444444";
+-static const char col_gray3[] = "#bbbbbb";
+-static const char col_gray4[] = "#eeeeee";
+-static const char col_cyan[] = "#005577";
+-static const char *colors[][3] = {
+- /* fg bg border */
+- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
+- [SchemeSel] = { col_gray4, col_cyan, col_cyan },
+-};
++static unsigned int baralpha = 0xd0;
++static unsigned int borderalpha = OPAQUE;
++
++#include "flyschemes.h"
++
++static const char *(*flyschemes[])[3] = {
++ flyscheme_default,
++ flyscheme_light,
++ flyscheme_plan9,
++ flyscheme_dracula,
++ flyscheme_solarized,
++ flyscheme_nord,
++ flyscheme_gruvbox,
++ flyscheme_cyberpunk,
++ NULL /* used to count the number of flyschemes */
++ };
+
+ /* tagging */
+ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+@@ -58,7 +64,16 @@ static const Layout layouts[] = {
+
+ /* commands */
+ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
+-static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
++static const char *dmenucmd[] = {
++ "dmenu_run",
++ "-m", dmenumon,
++ "-fn", dmenufont,
++ "-nb", "#222222", /* changed as dmenucmd[6] in cycle_flyschemes */
++ "-nf", "#bbbbbb", /* changed as dmenucmd[8] in cycle_flyschemes */
++ "-sb", "#005577", /* changed as dmenucmd[10] in cycle_flyschemes */
++ "-sf", "#eeeeee", /* changed as dmenucmd[12] in cycle_flyschemes */
++ NULL
++};
+ static const char *termcmd[] = { "st", NULL };
+
+ static const Key keys[] = {
+@@ -74,7 +89,9 @@ static const Key keys[] = {
+ { MODKEY, XK_l, setmfact, {.f = +0.05} },
+ { MODKEY, XK_Return, zoom, {0} },
+ { MODKEY, XK_Tab, view, {0} },
+- { MODKEY|ShiftMask, XK_c, killclient, {0} },
++ { MODKEY|ShiftMask, XK_x, killclient, {0} },
++ { MODKEY, XK_c, cycle_flyschemes, { .i = +1 } },
++ { MODKEY|ShiftMask, XK_c, cycle_flyschemes, { .i = -1 } },
+ { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
+ { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
+ { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
+diff -upN dwm-6.7/config.mk dwm-6.7-patched-flyschemes-alpha/config.mk
+--- dwm-6.7/config.mk 2026-01-10 13:33:58.160268753 +0300
++++ dwm-6.7-patched-flyschemes-alpha/config.mk 2026-01-12 16:59:37.803221192 +0300
+@@ -23,7 +23,7 @@ FREETYPEINC = /usr/include/freetype2
+
+ # includes and libs
+ INCS = -I${X11INC} -I${FREETYPEINC}
+-LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
++LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXrender
+
+ # flags
+ CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
+diff -upN dwm-6.7/drw.c dwm-6.7-patched-flyschemes-alpha/drw.c
+--- dwm-6.7/drw.c 2026-01-10 13:33:58.160268753 +0300
++++ dwm-6.7-patched-flyschemes-alpha/drw.c 2026-01-12 17:00:40.136553503 +0300
+@@ -47,7 +47,7 @@ utf8decode(const char *s_in, long *u, in
+ }
+
+ Drw *
+-drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h)
++drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h, Visual *visual, unsigned int depth, Colormap cmap)
+ {
+ Drw *drw = ecalloc(1, sizeof(Drw));
+
+@@ -56,8 +56,11 @@ drw_create(Display *dpy, int screen, Win
+ drw->root = root;
+ drw->w = w;
+ drw->h = h;
+- drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
+- drw->gc = XCreateGC(dpy, root, 0, NULL);
++ drw->visual = visual;
++ drw->depth = depth;
++ drw->cmap = cmap;
++ drw->drawable = XCreatePixmap(dpy, root, w, h, depth);
++ drw->gc = XCreateGC(dpy, drw->drawable, 0, NULL);
+ XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
+
+ return drw;
+@@ -73,7 +76,7 @@ drw_resize(Drw *drw, unsigned int w, uns
+ drw->h = h;
+ if (drw->drawable)
+ XFreePixmap(drw->dpy, drw->drawable);
+- drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen));
++ drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, drw->depth);
+ }
+
+ void
+@@ -167,20 +170,20 @@ drw_fontset_free(Fnt *font)
+ }
+
+ void
+-drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
++drw_clr_create(Drw *drw, Clr *dest, const char *clrname, unsigned int alpha)
+ {
+ if (!drw || !dest || !clrname)
+ return;
+
+- if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen),
+- DefaultColormap(drw->dpy, drw->screen),
++ if (!XftColorAllocName(drw->dpy, drw->visual, drw->cmap,
+ clrname, dest))
+ die("error, cannot allocate color '%s'", clrname);
++ dest->pixel = (dest->pixel & 0x00ffffffU) | (alpha << 24);
+ }
+
+ /* Create color schemes. */
+ Clr *
+-drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
++drw_scm_create(Drw *drw, const char *clrnames[], const unsigned int clralphas[], size_t clrcount)
+ {
+ size_t i;
+ Clr *ret;
+@@ -190,7 +193,7 @@ drw_scm_create(Drw *drw, const char *clr
+ return NULL;
+
+ for (i = 0; i < clrcount; i++)
+- drw_clr_create(drw, &ret[i], clrnames[i]);
++ drw_clr_create(drw, &ret[i], clrnames[i], clralphas[i]);
+ return ret;
+ }
+
+@@ -273,9 +276,7 @@ drw_text(Drw *drw, int x, int y, unsigne
+ XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
+ if (w < lpad)
+ return x + w;
+- d = XftDrawCreate(drw->dpy, drw->drawable,
+- DefaultVisual(drw->dpy, drw->screen),
+- DefaultColormap(drw->dpy, drw->screen));
++ d = XftDrawCreate(drw->dpy, drw->drawable, drw->visual, drw->cmap);
+ x += lpad;
+ w -= lpad;
+ }
+diff -upN dwm-6.7/drw.h dwm-6.7-patched-flyschemes-alpha/drw.h
+--- dwm-6.7/drw.h 2026-01-10 13:33:58.160268753 +0300
++++ dwm-6.7-patched-flyschemes-alpha/drw.h 2026-01-12 17:01:51.859885671 +0300
+@@ -20,6 +20,9 @@ typedef struct {
+ Display *dpy;
+ int screen;
+ Window root;
++ Visual *visual;
++ unsigned int depth;
++ Colormap cmap;
+ Drawable drawable;
+ GC gc;
+ Clr *scheme;
+@@ -27,7 +30,7 @@ typedef struct {
+ } Drw;
+
+ /* Drawable abstraction */
+-Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
++Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h, Visual *visual, unsigned int depth, Colormap cmap);
+ void drw_resize(Drw *drw, unsigned int w, unsigned int h);
+ void drw_free(Drw *drw);
+
+@@ -39,10 +42,10 @@ unsigned int drw_fontset_getwidth_clamp(
+ void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
+
+ /* Colorscheme abstraction */
+-void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
+ void drw_clr_free(Drw *drw, Clr *c);
+-Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount);
+ void drw_scm_free(Drw *drw, Clr *scm, size_t clrcount);
++void drw_clr_create(Drw *drw, Clr *dest, const char *clrname, unsigned int alpha);
++Clr *drw_scm_create(Drw *drw, const char *clrnames[], const unsigned int clralphas[], size_t clrcount);
+
+ /* Cursor abstraction */
+ Cur *drw_cur_create(Drw *drw, int shape);
+diff -upN dwm-6.7/dwm.1 dwm-6.7-patched-flyschemes-alpha/dwm.1
+--- dwm-6.7/dwm.1 2026-01-10 13:33:58.160268753 +0300
++++ dwm-6.7-patched-flyschemes-alpha/dwm.1 2026-01-12 17:02:25.176551788 +0300
+@@ -113,9 +113,15 @@ Decrease master area size.
+ .B Mod1\-Return
+ Zooms/cycles focused window to/from master area (tiled layouts only).
+ .TP
+-.B Mod1\-Shift\-c
++.B Mod1\-Shift\-x
+ Close focused window.
+ .TP
++.B Mod1\-c
++Cycle flyscheme.
++.TP
++.B Mod1\-Shift\-c
++Cycle flyscheme back.
++.TP
+ .B Mod1\-Shift\-space
+ Toggle focused window between tiled and floating state.
+ .TP
+diff -upN dwm-6.7/dwm.c dwm-6.7-patched-flyschemes-alpha/dwm.c
+--- dwm-6.7/dwm.c 2026-01-10 13:33:58.160268753 +0300
++++ dwm-6.7-patched-flyschemes-alpha/dwm.c 2026-01-12 17:02:48.619884740 +0300
+@@ -56,6 +56,8 @@
+ #define TAGMASK ((1 << LENGTH(tags)) - 1)
+ #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
+
++#define OPAQUE 0xffU
++
+ /* enums */
+ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
+ enum { SchemeNorm, SchemeSel }; /* color schemes */
+@@ -141,6 +143,8 @@ typedef struct {
+ } Rule;
+
+ /* function declarations */
++static void cycle_flyschemes(const Arg *arg);
++static void update_scheme();
+ static void applyrules(Client *c);
+ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact);
+ static void arrange(Monitor *m);
+@@ -231,9 +235,11 @@ static Monitor *wintomon(Window w);
+ static int xerror(Display *dpy, XErrorEvent *ee);
+ static int xerrordummy(Display *dpy, XErrorEvent *ee);
+ static int xerrorstart(Display *dpy, XErrorEvent *ee);
++static void xinitvisual(void);
+ static void zoom(const Arg *arg);
+
+ /* variables */
++static unsigned int iflysch = 0;
+ static const char broken[] = "broken";
+ static char stext[256];
+ static int screen;
+@@ -266,6 +272,10 @@ static Display *dpy;
+ static Drw *drw;
+ static Monitor *mons, *selmon;
+ static Window root, wmcheckwin;
++static int useargb = 0;
++static Visual *visual;
++static int depth;
++static Colormap cmap;
+
+ /* configuration, allows nested code to access above variables */
+ #include "config.h"
+@@ -485,7 +495,7 @@ cleanup(void)
+ cleanupmon(mons);
+ for (i = 0; i < CurLast; i++)
+ drw_cur_free(drw, cursor[i]);
+- for (i = 0; i < LENGTH(colors); i++)
++ for (i = 0; i < LENGTH(flyscheme_default); i++)
+ drw_scm_free(drw, scheme[i], 3);
+ free(scheme);
+ XDestroyWindow(dpy, wmcheckwin);
+@@ -1558,7 +1568,8 @@ setup(void)
+ sw = DisplayWidth(dpy, screen);
+ sh = DisplayHeight(dpy, screen);
+ root = RootWindow(dpy, screen);
+- drw = drw_create(dpy, screen, root, sw, sh);
++ xinitvisual();
++ drw = drw_create(dpy, screen, root, sw, sh, visual, depth, cmap);
+ if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
+ die("no fonts could be loaded.");
+ lrpad = drw->fonts->h;
+@@ -1584,9 +1595,10 @@ setup(void)
+ cursor[CurResize] = drw_cur_create(drw, XC_sizing);
+ cursor[CurMove] = drw_cur_create(drw, XC_fleur);
+ /* init appearance */
+- scheme = ecalloc(LENGTH(colors), sizeof(Clr *));
+- for (i = 0; i < LENGTH(colors); i++)
+- scheme[i] = drw_scm_create(drw, colors[i], 3);
++ unsigned int alphas[] = {borderalpha, baralpha, OPAQUE};
++ scheme = ecalloc(LENGTH(flyscheme_default), sizeof(Clr *));
++ for (i = 0; i < LENGTH(flyscheme_default); i++)
++ scheme[i] = drw_scm_create(drw, flyscheme_default[i], alphas, 3);
+ /* init bars */
+ updatebars();
+ updatestatus();
+@@ -1821,16 +1833,18 @@ updatebars(void)
+ Monitor *m;
+ XSetWindowAttributes wa = {
+ .override_redirect = True,
+- .background_pixmap = ParentRelative,
++ .background_pixel = 0,
++ .border_pixel = 0,
++ .colormap = cmap,
+ .event_mask = ButtonPressMask|ExposureMask
+ };
+ XClassHint ch = {"dwm", "dwm"};
+ for (m = mons; m; m = m->next) {
+ if (m->barwin)
+ continue;
+- m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen),
+- CopyFromParent, DefaultVisual(dpy, screen),
+- CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
++ m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, depth,
++ InputOutput, visual,
++ CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &wa);
+ XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor);
+ XMapRaised(dpy, m->barwin);
+ XSetClassHint(dpy, m->barwin, &ch);
+@@ -2129,6 +2143,43 @@ xerrorstart(Display *dpy, XErrorEvent *e
+ }
+
+ void
++xinitvisual(void)
++{
++ XVisualInfo *infos;
++ XRenderPictFormat *fmt;
++ int nitems;
++ int i;
++
++ XVisualInfo tpl = {
++ .screen = screen,
++ .depth = 32,
++ .class = TrueColor
++ };
++ long masks = VisualScreenMask | VisualDepthMask | VisualClassMask;
++
++ infos = XGetVisualInfo(dpy, masks, &tpl, &nitems);
++ visual = NULL;
++ for(i = 0; i < nitems; i++) {
++ fmt = XRenderFindVisualFormat(dpy, infos[i].visual);
++ if (fmt->type == PictTypeDirect && fmt->direct.alphaMask) {
++ visual = infos[i].visual;
++ depth = infos[i].depth;
++ cmap = XCreateColormap(dpy, root, visual, AllocNone);
++ useargb = 1;
++ break;
++ }
++ }
++
++ XFree(infos);
++
++ if (!visual) {
++ visual = DefaultVisual(dpy, screen);
++ depth = DefaultDepth(dpy, screen);
++ cmap = DefaultColormap(dpy, screen);
++ }
++}
++
++void
+ zoom(const Arg *arg)
+ {
+ Client *c = selmon->sel;
+@@ -2140,6 +2191,37 @@ zoom(const Arg *arg)
+ pop(c);
+ }
+
++void
++update_scheme()
++{
++ unsigned int alphas[] = {borderalpha, baralpha, OPAQUE};
++ scheme[SchemeNorm] = drw_scm_create(drw, flyschemes[iflysch][SchemeNorm], alphas, 3);
++ scheme[SchemeSel] = drw_scm_create(drw, flyschemes[iflysch][SchemeSel], alphas, 3);
++ dmenucmd[6] = flyschemes[iflysch][SchemeNorm][1];
++ dmenucmd[8] = flyschemes[iflysch][SchemeNorm][0];
++ dmenucmd[10] = flyschemes[iflysch][SchemeSel][1];
++ dmenucmd[12] = flyschemes[iflysch][SchemeSel][0];
++ Client *cl = selmon->sel;
++ Client *c;
++ Monitor *m;
++ for (m = mons; m; m = m->next)
++ for (c = m->clients; c; c = c->next)
++ focus(c);
++ focus(cl);
++}
++
++void
++cycle_flyschemes(const Arg *arg)
++{
++ int flyschemes_limit = 256;
++ int i;
++ for(i = 0; flyschemes[i] != NULL && i < flyschemes_limit; i++)
++ ;
++ iflysch += i + arg->i;
++ iflysch %= i;
++ update_scheme();
++}
++
+ int
+ main(int argc, char *argv[])
+ {
+diff -upN dwm-6.7/flyschemes.h dwm-6.7-patched-flyschemes-alpha/flyschemes.h
+--- dwm-6.7/flyschemes.h 1970-01-01 03:00:00.000000000 +0300
++++ dwm-6.7-patched-flyschemes-alpha/flyschemes.h 2026-01-12 16:58:30.953222295 +0300
+@@ -0,0 +1,42 @@
++
++/* loaded on dwm launch, has to be present */
++static const char *flyscheme_default[][3] = {
++ [SchemeNorm] = { "#bbbbbb", "#222222", "#444444" },
++ [SchemeSel] = { "#eeeeee", "#005577", "#005577" },
++};
++
++static const char *flyscheme_dracula[][3] = {
++ [SchemeNorm] = { "#f8f8f2", "#282a36", "#44475a" },
++ [SchemeSel] = { "#282a36", "#bd93f9", "#bd93f9" },
++};
++
++static const char *flyscheme_solarized[][3] = {
++ [SchemeNorm] = { "#839496", "#002b36", "#073642" },
++ [SchemeSel] = { "#002b36", "#2aa198", "#2aa198" },
++};
++
++static const char *flyscheme_nord[][3] = {
++ [SchemeNorm] = { "#d8dee9", "#2e3440", "#4c566a" },
++ [SchemeSel] = { "#2e3440", "#88c0d0", "#88c0d0" },
++};
++
++static const char *flyscheme_gruvbox[][3] = {
++ [SchemeNorm] = { "#ebdbb2", "#282828", "#3c3836" },
++ [SchemeSel] = { "#282828", "#fabd2f", "#fabd2f" },
++};
++
++static const char *flyscheme_light[][3] = {
++ [SchemeNorm] = { "#222222", "#eeeeee", "#cccccc" },
++ [SchemeSel] = { "#ffffff", "#4a90e2", "#4a90e2" },
++};
++
++static const char *flyscheme_plan9[][3] = {
++ [SchemeNorm] = { "#000000", "#ffffea", "#999999" },
++ [SchemeSel] = { "#000000", "#9ecfff", "#9ecfff" },
++};
++
++static const char *flyscheme_cyberpunk[][3] = {
++ [SchemeNorm] = { "#00ffcc", "#0d0221", "#1d1231" },
++ [SchemeSel] = { "#0d0221", "#ff00aa", "#ff00aa" },
++};
++
DIR diff --git a/dwm.suckless.org/patches/flyschemes/dwm-flyschemes-6.7.diff b/dwm.suckless.org/patches/flyschemes/dwm-flyschemes-6.7.diff
@@ -0,0 +1,206 @@
+diff -upN dwm-6.7/config.def.h dwm-6.7-patched-flyschemes/config.def.h
+--- dwm-6.7/config.def.h 2026-01-10 13:33:58.160268753 +0300
++++ dwm-6.7-patched-flyschemes/config.def.h 2026-01-12 16:58:40.166555474 +0300
+@@ -7,15 +7,19 @@ static const int showbar = 1;
+ static const int topbar = 1; /* 0 means bottom bar */
+ static const char *fonts[] = { "monospace:size=10" };
+ static const char dmenufont[] = "monospace:size=10";
+-static const char col_gray1[] = "#222222";
+-static const char col_gray2[] = "#444444";
+-static const char col_gray3[] = "#bbbbbb";
+-static const char col_gray4[] = "#eeeeee";
+-static const char col_cyan[] = "#005577";
+-static const char *colors[][3] = {
+- /* fg bg border */
+- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
+- [SchemeSel] = { col_gray4, col_cyan, col_cyan },
++
++#include "flyschemes.h"
++
++static const char *(*flyschemes[])[3] = {
++ flyscheme_default,
++ flyscheme_light,
++ flyscheme_plan9,
++ flyscheme_dracula,
++ flyscheme_solarized,
++ flyscheme_nord,
++ flyscheme_gruvbox,
++ flyscheme_cyberpunk,
++ NULL /* used to count the number of flyschemes */
+ };
+
+ /* tagging */
+@@ -58,7 +62,16 @@ static const Layout layouts[] = {
+
+ /* commands */
+ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
+-static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
++static const char *dmenucmd[] = {
++ "dmenu_run",
++ "-m", dmenumon,
++ "-fn", dmenufont,
++ "-nb", "#222222", /* changed as dmenucmd[6] in cycle_flyschemes */
++ "-nf", "#bbbbbb", /* changed as dmenucmd[8] in cycle_flyschemes */
++ "-sb", "#005577", /* changed as dmenucmd[10] in cycle_flyschemes */
++ "-sf", "#eeeeee", /* changed as dmenucmd[12] in cycle_flyschemes */
++ NULL
++};
+ static const char *termcmd[] = { "st", NULL };
+
+ static const Key keys[] = {
+@@ -74,7 +87,9 @@ static const Key keys[] = {
+ { MODKEY, XK_l, setmfact, {.f = +0.05} },
+ { MODKEY, XK_Return, zoom, {0} },
+ { MODKEY, XK_Tab, view, {0} },
+- { MODKEY|ShiftMask, XK_c, killclient, {0} },
++ { MODKEY|ShiftMask, XK_x, killclient, {0} },
++ { MODKEY, XK_c, cycle_flyschemes, { .i = +1 } },
++ { MODKEY|ShiftMask, XK_c, cycle_flyschemes, { .i = -1 } },
+ { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
+ { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
+ { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
+diff -upN dwm-6.7/dwm.1 dwm-6.7-patched-flyschemes/dwm.1
+--- dwm-6.7/dwm.1 2026-01-10 13:33:58.160268753 +0300
++++ dwm-6.7-patched-flyschemes/dwm.1 2026-01-12 16:55:07.489892340 +0300
+@@ -113,9 +113,15 @@ Decrease master area size.
+ .B Mod1\-Return
+ Zooms/cycles focused window to/from master area (tiled layouts only).
+ .TP
+-.B Mod1\-Shift\-c
++.B Mod1\-Shift\-x
+ Close focused window.
+ .TP
++.B Mod1\-c
++Cycle flyscheme.
++.TP
++.B Mod1\-Shift\-c
++Cycle flyscheme back.
++.TP
+ .B Mod1\-Shift\-space
+ Toggle focused window between tiled and floating state.
+ .TP
+diff -upN dwm-6.7/dwm.c dwm-6.7-patched-flyschemes/dwm.c
+--- dwm-6.7/dwm.c 2026-01-10 13:33:58.160268753 +0300
++++ dwm-6.7-patched-flyschemes/dwm.c 2026-01-12 16:55:45.363225051 +0300
+@@ -141,6 +141,8 @@ typedef struct {
+ } Rule;
+
+ /* function declarations */
++static void cycle_flyschemes(const Arg *arg);
++static void update_scheme();
+ static void applyrules(Client *c);
+ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact);
+ static void arrange(Monitor *m);
+@@ -234,6 +236,7 @@ static int xerrorstart(Display *dpy, XEr
+ static void zoom(const Arg *arg);
+
+ /* variables */
++static unsigned int iflysch = 0;
+ static const char broken[] = "broken";
+ static char stext[256];
+ static int screen;
+@@ -485,7 +488,7 @@ cleanup(void)
+ cleanupmon(mons);
+ for (i = 0; i < CurLast; i++)
+ drw_cur_free(drw, cursor[i]);
+- for (i = 0; i < LENGTH(colors); i++)
++ for (i = 0; i < LENGTH(flyscheme_default); i++)
+ drw_scm_free(drw, scheme[i], 3);
+ free(scheme);
+ XDestroyWindow(dpy, wmcheckwin);
+@@ -1584,9 +1587,9 @@ setup(void)
+ cursor[CurResize] = drw_cur_create(drw, XC_sizing);
+ cursor[CurMove] = drw_cur_create(drw, XC_fleur);
+ /* init appearance */
+- scheme = ecalloc(LENGTH(colors), sizeof(Clr *));
+- for (i = 0; i < LENGTH(colors); i++)
+- scheme[i] = drw_scm_create(drw, colors[i], 3);
++ scheme = ecalloc(LENGTH(flyscheme_default), sizeof(Clr *));
++ for (i = 0; i < LENGTH(flyscheme_default); i++)
++ scheme[i] = drw_scm_create(drw, flyscheme_default[i], 3);
+ /* init bars */
+ updatebars();
+ updatestatus();
+@@ -2140,6 +2143,36 @@ zoom(const Arg *arg)
+ pop(c);
+ }
+
++void
++update_scheme()
++{
++ scheme[SchemeNorm] = drw_scm_create(drw, flyschemes[iflysch][SchemeNorm], 3);
++ scheme[SchemeSel] = drw_scm_create(drw, flyschemes[iflysch][SchemeSel], 3);
++ dmenucmd[6] = flyschemes[iflysch][SchemeNorm][1];
++ dmenucmd[8] = flyschemes[iflysch][SchemeNorm][0];
++ dmenucmd[10] = flyschemes[iflysch][SchemeSel][1];
++ dmenucmd[12] = flyschemes[iflysch][SchemeSel][0];
++ Client *cl = selmon->sel;
++ Client *c;
++ Monitor *m;
++ for (m = mons; m; m = m->next)
++ for (c = m->clients; c; c = c->next)
++ focus(c);
++ focus(cl);
++}
++
++void
++cycle_flyschemes(const Arg *arg)
++{
++ int flyschemes_limit = 256;
++ int i;
++ for(i = 0; flyschemes[i] != NULL && i < flyschemes_limit; i++)
++ ;
++ iflysch += i + arg->i;
++ iflysch %= i;
++ update_scheme();
++}
++
+ int
+ main(int argc, char *argv[])
+ {
+diff -upN dwm-6.7/flyschemes.h dwm-6.7-patched-flyschemes/flyschemes.h
+--- dwm-6.7/flyschemes.h 1970-01-01 03:00:00.000000000 +0300
++++ dwm-6.7-patched-flyschemes/flyschemes.h 2026-01-12 16:58:30.953222295 +0300
+@@ -0,0 +1,42 @@
++
++/* loaded on dwm launch, has to be present */
++static const char *flyscheme_default[][3] = {
++ [SchemeNorm] = { "#bbbbbb", "#222222", "#444444" },
++ [SchemeSel] = { "#eeeeee", "#005577", "#005577" },
++};
++
++static const char *flyscheme_dracula[][3] = {
++ [SchemeNorm] = { "#f8f8f2", "#282a36", "#44475a" },
++ [SchemeSel] = { "#282a36", "#bd93f9", "#bd93f9" },
++};
++
++static const char *flyscheme_solarized[][3] = {
++ [SchemeNorm] = { "#839496", "#002b36", "#073642" },
++ [SchemeSel] = { "#002b36", "#2aa198", "#2aa198" },
++};
++
++static const char *flyscheme_nord[][3] = {
++ [SchemeNorm] = { "#d8dee9", "#2e3440", "#4c566a" },
++ [SchemeSel] = { "#2e3440", "#88c0d0", "#88c0d0" },
++};
++
++static const char *flyscheme_gruvbox[][3] = {
++ [SchemeNorm] = { "#ebdbb2", "#282828", "#3c3836" },
++ [SchemeSel] = { "#282828", "#fabd2f", "#fabd2f" },
++};
++
++static const char *flyscheme_light[][3] = {
++ [SchemeNorm] = { "#222222", "#eeeeee", "#cccccc" },
++ [SchemeSel] = { "#ffffff", "#4a90e2", "#4a90e2" },
++};
++
++static const char *flyscheme_plan9[][3] = {
++ [SchemeNorm] = { "#000000", "#ffffea", "#999999" },
++ [SchemeSel] = { "#000000", "#9ecfff", "#9ecfff" },
++};
++
++static const char *flyscheme_cyberpunk[][3] = {
++ [SchemeNorm] = { "#00ffcc", "#0d0221", "#1d1231" },
++ [SchemeSel] = { "#0d0221", "#ff00aa", "#ff00aa" },
++};
++
DIR diff --git a/dwm.suckless.org/patches/flyschemes/index.md b/dwm.suckless.org/patches/flyschemes/index.md
@@ -1,16 +1,22 @@
flyschemes
==========
-The patch enables users to switch DWM panel and dmenu color schemes on the fly.
+The patch enables users to switch DWM bar and dmenu color schemes on the fly.
Eight schemes are included by default, with the option to add more.
It is designed to integrate smoothly with the [optionscheme](https://st.suckless.org/patches/optionscheme/) patch for ST.
+Note that `dwm-flyschemes-alpha-6.6.diff` should be applied after the [alpha](https://dwm.suckless.org/patches/alpha/) patch,
+while `dwm-flyschemes-alpha-6.7.diff` already includes a corrected version of `dwm-alpha-20250918-74edc27.diff`.
+The integration patches work well with DWM 6.7.
+
Download
--------
-* [dwm-flyschemes-6.6.diff](dwm-flyschemes-6.6.diff)
-* [dwm-flyschemes-alpha-6.6.diff](dwm-flyschemes-6.6-alpha.diff)
+* [dwm-flyschemes-6.7.diff](dwm-flyschemes-6.7.diff)
+* [dwm-flyschemes-alpha-6.7.diff](dwm-flyschemes-6.7-alpha.diff)
* [dwm-flyschemes-6.6-st-optionscheme-integration.diff](dwm-flyschemes-6.6-st-optionscheme-integration.diff)
* [dwm-flyschemes-6.6-st-optionscheme-alpha-integration.diff](dwm-flyschemes-6.6-st-optionscheme-alpha-integration.diff)
+* [dwm-flyschemes-6.6.diff](dwm-flyschemes-6.6.diff)
+* [dwm-flyschemes-alpha-6.6.diff](dwm-flyschemes-6.6-alpha.diff)
Authors
-------