rebase viewnextocctag patch to main

This commit is contained in:
Ben Collerson 2024-06-07 08:45:39 +10:00
parent 1812d4926a
commit f807d2536d

View File

@ -1,47 +1,47 @@
From 9831bdfcadaf779640bf7c5662fc40fdc278a8ba Mon Sep 17 00:00:00 2001 From 330fa634a83e9b332494fade75552e02583bad6c Mon Sep 17 00:00:00 2001
From: Ben Collerson <benc@benc.cc> From: Ben Collerson <benc@benc.cc>
Date: Sat, 30 Dec 2023 13:39:31 +1000 Date: Sat, 30 Dec 2023 13:39:31 +1000
Subject: [PATCH] viewnextocctag Subject: [PATCH] viewnextocctag
--- ---
config.def.h | 2 ++ config.def.h | 2 ++
dwl.c | 33 +++++++++++++++++++++++++++++++++ dwl.c | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+) 2 files changed, 36 insertions(+)
diff --git a/config.def.h b/config.def.h diff --git a/config.def.h b/config.def.h
index a8ed61d9..a668d0b0 100644 index a784eb4f..e1a6a428 100644
--- a/config.def.h --- a/config.def.h
+++ b/config.def.h +++ b/config.def.h
@@ -128,6 +128,8 @@ static const Key keys[] = { @@ -130,6 +130,8 @@ static const Key keys[] = {
{ MODKEY, XKB_KEY_d, incnmaster, {.i = -1} }, { MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05} }, { MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05} }, { MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_H, viewnextocctag, {.i = -1} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_H, viewnextocctag, {.i = -1} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_L, viewnextocctag, {.i = +1} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_L, viewnextocctag, {.i = +1} },
{ MODKEY, XKB_KEY_Return, zoom, {0} }, { MODKEY, XKB_KEY_Return, zoom, {0} },
{ MODKEY, XKB_KEY_Tab, view, {0} }, { MODKEY, XKB_KEY_Tab, view, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} }, { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
diff --git a/dwl.c b/dwl.c diff --git a/dwl.c b/dwl.c
index 4d19357f..a42c4871 100644 index 6f041a0d..df5461d0 100644
--- a/dwl.c --- a/dwl.c
+++ b/dwl.c +++ b/dwl.c
@@ -286,6 +286,7 @@ static void motionabsolute(struct wl_listener *listener, void *data); @@ -304,6 +304,7 @@ static void motionnotify(uint32_t time, struct wlr_input_device *device, double
static void motionnotify(uint32_t time); double sy, double sx_unaccel, double sy_unaccel);
static void motionrelative(struct wl_listener *listener, void *data); static void motionrelative(struct wl_listener *listener, void *data);
static void moveresize(const Arg *arg); static void moveresize(const Arg *arg);
+unsigned int nextocctag(int); +unsigned int nextocctag(int);
static void outputmgrapply(struct wl_listener *listener, void *data); static void outputmgrapply(struct wl_listener *listener, void *data);
static void outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test); static void outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test);
static void outputmgrtest(struct wl_listener *listener, void *data); static void outputmgrtest(struct wl_listener *listener, void *data);
@@ -326,6 +327,7 @@ static void updatemons(struct wl_listener *listener, void *data); @@ -344,6 +345,7 @@ static void updatemons(struct wl_listener *listener, void *data);
static void updatetitle(struct wl_listener *listener, void *data); static void updatetitle(struct wl_listener *listener, void *data);
static void urgent(struct wl_listener *listener, void *data); static void urgent(struct wl_listener *listener, void *data);
static void view(const Arg *arg); static void view(const Arg *arg);
+static void viewnextocctag(const Arg *argint); +static void viewnextocctag(const Arg *argint);
static void virtualkeyboard(struct wl_listener *listener, void *data); static void virtualkeyboard(struct wl_listener *listener, void *data);
static void virtualpointer(struct wl_listener *listener, void *data);
static Monitor *xytomon(double x, double y); static Monitor *xytomon(double x, double y);
static void xytonode(double x, double y, struct wlr_surface **psurface, @@ -1868,6 +1870,27 @@ moveresize(const Arg *arg)
@@ -1697,6 +1699,26 @@ moveresize(const Arg *arg)
} }
} }
@ -65,10 +65,11 @@ index 4d19357f..a42c4871 100644
+ +
+ return seltag & TAGMASK; + return seltag & TAGMASK;
+} +}
+
void void
outputmgrapply(struct wl_listener *listener, void *data) outputmgrapply(struct wl_listener *listener, void *data)
{ {
@@ -2714,6 +2736,17 @@ view(const Arg *arg) @@ -2852,6 +2875,17 @@ view(const Arg *arg)
printstatus(); printstatus();
} }
@ -87,5 +88,5 @@ index 4d19357f..a42c4871 100644
virtualkeyboard(struct wl_listener *listener, void *data) virtualkeyboard(struct wl_listener *listener, void *data)
{ {
-- --
2.43.0 2.45.1