From a7332016140dcf92aa54870b73c3f29c1313acc0 Mon Sep 17 00:00:00 2001 From: Dhruva Sambrani <44899822+DhruvaSambrani@users.noreply.github.com> Date: Sun, 27 Sep 2026 17:11:40 +0200 Subject: [PATCH] winview: rebase to latest main --- patches/winview/README.md | 1 + patches/winview/winview-20260927.patch | 42 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 patches/winview/winview-20260927.patch diff --git a/patches/winview/README.md b/patches/winview/README.md index 0a3471c..5dbe0cc 100644 --- a/patches/winview/README.md +++ b/patches/winview/README.md @@ -26,6 +26,7 @@ This patch is inspired from . Citing > An example of how to insert this line can be found in the default config file template, config.def.h. ### Download +- [2026-09-27](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/winview/winview-20260927.patch) - [2026-03-14 dwl 0.8](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/winview/winview_dwl_08.patch) - [2024-09-18](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/winview/winview_dwl_07.patch) - [2024-06-06](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/winview/winview-20240606.patch) diff --git a/patches/winview/winview-20260927.patch b/patches/winview/winview-20260927.patch new file mode 100644 index 0000000..d1f87fe --- /dev/null +++ b/patches/winview/winview-20260927.patch @@ -0,0 +1,42 @@ +diff --git a/config.def.h b/config.def.h +index a4019d3..9cbdfe3 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -139,6 +139,7 @@ static const Key keys[] = { + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} }, + { MODKEY, XKB_KEY_e, togglefullscreen, {0} }, + { MODKEY, XKB_KEY_0, view, {.ui = ~0} }, ++ { MODKEY, XKB_KEY_o, winview, {0} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_0, tag, {.ui = ~0} }, + { MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} }, + { MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} }, +diff --git a/dwl.c b/dwl.c +index cca1ea4..d3a8d62 100644 +--- a/dwl.c ++++ b/dwl.c +@@ -370,6 +370,7 @@ static void urgent(struct wl_listener *listener, void *data); + static void view(const Arg *arg); + static void virtualkeyboard(struct wl_listener *listener, void *data); + static void virtualpointer(struct wl_listener *listener, void *data); ++static void winview(const Arg *a); + static Monitor *xytomon(double x, double y); + static void xytonode(double x, double y, struct wlr_surface **psurface, + Client **pc, LayerSurface **pl, double *nx, double *ny); +@@ -3223,6 +3224,17 @@ virtualpointer(struct wl_listener *listener, void *data) + wlr_seat_set_capabilities(seat, seat->capabilities | WL_SEAT_CAPABILITY_POINTER); + } + ++void ++winview(const Arg *a) { ++ Arg b = {0}; ++ Client *sel = focustop(selmon); ++ if(!sel) ++ return; ++ b.ui = sel -> tags; ++ view(&b); ++ return; ++} ++ + Monitor * + xytomon(double x, double y) + {