dwl-patches overhaul

Eliminated wiki.
Individual patches have a README.md explanation in their own subdirectory.
Simplified submission of new patches and maintenance of existing patches.
Instructions page (README.md autodisplayed) is now at https://codeberg.org/dwl/dwl-patches/
This commit is contained in:
A Frederick Christensen
2024-04-24 20:20:07 -05:00
parent d6b051f5b8
commit 9c5d5d85f3
183 changed files with 1434 additions and 4 deletions
+34
View File
@@ -0,0 +1,34 @@
### Description
Implements the function `winview` which switches the visible tags to the tags on which the current client is visible.
This patch is inspired from <https://dwm.suckless.org/patches/winview/>. Citing the description of the dwm patch:
> Dwm tags are a powerfull feature that allows organizing windows in workspaces. Sometime it can be difficult to remember the tag to activate to unhide a window. With the winview patch the window to unhide can be selected from the all-window view. The user switches to the all-window view (Mod1-0), selects the window (Mod1-j/k or using the mouse) and press Mod1-o. The key Mod1-o switches the view to the selected window tag.
>
> #### Recommend patches
>
> The grid layout is well adapted to display many windows in a limited space. Using both grid and pertag patches you will be able to select this layout for the all-window view while keeping your preferred layout for the other views.
> Configuration and Installation
> Using the default configuration file
>
> Make sure the directory where you build dwm does not contain a config.h file;
> Apply the patch;
> Run make and make install.
>
> Using an existing customised configuration file
>
> Apply the patch; Add the following element in the keys array:
>
> `{ MODKEY, XK_o, winview, {0} },`
>
> Run make and make install.
>
> An example of how to insert this line can be found in the default config file template, config.def.h.
### Download
- [2023-11-26](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/winview/winview.patch)
- [git branch](https://codeberg.org/dhruva_sambrani/dwl/src/branch/winview)
### Authors
- [Dhruva Sambrani](https://codeberg.org/dhruva_sambrani)
+55
View File
@@ -0,0 +1,55 @@
From 7a2b65af8c7a56c8d78875530685422702be993e Mon Sep 17 00:00:00 2001
From: Dhruva Sambrani <44899822+DhruvaSambrani@users.noreply.github.com>
Date: Mon, 8 Jan 2024 15:04:09 +0100
Subject: [PATCH] first winview commit
---
config.def.h | 1 +
dwl.c | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/config.def.h b/config.def.h
index a8ed61d..af9d866 100644
--- a/config.def.h
+++ b/config.def.h
@@ -138,6 +138,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_parenright, 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 632dabf..5f3a596 100644
--- a/dwl.c
+++ b/dwl.c
@@ -327,6 +327,7 @@ static void updatetitle(struct wl_listener *listener, void *data);
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 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);
@@ -2726,6 +2727,17 @@ virtualkeyboard(struct wl_listener *listener, void *data)
wlr_keyboard_group_add_keyboard(vkb_group.wlr_group, &keyboard->keyboard);
}
+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)
{
--
2.43.0