URI: 
       [dwm][patches][flycolors] final few fixes - sites - public wiki contents of suckless.org
  HTML git clone git://git.suckless.org/sites
   DIR Log
   DIR Files
   DIR Refs
       ---
   DIR commit 268e461b231115a42ce16e60ac7b48e7b6386b80
   DIR parent ac9fc8a2a750364a9e1f57057adada172779bf8b
  HTML Author: faradayawerty <faradayawerty@gmail.com>
       Date:   Sun, 21 Dec 2025 17:48:00 +0300
       
       [dwm][patches][flycolors] final few fixes
       
       Diffstat:
         A dwm.suckless.org/patches/flycolors… |     137 +++++++++++++++++++++++++++++++
         D dwm.suckless.org/patches/flycolors… |     138 ------------------------------
         M dwm.suckless.org/patches/flycolors… |      21 ++++++++++-----------
         M dwm.suckless.org/patches/flycolors… |       6 +-----
       
       4 files changed, 148 insertions(+), 154 deletions(-)
       ---
   DIR diff --git a/dwm.suckless.org/patches/flycolors/dwm-flycolors-6.6-alpha.diff b/dwm.suckless.org/patches/flycolors/dwm-flycolors-6.6-alpha.diff
       @@ -0,0 +1,137 @@
       +diff -up dwm-6.6-alpha/config.def.h dwm-6.6-flycolors-alpha/config.def.h
       +--- dwm-6.6-alpha/config.def.h        2025-12-21 17:07:31.747211857 +0300
       ++++ dwm-6.6-flycolors-alpha/config.def.h        2025-12-21 17:08:31.403879729 +0300
       +@@ -13,11 +13,23 @@ static const char col_gray1[]       = "#
       + 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]      = {
       ++static const char default_flycolor[] = "#666666";
       ++
       ++static const char *flycolors[] = {
       ++        "#666666", // gray
       ++        "#005577", // blue
       ++        "#117755", // green
       ++        "#aa7711", // yellow
       ++        "#771111", // red
       ++        "#551177", // magenta
       ++        "#aa1177", // pink
       ++        NULL // used to count the array size
       ++};
       ++
       ++static const char *colors[][3] = {
       +         /*               fg         bg         border   */
       +         [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
       +-        [SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
       ++        [SchemeSel]  = { col_gray4, default_flycolor, default_flycolor }, /* [1] and [2] are changed in cycle_flycolors */
       + };
       + 
       + /* tagging */
       +@@ -59,13 +71,24 @@ 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", col_gray1,
       ++        "-nf", col_gray3,
       ++        "-sb", default_flycolor, /* changed as dmenucmd[10] in cycle_flycolors */
       ++        "-sf", col_gray4,
       ++        NULL
       ++};
       + static const char *termcmd[]  = { "st", NULL };
       + 
       + static const Key keys[] = {
       +         /* modifier                     key        function        argument */
       +         { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
       +         { MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
       ++        { MODKEY,                       XK_c,      cycle_flycolors, { .i = +1 } },
       ++        { MODKEY|ShiftMask,             XK_c,      cycle_flycolors, { .i = -1 } },
       +         { MODKEY,                       XK_b,      togglebar,      {0} },
       +         { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
       +         { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
       +@@ -75,7 +98,7 @@ 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_t,      setlayout,      {.v = &layouts[0]} },
       +         { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
       +         { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
       +diff -up dwm-6.6-alpha/dwm.1 dwm-6.6-flycolors-alpha/dwm.1
       +--- dwm-6.6-alpha/dwm.1        2025-12-18 12:11:49.852471883 +0300
       ++++ dwm-6.6-flycolors-alpha/dwm.1        2025-12-21 17:08:31.403879729 +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 flycolors.
       ++.TP
       ++.B Mod1\-Shift\-c
       ++Cycle flycolors back.
       ++.TP
       + .B Mod1\-Shift\-space
       + Toggle focused window between tiled and floating state.
       + .TP
       +diff -up dwm-6.6-alpha/dwm.c dwm-6.6-flycolors-alpha/dwm.c
       +--- dwm-6.6-alpha/dwm.c        2025-12-21 17:07:31.747211857 +0300
       ++++ dwm-6.6-flycolors-alpha/dwm.c        2025-12-21 17:09:37.160547712 +0300
       +@@ -143,6 +143,8 @@ typedef struct {
       + } Rule;
       + 
       + /* function declarations */
       ++static void cycle_flycolors(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);
       +@@ -237,6 +239,7 @@ static void xinitvisual(void);
       + static void zoom(const Arg *arg);
       + 
       + /* variables */
       ++static unsigned int iflycol = 0;
       + static const char broken[] = "broken";
       + static char stext[256];
       + static int screen;
       +@@ -2187,6 +2190,31 @@ zoom(const Arg *arg)
       +         pop(c);
       + }
       + 
       ++void
       ++update_scheme()
       ++{
       ++        unsigned int alphas[] = {borderalpha, baralpha, OPAQUE};
       ++        Client *c = selmon->sel;
       ++        for (int i = 0; i < LENGTH(colors); i++)
       ++                scheme[i] = drw_scm_create(drw, colors[i], alphas, 3);
       ++        focus(c);
       ++}
       ++
       ++void
       ++cycle_flycolors(const Arg *arg)
       ++{
       ++        int flycolors_limit = 256;
       ++        int i;
       ++        for(i = 0; flycolors[i] != NULL && i < flycolors_limit; i++)
       ++                ;
       ++        iflycol += i + arg->i;
       ++        iflycol %= i;
       ++        colors[SchemeSel][1] = flycolors[iflycol];
       ++        colors[SchemeSel][2] = flycolors[iflycol];
       ++        dmenucmd[10] = flycolors[iflycol];
       ++        update_scheme();
       ++}
       ++
       + int
       + main(int argc, char *argv[])
       + {
   DIR diff --git a/dwm.suckless.org/patches/flycolors/dwm-flycolors-6.6-alphapatch.diff b/dwm.suckless.org/patches/flycolors/dwm-flycolors-6.6-alphapatch.diff
       @@ -1,138 +0,0 @@
       -diff -up dwm-6.6-orig/config.def.h dwm-6.6-flycolors-alphapatch/config.def.h
       ---- dwm-6.6-orig/config.def.h        2025-12-18 12:11:49.852471883 +0300
       -+++ dwm-6.6-flycolors-alphapatch/config.def.h        2025-12-20 20:44:19.876078740 +0300
       -@@ -11,11 +11,23 @@ static const char col_gray1[]       = "#
       - 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]      = {
       -+static const char default_flycolor[] = "#666666";
       -+
       -+static const char *flycolors[] = {
       -+        "#666666", // gray
       -+        "#005577", // blue
       -+        "#117755", // green
       -+        "#aa7711", // yellow
       -+        "#771111", // red
       -+        "#551177", // magenta
       -+        "#aa1177", // pink
       -+        NULL // used to count the array size
       -+};
       -+
       -+static const char *colors[][3] = {
       -         /*               fg         bg         border   */
       -         [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
       --        [SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
       -+        [SchemeSel]  = { col_gray4, default_flycolor, default_flycolor }, // [1] and [2] are changed in cycle_flycolors
       - };
       - 
       - /* tagging */
       -@@ -57,13 +69,24 @@ 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", col_gray1,
       -+        "-nf", col_gray3,
       -+        "-sb", default_flycolor, // changed as dmenucmd[10] in cycle_flycolors
       -+        "-sf", col_gray4,
       -+        NULL
       -+};
       - static const char *termcmd[]  = { "st", NULL };
       - 
       - static const Key keys[] = {
       -         /* modifier                     key        function        argument */
       -         { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
       -         { MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
       -+        { MODKEY,                       XK_c,      cycle_flycolors, { .i = +1 } },
       -+        { MODKEY|ShiftMask,             XK_c,      cycle_flycolors, { .i = -1 } },
       -         { MODKEY,                       XK_b,      togglebar,      {0} },
       -         { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
       -         { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
       -@@ -73,7 +96,7 @@ 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_t,      setlayout,      {.v = &layouts[0]} },
       -         { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
       -         { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
       -diff -up dwm-6.6-orig/dwm.1 dwm-6.6-flycolors-alphapatch/dwm.1
       ---- dwm-6.6-orig/dwm.1        2025-12-18 12:11:49.852471883 +0300
       -+++ dwm-6.6-flycolors-alphapatch/dwm.1        2025-12-20 19:41:46.605075672 +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 flycolors.
       -+.TP
       -+.B Mod1\-Shift\-c
       -+Cycle flycolors.
       -+.TP
       - .B Mod1\-Shift\-space
       - Toggle focused window between tiled and floating state.
       - .TP
       -diff -up dwm-6.6-orig/dwm.c dwm-6.6-flycolors-alphapatch/dwm.c
       ---- dwm-6.6-orig/dwm.c        2025-12-18 12:11:49.852471883 +0300
       -+++ dwm-6.6-flycolors-alphapatch/dwm.c        2025-12-20 21:00:21.702764717 +0300
       -@@ -141,6 +141,8 @@ typedef struct {
       - } Rule;
       - 
       - /* function declarations */
       -+static void cycle_flycolors(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 iflycol = 0;
       - static const char broken[] = "broken";
       - static char stext[256];
       - static int screen;
       -@@ -2139,6 +2142,32 @@ zoom(const Arg *arg)
       -         pop(c);
       - }
       - 
       -+void
       -+update_scheme()
       -+{
       -+        Client *c = selmon->sel;
       -+        unsigned int alphas[] = {borderalpha, baralpha, OPAQUE};
       -+        for (int i = 0; i < LENGTH(colors); i++)
       -+                scheme[i] = drw_scm_create(drw, colors[i], alphas, 3);
       -+        focus(c);
       -+        drawbars();
       -+}
       -+
       -+void
       -+cycle_flycolors(const Arg *arg)
       -+{
       -+        int flycolors_limit = 256;
       -+        int i;
       -+        for(i = 0; flycolors[i] != NULL && i < flycolors_limit; i++)
       -+                ;
       -+        iflycol += i + arg->i;
       -+        iflycol %= i;
       -+        colors[SchemeSel][1] = flycolors[iflycol];
       -+        colors[SchemeSel][2] = flycolors[iflycol];
       -+        update_scheme();
       -+        dmenucmd[10] = flycolors[iflycol];
       -+}
       -+
       - int
       - main(int argc, char *argv[])
       - {
   DIR diff --git a/dwm.suckless.org/patches/flycolors/dwm-flycolors-6.6.diff b/dwm.suckless.org/patches/flycolors/dwm-flycolors-6.6.diff
       @@ -1,6 +1,6 @@
       -diff -up dwm-6.6-orig/config.def.h dwm-6.6/config.def.h
       +diff -up dwm-6.6-orig/config.def.h dwm-6.6-flycolors/config.def.h
        --- dwm-6.6-orig/config.def.h        2025-12-18 12:11:49.852471883 +0300
       -+++ dwm-6.6/config.def.h        2025-12-20 20:44:19.876078740 +0300
       ++++ dwm-6.6-flycolors/config.def.h        2025-12-21 13:53:01.026979278 +0300
        @@ -11,11 +11,23 @@ static const char col_gray1[]       = "#
         static const char col_gray2[]       = "#444444";
         static const char col_gray3[]       = "#bbbbbb";
       @@ -24,7 +24,7 @@ diff -up dwm-6.6-orig/config.def.h dwm-6.6/config.def.h
                 /*               fg         bg         border   */
                 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
        -        [SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
       -+        [SchemeSel]  = { col_gray4, default_flycolor, default_flycolor }, // [1] and [2] are changed in cycle_flycolors
       ++        [SchemeSel]  = { col_gray4, default_flycolor, default_flycolor }, /* [1] and [2] are changed in cycle_flycolors */
         };
         
         /* tagging */
       @@ -39,7 +39,7 @@ diff -up dwm-6.6-orig/config.def.h dwm-6.6/config.def.h
        +        "-fn", dmenufont,
        +        "-nb", col_gray1,
        +        "-nf", col_gray3,
       -+        "-sb", default_flycolor, // changed as dmenucmd[10] in cycle_flycolors
       ++        "-sb", default_flycolor, /* changed as dmenucmd[10] in cycle_flycolors */
        +        "-sf", col_gray4,
        +        NULL
        +};
       @@ -63,9 +63,9 @@ diff -up dwm-6.6-orig/config.def.h dwm-6.6/config.def.h
                 { MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
                 { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
                 { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
       -diff -up dwm-6.6-orig/dwm.1 dwm-6.6/dwm.1
       +diff -up dwm-6.6-orig/dwm.1 dwm-6.6-flycolors/dwm.1
        --- dwm-6.6-orig/dwm.1        2025-12-18 12:11:49.852471883 +0300
       -+++ dwm-6.6/dwm.1        2025-12-20 19:41:46.605075672 +0300
       ++++ dwm-6.6-flycolors/dwm.1        2025-12-21 13:53:01.026979278 +0300
        @@ -113,9 +113,15 @@ Decrease master area size.
         .B Mod1\-Return
         Zooms/cycles focused window to/from master area (tiled layouts only).
       @@ -78,14 +78,14 @@ diff -up dwm-6.6-orig/dwm.1 dwm-6.6/dwm.1
        +Cycle flycolors.
        +.TP
        +.B Mod1\-Shift\-c
       -+Cycle flycolors.
       ++Cycle flycolors back.
        +.TP
         .B Mod1\-Shift\-space
         Toggle focused window between tiled and floating state.
         .TP
       -diff -up dwm-6.6-orig/dwm.c dwm-6.6/dwm.c
       +diff -up dwm-6.6-orig/dwm.c dwm-6.6-flycolors/dwm.c
        --- dwm-6.6-orig/dwm.c        2025-12-18 12:11:49.852471883 +0300
       -+++ dwm-6.6/dwm.c        2025-12-20 20:44:23.039412131 +0300
       ++++ dwm-6.6-flycolors/dwm.c        2025-12-21 16:55:38.250530788 +0300
        @@ -141,6 +141,8 @@ typedef struct {
         } Rule;
         
       @@ -103,7 +103,7 @@ diff -up dwm-6.6-orig/dwm.c dwm-6.6/dwm.c
         static const char broken[] = "broken";
         static char stext[256];
         static int screen;
       -@@ -2139,6 +2142,31 @@ zoom(const Arg *arg)
       +@@ -2139,6 +2142,30 @@ zoom(const Arg *arg)
                 pop(c);
         }
         
       @@ -114,7 +114,6 @@ diff -up dwm-6.6-orig/dwm.c dwm-6.6/dwm.c
        +        for (int i = 0; i < LENGTH(colors); i++)
        +                scheme[i] = drw_scm_create(drw, colors[i], 3);
        +        focus(c);
       -+        drawbars();
        +}
        +
        +void
   DIR diff --git a/dwm.suckless.org/patches/flycolors/index.md b/dwm.suckless.org/patches/flycolors/index.md
       @@ -8,11 +8,7 @@ The available colors are gray, blue, green, yellow, purple, magenta, and red.
        Download
        --------
        * [dwm-flycolors-6.6.diff](dwm-flycolors-6.6.diff)
       - 
       -If you'd like to combine [alpha](../alpha/) and the flycolors patch,
       -you can apply the following patch on top of dwm-alpha-20250918-74edc27.diff
       -
       -* [dwm-flycolors-6.6-alphapatch.diff](dwm-flycolors-6.6-alphapatch.diff)
       +* [dwm-flycolors-6.6-alpha.diff](dwm-flycolors-6.6-alpha.diff) - for alpha users
        
        Authors
        -------