mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2026-11-03 11:52:25 +00:00
winview: rebase to latest main
This commit is contained in:
@@ -26,6 +26,7 @@ This patch is inspired from <https://dwm.suckless.org/patches/winview/>. 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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
Reference in New Issue
Block a user