From 6f898cdbdf5e712dc71ccc08d2dab7ac910843a8 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Fri, 21 Jun 2024 13:33:56 +0000 Subject: [PATCH] rebase dimkr patches --- patches/envcfg/envcfg.patch | 24 ++++++++++++------------ patches/fallback/fallback.patch | 8 ++++---- patches/right/right.patch | 12 ++++++------ patches/snail/snail.patch | 16 ++++++++-------- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/patches/envcfg/envcfg.patch b/patches/envcfg/envcfg.patch index caafdd5..ca9328d 100644 --- a/patches/envcfg/envcfg.patch +++ b/patches/envcfg/envcfg.patch @@ -1,4 +1,4 @@ -From a822ac65306ca331b95b17ffe08147110c03c60d Mon Sep 17 00:00:00 2001 +From 3c3ea42cd50bfa5111be69b3c1f71afa0443bb53 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sat, 30 Dec 2023 10:49:48 +0200 Subject: [PATCH] allow environment variables to override config.h @@ -12,19 +12,19 @@ Subject: [PATCH] allow environment variables to override config.h create mode 100644 env.c diff --git a/Makefile b/Makefile -index 0822ddc..fbdfdca 100644 +index 9308656..c66d376 100644 --- a/Makefile +++ b/Makefile -@@ -17,6 +17,7 @@ all: dwl - dwl: dwl.o util.o - $(CC) dwl.o util.o $(LDLIBS) $(LDFLAGS) $(DWLCFLAGS) -o $@ - dwl.o: dwl.c config.mk config.h client.h cursor-shape-v1-protocol.h xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h +@@ -22,6 +22,7 @@ dwl: dwl.o util.o + dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h \ + pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h \ + wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h +dwl.o: env.c util.o: util.c util.h # wayland-scanner is a tool which generates C headers and rigging for Wayland diff --git a/config.def.h b/config.def.h -index 9009517..c6b9ae0 100644 +index a784eb4..e0f10de 100644 --- a/config.def.h +++ b/config.def.h @@ -6,11 +6,11 @@ @@ -41,14 +41,14 @@ index 9009517..c6b9ae0 100644 +static float bordercolor[] = COLOR(0x444444ff); +static float focuscolor[] = COLOR(0x005577ff); +static float urgentcolor[] = COLOR(0xff0000ff); - /* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */ + /* 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 fa76db2..6dd4524 100644 +index d48bf40..de33dfe 100644 --- a/dwl.c +++ b/dwl.c -@@ -407,6 +407,8 @@ static xcb_atom_t netatom[NetLast]; +@@ -429,6 +429,8 @@ static xcb_atom_t netatom[NetLast]; /* attempt to encapsulate suck into one file */ #include "client.h" @@ -57,7 +57,7 @@ index fa76db2..6dd4524 100644 /* function implementations */ void applybounds(Client *c, struct wlr_box *bbox) -@@ -1010,6 +1012,8 @@ createpointer(struct wlr_pointer *pointer) +@@ -1082,6 +1084,8 @@ createpointer(struct wlr_pointer *pointer) libinput_device_config_accel_set_profile(device, accel_profile); libinput_device_config_accel_set_speed(device, accel_speed); } @@ -66,7 +66,7 @@ index fa76db2..6dd4524 100644 } wlr_cursor_attach_input_device(cursor, &pointer->base); -@@ -2974,6 +2978,7 @@ main(int argc, char *argv[]) +@@ -3141,6 +3145,7 @@ main(int argc, char *argv[]) /* Wayland requires XDG_RUNTIME_DIR for creating its communications socket */ if (!getenv("XDG_RUNTIME_DIR")) die("XDG_RUNTIME_DIR must be set"); diff --git a/patches/fallback/fallback.patch b/patches/fallback/fallback.patch index 48a6d6e..b734625 100644 --- a/patches/fallback/fallback.patch +++ b/patches/fallback/fallback.patch @@ -1,4 +1,4 @@ -From 830f6ed5352d32a66c62f49b28439b2bcd904417 Mon Sep 17 00:00:00 2001 +From a94c52af879027e654f67c36621a8c9b2f338f56 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sat, 2 Dec 2023 10:36:35 +0200 Subject: [PATCH] fall back to a lower output mode if needed @@ -9,10 +9,10 @@ Subject: [PATCH] fall back to a lower output mode if needed 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c -index fa76db2..88cabeb 100644 +index d48bf40..7719f7e 100644 --- a/dwl.c +++ b/dwl.c -@@ -848,6 +848,7 @@ createmon(struct wl_listener *listener, void *data) +@@ -920,6 +920,7 @@ createmon(struct wl_listener *listener, void *data) /* This event is raised by the backend when a new output (aka a display or * monitor) becomes available. */ struct wlr_output *wlr_output = data; @@ -20,7 +20,7 @@ index fa76db2..88cabeb 100644 const MonitorRule *r; size_t i; struct wlr_output_state state; -@@ -884,7 +885,17 @@ createmon(struct wl_listener *listener, void *data) +@@ -956,7 +957,17 @@ createmon(struct wl_listener *listener, void *data) * monitor supports only a specific set of modes. We just pick the * monitor's preferred mode; a more sophisticated compositor would let * the user configure it. */ diff --git a/patches/right/right.patch b/patches/right/right.patch index 2395e8a..baf8eeb 100644 --- a/patches/right/right.patch +++ b/patches/right/right.patch @@ -1,4 +1,4 @@ -From 65e3f3eb1eea35601949499c0cd2c2032773b732 Mon Sep 17 00:00:00 2001 +From 9d4b0ebb95381525351b05aad6a98f1747ae96e2 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Thu, 21 Jul 2022 21:14:14 +0300 Subject: [PATCH] extend the display to the right @@ -8,10 +8,10 @@ Subject: [PATCH] extend the display to the right 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dwl.c b/dwl.c -index fa76db2..0fe3e97 100644 +index d48bf40..fb795e1 100644 --- a/dwl.c +++ b/dwl.c -@@ -851,7 +851,8 @@ createmon(struct wl_listener *listener, void *data) +@@ -923,7 +923,8 @@ createmon(struct wl_listener *listener, void *data) const MonitorRule *r; size_t i; struct wlr_output_state state; @@ -21,7 +21,7 @@ index fa76db2..0fe3e97 100644 if (!wlr_output_init_render(wlr_output, alloc, drw)) return; -@@ -895,6 +896,14 @@ createmon(struct wl_listener *listener, void *data) +@@ -967,6 +968,14 @@ createmon(struct wl_listener *listener, void *data) wlr_output_commit_state(wlr_output, &state); wlr_output_state_finish(&state); @@ -36,10 +36,10 @@ index fa76db2..0fe3e97 100644 wl_list_insert(&mons, &m->link); printstatus(); -@@ -918,7 +927,7 @@ createmon(struct wl_listener *listener, void *data) +@@ -990,7 +999,7 @@ createmon(struct wl_listener *listener, void *data) */ m->scene_output = wlr_scene_output_create(scene, wlr_output); - if (m->m.x < 0 || m->m.y < 0) + if (m->m.x == -1 && m->m.y == -1) - wlr_output_layout_add_auto(output_layout, wlr_output); + wlr_output_layout_add(output_layout, wlr_output, max_x, max_x_y); else diff --git a/patches/snail/snail.patch b/patches/snail/snail.patch index 8876b92..2d74397 100644 --- a/patches/snail/snail.patch +++ b/patches/snail/snail.patch @@ -1,4 +1,4 @@ -From f74add348119aa8e953e2f49bf5588d29c1151e3 Mon Sep 17 00:00:00 2001 +From 75423c5e2614f31d95729e25159ed9162f95a667 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sun, 11 Feb 2024 09:09:16 +0200 Subject: [PATCH] add the snail layout @@ -97,10 +97,10 @@ With 2 windows in the master area, many windows in the stack and low mfact: 2 files changed, 105 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h -index 9009517..1969030 100644 +index a784eb4..e29af77 100644 --- a/config.def.h +++ b/config.def.h -@@ -34,6 +34,7 @@ static const Layout layouts[] = { +@@ -33,6 +33,7 @@ static const Layout layouts[] = { { "[]=", tile }, { "><>", NULL }, /* no layout function means floating behavior */ { "[M]", monocle }, @@ -108,7 +108,7 @@ index 9009517..1969030 100644 }; /* monitors */ -@@ -44,7 +45,7 @@ static const MonitorRule monrules[] = { +@@ -45,7 +46,7 @@ static const MonitorRule monrules[] = { { "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 }, */ /* defaults */ @@ -117,7 +117,7 @@ index 9009517..1969030 100644 }; /* keyboard */ -@@ -134,6 +135,7 @@ static const Key keys[] = { +@@ -136,6 +137,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]} }, @@ -126,10 +126,10 @@ index 9009517..1969030 100644 { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} }, { MODKEY, XKB_KEY_e, togglefullscreen, {0} }, diff --git a/dwl.c b/dwl.c -index fa76db2..ca7830d 100644 +index d48bf40..5dcd64c 100644 --- a/dwl.c +++ b/dwl.c -@@ -312,6 +312,7 @@ static void setmon(Client *c, Monitor *m, uint32_t newtags); +@@ -331,6 +331,7 @@ static void setmon(Client *c, Monitor *m, uint32_t newtags); static void setpsel(struct wl_listener *listener, void *data); static void setsel(struct wl_listener *listener, void *data); static void setup(void); @@ -137,7 +137,7 @@ index fa76db2..ca7830d 100644 static void spawn(const Arg *arg); static void startdrag(struct wl_listener *listener, void *data); static void tag(const Arg *arg); -@@ -2420,6 +2421,107 @@ setup(void) +@@ -2581,6 +2582,107 @@ setup(void) #endif }