Disambiguate dwl-patches' license - closes issue #530

During the hosting transition from github to codeberg, dwl and
dwl-patches were split up for logistical reasons. In doing so,
however, the license files remained with dwl and were not replicated
into the new dwl-patches repository. This left new patches and
contributions to patches in an ambiguous license state.

Codeberg dwl-patches issue #530 requested that contributors to
dwl-patches explicitly consent or dissent to the dwl license
structure. All but seven contributors did so. Those seven
contributors' patches are here formally removed as dwl-patches adopts
the dwl license structure.

For clarity this license structure is as follows:

GPL-3+ license with a provision for the MIT license covering any
patches that affect util.c and util.h and a provision for the sway
license covering any patches that interact with client_is_float_type()
and the layer shell code which were drawn out of the sway code base.
This commit is contained in:
A Frederick Christensen
2025-07-10 08:20:03 -05:00
parent 2aa9de3394
commit 49aba1d42b
18 changed files with 877 additions and 512 deletions
-11
View File
@@ -1,11 +0,0 @@
### Description
Adds the ability to change the [bar's](https://codeberg.org/dwl/dwl-patches/wiki/bar) height.
### Download
- [0.7](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/barheight/barheight.patch) (bar 0.7)
- [git branch](https://codeberg.org/Oak/dwl/src/branch/barheight)
### Authors
- [Oak](https://codeberg.org/oak)
-38
View File
@@ -1,38 +0,0 @@
From d2f3ac840845802eaf9ff7daf406f04722fd02aa Mon Sep 17 00:00:00 2001
From: Oak <Oak@petrifiedoak.com>
Date: Sun, 25 Aug 2024 17:43:17 +0200
Subject: [PATCH] Implement barheight patch
---
config.def.h | 1 +
dwl.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/config.def.h b/config.def.h
index 5d1dc2b..f11089c 100644
--- a/config.def.h
+++ b/config.def.h
@@ -7,6 +7,7 @@
static const int sloppyfocus = 1; /* focus follows mouse */
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
static const unsigned int borderpx = 1; /* border pixel of windows */
+static const int user_bh = 30; /* 0 means that dwl will calculate barheight, >= 1 means dwl will use user_bh as the bar height. */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = {"monospace:size=10"};
diff --git a/dwl.c b/dwl.c
index ece537a..2863202 100644
--- a/dwl.c
+++ b/dwl.c
@@ -3183,7 +3183,7 @@ updatebar(Monitor *m)
m->b.scale = m->wlr_output->scale;
m->lrpad = m->drw->font->height;
- m->b.height = m->drw->font->height + 2;
+ m->b.height = user_bh ? user_bh : m->drw->font->height + 2;
m->b.real_height = (int)((float)m->b.height / m->wlr_output->scale);
}
--
2.46.0
-13
View File
@@ -1,13 +0,0 @@
### Description
Port of the cfact patch for the centeredmaster layout.
Inspired by the original patch for dwm (https://dwm.suckless.org/patches/cfacts/)
This patch requires both [cfact](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/cfact) and [centeredmaster](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/centeredmaster) patches.
### Download
- [2024-06-26](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/cfact-centeredmaster/cfact-centeredmaster.patch)
### Authors
- [acadmendes](https://codeberg.org/acadmendes)
@@ -1,83 +0,0 @@
From e3ad25b5149df936155cb51927f16648a9838bc0 Mon Sep 17 00:00:00 2001
From: estevao <estevao.mendes@acad.ufsm.br>
Date: Thu, 25 Jul 2024 13:20:50 -0300
Subject: [PATCH] cfact patch for centeredmaster layout
---
dwl.c | 42 ++++++++++++++++++++++++++++++++++++++----
1 file changed, 38 insertions(+), 4 deletions(-)
diff --git a/dwl.c b/dwl.c
index 91c1511..37732c0 100644
--- a/dwl.c
+++ b/dwl.c
@@ -654,6 +656,7 @@ void
centeredmaster(Monitor *m)
{
unsigned int h, mw, mx, my, oty, ety, tw;
+ float mweight = 0, ltweight = 0, rtweight = 0;
int i, n;
Client *c;
@@ -672,7 +675,7 @@ centeredmaster(Monitor *m)
if (n > m->nmaster) {
/* go mfact box in the center if more than nmaster clients */
- mw = ROUND(m->nmaster ? m->w.width * m->mfact : 0);
+ mw = roundf(m->nmaster ? m->w.width * m->mfact : 0);
tw = m->w.width - mw;
if (n - m->nmaster > 1) {
@@ -682,6 +685,20 @@ centeredmaster(Monitor *m)
}
}
+ i = 0;
+ wl_list_for_each(c, &clients, link){
+ if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
+ continue;
+ if (i < m->nmaster)
+ mweight += c->cweight;
+ else if ( (i - m->nmaster)%2 ){
+ ltweight += c->cweight;
+ }else{
+ rtweight += c->cweight;
+ }
+ i++;
+ }
+
i = 0;
oty = 0;
ety = 0;
@@ -691,22 +708,24 @@ centeredmaster(Monitor *m)
if (i < m->nmaster) {
/* nmaster clients are stacked vertically, in the center
* of the screen */
- h = (m->w.height - my) / (MIN(n, m->nmaster) - i);
+ h = (m->w.height - my)*(c->cweight/mweight);
resize(c, (struct wlr_box){.x = m->w.x + mx, .y = m->w.y + my, .width = mw,
.height = h}, 0);
my += c->geom.height;
+ mweight -= c->cweight;
} else {
/* stack clients are stacked vertically */
if ((i - m->nmaster) % 2) {
- h = (m->w.height - ety) / ( (1 + n - i) / 2);
+ h = (m->w.height - ety)*(c->cweight/ltweight);
resize(c, (struct wlr_box){.x = m->w.x, .y = m->w.y + ety, .width = tw,
.height = h}, 0);
ety += c->geom.height;
+ ltweight -= c->cweight;
} else {
- h = (m->w.height - oty) / ((1 + n - i) / 2);
+ h = (m->w.height - oty)*(c->cweight/rtweight);
resize(c, (struct wlr_box){.x = m->w.x + mx + mw, .y = m->w.y + oty, .width = tw,
.height = h}, 0);
oty += c->geom.height;
+ rtweight -= c->cweight;
}
}
i++;
--
2.45.2
-34
View File
@@ -1,34 +0,0 @@
### Description
Adds a layout with a monocle layout for clients in the stack (port of the [deck layout for dwm](https://dwm.suckless.org/patches/deck/)); stacked clients are like a deck of cards (see below)
```
Tile:
+-----------------+--------+
| | |
| | S1 |
| | |
| M +--------+
| | |
| | S2 |
| | |
+-----------------+--------+
Deck:
+-----------------+--------+
| | |
| | |
| | |
| M | S1 |
| | |
| | |
| | |
+-----------------+--------+
```
### Download
- [git branch](https://codeberg.org/anabasis/dwl/src/branch/deck)
- [2024-05-10](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/deck/deck.patch)
### Authors
- [anabasis](https://codeberg.org/anabasis)
- [Palanix](https://codeberg.org/Palanix)
-87
View File
@@ -1,87 +0,0 @@
From d56f732d3b5bba4ea0bdf56a91d0992b0cb25bfb Mon Sep 17 00:00:00 2001
From: anabasis <anabasis@noreply.codeberg.org>
Date: Fri, 10 May 2024 13:45:33 -0400
Subject: [PATCH] add deck layout
---
config.def.h | 2 ++
dwl.c | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/config.def.h b/config.def.h
index 8f498d2..9238da0 100644
--- a/config.def.h
+++ b/config.def.h
@@ -33,6 +33,7 @@ static const Layout layouts[] = {
{ "[]=", tile },
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
+ { "[D]", deck },
};
/* monitors */
@@ -134,6 +135,7 @@ static const Key keys[] = {
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
+ { MODKEY, XKB_KEY_r, setlayout, {.v = &layouts[3]} },
{ MODKEY, XKB_KEY_space, setlayout, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
diff --git a/dwl.c b/dwl.c
index bf763df..1a7ce8e 100644
--- a/dwl.c
+++ b/dwl.c
@@ -267,6 +267,7 @@ static void createpointerconstraint(struct wl_listener *listener, void *data);
static void cursorconstrain(struct wlr_pointer_constraint_v1 *constraint);
static void cursorframe(struct wl_listener *listener, void *data);
static void cursorwarptohint(void);
+static void deck(Monitor *m);
static void destroydecoration(struct wl_listener *listener, void *data);
static void destroydragicon(struct wl_listener *listener, void *data);
static void destroyidleinhibitor(struct wl_listener *listener, void *data);
@@ -1080,6 +1081,41 @@ cursorwarptohint(void)
}
}
+void
+deck(Monitor *m)
+{
+ unsigned int mw, my;
+ int i, n = 0;
+ Client *c;
+
+ wl_list_for_each(c, &clients, link)
+ if (VISIBLEON(c, m) && !c->isfloating && !c->isfullscreen)
+ n++;
+ if (n == 0)
+ return;
+
+ if (n > m->nmaster)
+ mw = m->nmaster ? ROUND(m->w.width * m->mfact) : 0;
+ else
+ mw = m->w.width;
+ i = my = 0;
+ wl_list_for_each(c, &clients, link) {
+ if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
+ continue;
+ if (i < m->nmaster) {
+ resize(c, (struct wlr_box){.x = m->w.x, .y = m->w.y + my, .width = mw,
+ .height = (m->w.height - my) / (MIN(n, m->nmaster) - i)}, 0);
+ my += c->geom.height;
+ } else {
+ resize(c, (struct wlr_box){.x = m->w.x + mw, .y = m->w.y,
+ .width = m->w.width - mw, .height = m->w.height}, 0);
+ if (c == focustop(m))
+ wlr_scene_node_raise_to_top(&c->scene->node);
+ }
+ i++;
+ }
+}
+
void
destroydecoration(struct wl_listener *listener, void *data)
{
--
2.45.0
@@ -1,18 +0,0 @@
### Description
This patch adds the ability to define the modkey with a make argument like so:
```
make MODKEY=WLR_MODIFIER_ALT
make MODKEY=WLR_MODIFIER_LOGO
make MODKEY=WLR_MODIFIER_CTRL
make MODKEY=WLR_MODIFIER_SHIFT
```
It can be used to compile multiple times quickly, you can also have a main session and sub session with different modkeys.
### Download
- [git branch](https://codeberg.org/Abanoub/dwl/src/branch/define-modkey-patch)
- [2024-02-14](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/define-modkey-with-make-argument/define-modkey-with-make-argument.patch)
### Authors
- [Abanoub](https://codeberg.org/Abanoub)
@@ -1,49 +0,0 @@
From ec6a6a4fe56ef5bdf45633966345f0d0338776d5 Mon Sep 17 00:00:00 2001
From: Abanoub <abanoubsameh@protonmail.com>
Date: Fri, 19 Jan 2024 21:42:42 +0200
Subject: [PATCH] Add the ability to define a MODKEY as a make argument
---
Makefile | 6 +++++-
config.def.h | 4 +++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 0822ddc..d169a97 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,10 @@ PKGS = wlroots wayland-server xkbcommon libinput $(XLIBS)
DWLCFLAGS = `$(PKG_CONFIG) --cflags $(PKGS)` $(DWLCPPFLAGS) $(DWLDEVCFLAGS) $(CFLAGS)
LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(LIBS)
+ifneq ($(MODKEY),)
+MODKEYVAL = -DMODKEY=$(MODKEY)
+endif
+
all: dwl
dwl: dwl.o util.o
$(CC) dwl.o util.o $(LDLIBS) $(LDFLAGS) $(DWLCFLAGS) -o $@
@@ -63,4 +67,4 @@ uninstall:
.SUFFIXES: .c .o
.c.o:
- $(CC) $(CPPFLAGS) $(DWLCFLAGS) -c $<
+ $(CC) $(CPPFLAGS) $(DWLCFLAGS) $(MODKEYVAL) -c $<
diff --git a/config.def.h b/config.def.h
index 9009517..b1e53cd 100644
--- a/config.def.h
+++ b/config.def.h
@@ -102,7 +102,9 @@ LIBINPUT_CONFIG_TAP_MAP_LMR -- 1/2/3 finger tap maps to left/middle/right
static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TAP_MAP_LRM;
/* If you want to use the windows key for MODKEY, use WLR_MODIFIER_LOGO */
-#define MODKEY WLR_MODIFIER_ALT
+#ifndef MODKEY
+# define MODKEY WLR_MODIFIER_ALT
+#endif
#define TAGKEYS(KEY,SKEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
--
2.43.0
@@ -1,12 +0,0 @@
### Description
A revive of the floatBorderColor patch.
This patch allows you to set a color for floating windows when they are unfocused.
### Download
- [git branch](https://codeberg.org/yuki-was-taken/dwl-patch/src/branch/float-unfocused-border-color/)
- [2024-06-07](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/float-unfocused-border-color/float-unfocused-border-color.patch)
### Authors
- [yuki](https://codeberg.org/yuki-was-taken)
- [Palanix (Original Author)](https://codeberg.org/Palanix)
@@ -1,60 +0,0 @@
From 591c031a4d8e62acfef4ef41816c1fbbb8b1473a Mon Sep 17 00:00:00 2001
From: yuki <yukiat@proton.me>
Date: Fri, 7 Jun 2024 11:44:37 +0800
Subject: [PATCH] Added float-unfocused-border-color patch.
---
config.def.h | 1 +
dwl.c | 11 ++++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/config.def.h b/config.def.h
index a784eb4..8131af5 100644
--- a/config.def.h
+++ b/config.def.h
@@ -11,6 +11,7 @@ static const float rootcolor[] = COLOR(0x222222ff);
static const float bordercolor[] = COLOR(0x444444ff);
static const float focuscolor[] = COLOR(0x005577ff);
static const float urgentcolor[] = COLOR(0xff0000ff);
+static const float floatcolor[] = COLOR(0xff0000ff);
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You can also use glsl colors */
diff --git a/dwl.c b/dwl.c
index 6f041a0..777c0e1 100644
--- a/dwl.c
+++ b/dwl.c
@@ -632,6 +632,7 @@ buttonpress(struct wl_listener *listener, void *data)
/* Drop the window off on its new monitor */
selmon = xytomon(cursor->x, cursor->y);
setmon(grabc, selmon, 0);
+ grabc = NULL;
return;
} else {
cursor_mode = CurNormal;
@@ -1348,9 +1349,8 @@ focusclient(Client *c, int lift)
/* Don't deactivate old client if the new one wants focus, as this causes issues with winecfg
* and probably other clients */
} else if (old_c && !client_is_unmanaged(old_c) && (!c || !client_wants_focus(c))) {
- client_set_border_color(old_c, bordercolor);
-
- client_activate_surface(old, 0);
+ client_set_border_color(old_c, old_c->isfloating ? floatcolor : bordercolor);
+ client_activate_surface(old, 0);
}
}
printstatus();
@@ -2218,6 +2218,11 @@ setfloating(Client *c, int floating)
wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen ||
(p && p->isfullscreen) ? LyrFS
: c->isfloating ? LyrFloat : LyrTile]);
+ if (!grabc && floating)
+ for (int i = 0; i < 4; i++) {
+ wlr_scene_rect_set_color(c->border[i], floatcolor);
+ wlr_scene_node_lower_to_bottom(&c->border[i]->node);
+ }
arrange(c->mon);
printstatus();
}
--
2.45.2
-14
View File
@@ -1,14 +0,0 @@
### Description
Set natural scrolling only for trackpads. Without this patch, setting
`natural_scrolling` to 1 in `config.h` results in a regular mouse wheel having
natural scrolling enabled as well.
### Download
- [0.7](/dwl/dwl-patches/raw/branch/main/patches/naturalscrolltrackpad/naturalscrolltrackpad.patch)
### Authors
- [Nikita Ivanov](https://codeberg.org/nikitaivanov) ([GitHub](https://github.com/NikitaIvanovV))
- [Neuromagus](https://codeberg.org/neuromagus)
@@ -1,30 +0,0 @@
From 63f38e7ccda8067a0558a6e81baad89ffbba9d6a Mon Sep 17 00:00:00 2001
From: Nikita Ivanov <nikita.vyach.ivanov@gmail.com>
Date: Sat, 8 Feb 2025 16:31:09 +0100
Subject: [PATCH] Set natural scrolling only for trackpads
---
dwl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dwl.c b/dwl.c
index def2562..f6bb544 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1085,10 +1085,10 @@ createpointer(struct wlr_pointer *pointer)
libinput_device_config_tap_set_drag_enabled(device, tap_and_drag);
libinput_device_config_tap_set_drag_lock_enabled(device, drag_lock);
libinput_device_config_tap_set_button_map(device, button_map);
- }
- if (libinput_device_config_scroll_has_natural_scroll(device))
- libinput_device_config_scroll_set_natural_scroll_enabled(device, natural_scrolling);
+ if (libinput_device_config_scroll_has_natural_scroll(device))
+ libinput_device_config_scroll_set_natural_scroll_enabled(device, natural_scrolling);
+ }
if (libinput_device_config_dwt_is_available(device))
libinput_device_config_dwt_set_enabled(device, disable_while_typing);
--
2.48.1
-9
View File
@@ -1,9 +0,0 @@
### Description
This patch adds scroll factor to dwl. The settings can be found in the trackpad section of the config. This allows user to control the sensitivity of 2-finger touchpad scrolling.
### Download
- [git branch](https://codeberg.org/singul4ri7y/dwl/src/branch/scroll-factor)
- [2024-07-12](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/scroll-factor/scroll-factor.patch)
### Authors
- [singul4ri7y](https://codeberg.org/singul4ri7y)
-54
View File
@@ -1,54 +0,0 @@
From 3e765d49976685a8772bd3e12a8c5546868a97f7 Mon Sep 17 00:00:00 2001
From: SD Asif Hossein <s.dah.ingularity47@gmail.com>
Date: Fri, 12 Jul 2024 14:28:06 +0600
Subject: [PATCH] Added scroll-factor patch
---
config.def.h | 3 +++
dwl.c | 11 +++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/config.def.h b/config.def.h
index 22d2171..83c4b87 100644
--- a/config.def.h
+++ b/config.def.h
@@ -71,6 +71,9 @@ static const int natural_scrolling = 0;
static const int disable_while_typing = 1;
static const int left_handed = 0;
static const int middle_button_emulation = 0;
+/* Scroll sensitivity */
+static const double scroll_factor = 1.0f;
+
/* You can choose between:
LIBINPUT_CONFIG_SCROLL_NO_SCROLL
LIBINPUT_CONFIG_SCROLL_2FG
diff --git a/dwl.c b/dwl.c
index dc0437e..7e8d50d 100644
--- a/dwl.c
+++ b/dwl.c
@@ -581,13 +581,20 @@ axisnotify(struct wl_listener *listener, void *data)
/* This event is forwarded by the cursor when a pointer emits an axis event,
* for example when you move the scroll wheel. */
struct wlr_pointer_axis_event *event = data;
+ double delta = event->delta;
+ int32_t delta_disc = event->delta_discrete;
+ if(event->source == WLR_AXIS_SOURCE_FINGER) {
+ delta *= scroll_factor;
+ delta_disc = (int32_t)round(scroll_factor * delta_disc);
+ }
+
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
/* TODO: allow usage of scroll whell for mousebindings, it can be implemented
* checking the event's orientation and the delta of the event */
/* Notify the client with pointer focus of the axis event. */
wlr_seat_pointer_notify_axis(seat,
- event->time_msec, event->orientation, event->delta,
- event->delta_discrete, event->source);
+ event->time_msec, event->orientation, delta,
+ delta_disc, event->source);
}
void
--
2.45.2