mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2026-06-11 10:23:19 +00:00
rebase to upstream/main
This commit is contained in:
@@ -26,7 +26,8 @@ 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
|
||||
- [2023-11-26](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/winview/winview.patch)
|
||||
- [2024-09-18](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/winview/winview-20240918.patch)
|
||||
- [2024-06-06](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/winview/winview-20240606.patch)
|
||||
- [git branch](https://codeberg.org/dhruva_sambrani/dwl/src/branch/winview)
|
||||
|
||||
### Authors
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index a784eb4..d09ee55 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -140,6 +140,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 6f041a0..65df112 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -346,6 +346,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);
|
||||
@@ -2877,6 +2878,17 @@ virtualpointer(struct wl_listener *listener, void *data)
|
||||
wlr_cursor_map_input_to_output(cursor, &pointer.base, event->suggested_output);
|
||||
}
|
||||
|
||||
+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)
|
||||
{
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index a784eb4..d09ee55 100644
|
||||
index 22d2171..b812525 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -140,6 +140,7 @@ static const Key keys[] = {
|
||||
@@ -143,6 +143,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} },
|
||||
@@ -11,10 +11,10 @@ index a784eb4..d09ee55 100644
|
||||
{ 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 6f041a0..65df112 100644
|
||||
index dc0c861..5c6862c 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -346,6 +346,7 @@ static void urgent(struct wl_listener *listener, void *data);
|
||||
@@ -351,6 +351,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);
|
||||
@@ -22,8 +22,8 @@ index 6f041a0..65df112 100644
|
||||
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);
|
||||
@@ -2877,6 +2878,17 @@ virtualpointer(struct wl_listener *listener, void *data)
|
||||
wlr_cursor_map_input_to_output(cursor, &pointer.base, event->suggested_output);
|
||||
@@ -2942,6 +2943,17 @@ virtualpointer(struct wl_listener *listener, void *data)
|
||||
wlr_cursor_map_input_to_output(cursor, device, event->suggested_output);
|
||||
}
|
||||
|
||||
+void
|
||||
|
||||
Reference in New Issue
Block a user