URI:
       Create new "stickyrule" patch - sites - public wiki contents of suckless.org
  HTML git clone git://git.suckless.org/sites
   DIR Log
   DIR Files
   DIR Refs
       ---
   DIR commit 52039ca4209cff97b3d82ceeea7f216a1ee69453
   DIR parent efa06680da77bcca77995840d20adab824ecec04
  HTML Author: Vedant Sule <sulevedant@gmail.com>
       Date:   Sat,  3 Oct 2026 00:54:02 +0100
       
       Create new "stickyrule" patch
       
       Adds a patch which allows you to create rule to make a matching
       application sticky on opening it. I'm still relatively new to this so
       apologies if I've done anything wrong, and please do let me know if I
       have.
       
       Diffstat:
         A dwm.suckless.org/patches/stickyrul… |      51 +++++++++++++++++++++++++++++++
         A dwm.suckless.org/patches/stickyrul… |      14 ++++++++++++++
       
       2 files changed, 65 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/dwm.suckless.org/patches/stickyrule/dwm-stickyrule-6.8.diff b/dwm.suckless.org/patches/stickyrule/dwm-stickyrule-6.8.diff
       @@ -0,0 +1,51 @@
       +From e4342df390ae7873e224fb29e8d9838db1cdb448 Mon Sep 17 00:00:00 2001
       +From: Vedant Sule <sulevedant@gmail.com>
       +Date: Fri, 2 Oct 2026 18:25:19 +0100
       +Subject: [PATCH] Add issticky to rules[] and apply it in applyrules
       +
       +---
       + config.def.h | 7 ++++---
       + dwm.c        | 2 ++
       + 2 files changed, 6 insertions(+), 3 deletions(-)
       +
       +diff --git a/config.def.h b/config.def.h
       +index c243414..c856376 100644
       +--- a/config.def.h
       ++++ b/config.def.h
       +@@ -26,9 +26,10 @@ static const Rule rules[] = {
       +          *        WM_CLASS(STRING) = instance, class
       +          *        WM_NAME(STRING) = title
       +          */
       +-        /* class      instance    title       tags mask     isfloating   monitor */
       +-        { "Gimp",     NULL,       NULL,       0,            1,           -1 },
       +-        { "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
       ++        /* class      instance    title       tags mask     isfloating         issticky   monitor */
       ++        { "Gimp",     NULL,       NULL,       0,            1,           0,            -1 },
       ++        { "Firefox",  NULL,       NULL,       1 << 8,       0,           0,            -1 },
       ++        { "Dragon",   NULL,          NULL,              0,            0,                 1,            -1 },
       + };
       + 
       + /* layout(s) */
       +diff --git a/dwm.c b/dwm.c
       +index a9cf1bf..34207a5 100644
       +--- a/dwm.c
       ++++ b/dwm.c
       +@@ -137,6 +137,7 @@ typedef struct {
       +         const char *title;
       +         unsigned int tags;
       +         int isfloating;
       ++        int issticky;
       +         int monitor;
       + } Rule;
       + 
       +@@ -300,6 +301,7 @@ applyrules(Client *c)
       +                 {
       +                         c->isfloating = r->isfloating;
       +                         c->tags |= r->tags;
       ++                        setsticky(c, r->issticky);
       +                         for (m = mons; m && m->num != r->monitor; m = m->next);
       +                         if (m)
       +                                 c->mon = m;
       +-- 
       +2.55.0
       +
   DIR diff --git a/dwm.suckless.org/patches/stickyrule/index.md b/dwm.suckless.org/patches/stickyrule/index.md
       @@ -0,0 +1,14 @@
       +stickyrule
       +==========
       +
       +Description
       +-----------
       +This patch allows you to make windows "sticky" by default. This can be useful for applications you need on every tag, e.g. dragon. Note: the [sticky](../sticky) patch needs to be applied before this.
       +
       +Download
       +--------
       +* [dwm-stickyrule-6.8.diff](dwm-stickyrule-6.8.diff)
       +
       +Author
       +------
       +* Vedant Sule <sulevedant@gmail.com>