diff --git a/patches/menu/README.md b/patches/menu/README.md index 4b0c287..be15fb0 100644 --- a/patches/menu/README.md +++ b/patches/menu/README.md @@ -9,7 +9,8 @@ By default, two menus are available: Edit `menus` array in `config.h` to add/change menus and use a different dmenu program. ### Download -- [2024-05-18](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/menu/menu.patch) +- [git branch](https://codeberg.org/nikitaivanov/dwl/src/branch/menu) +- [2024-07-13](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/menu/menu.patch) ### Authors - [Nikita Ivanov](https://github.com/NikitaIvanovV) diff --git a/patches/menu/menu.patch b/patches/menu/menu.patch index bbb9f2b..ffdc584 100644 --- a/patches/menu/menu.patch +++ b/patches/menu/menu.patch @@ -1,11 +1,11 @@ -commit 63bfca78aab30c6aed18bdbab86cee356b6292f0 +commit 2d7e19dc948aec61746fd858394a9c80d34a3216 Author: Nikita Ivanov -Date: Sat May 18 19:27:05 2024 +0200 +Date: Sat Jul 13 01:05:20 2024 +0200 Add menu command diff --git a/config.def.h b/config.def.h -index 8f498d2..e7c7654 100644 +index 22d2171..ecd2c67 100644 --- a/config.def.h +++ b/config.def.h @@ -20,6 +20,12 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca @@ -18,10 +18,10 @@ index 8f498d2..e7c7654 100644 + { "wmenu -i -p Layouts", menulayoutfeed, menulayoutaction }, +}; + + /* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */ static const Rule rules[] = { /* app_id title tags mask isfloating monitor */ - /* examples: */ -@@ -135,6 +141,8 @@ static const Key keys[] = { +@@ -140,6 +146,8 @@ static const Key keys[] = { { MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} }, { MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XKB_KEY_space, setlayout, {0} }, @@ -31,10 +31,10 @@ index 8f498d2..e7c7654 100644 { MODKEY, XKB_KEY_e, togglefullscreen, {0} }, { MODKEY, XKB_KEY_0, view, {.ui = ~0} }, diff --git a/dwl.c b/dwl.c -index bf763df..7adaccc 100644 +index dc0437e..90bb09a 100644 --- a/dwl.c +++ b/dwl.c -@@ -239,6 +239,12 @@ typedef struct { +@@ -241,6 +241,12 @@ typedef struct { struct wl_listener destroy; } SessionLock; @@ -47,8 +47,8 @@ index bf763df..7adaccc 100644 /* function declarations */ static void applybounds(Client *c, struct wlr_box *bbox); static void applyrules(Client *c); -@@ -295,6 +301,12 @@ static void locksession(struct wl_listener *listener, void *data); - static void maplayersurfacenotify(struct wl_listener *listener, void *data); +@@ -298,6 +304,12 @@ static void killclient(const Arg *arg); + static void locksession(struct wl_listener *listener, void *data); static void mapnotify(struct wl_listener *listener, void *data); static void maximizenotify(struct wl_listener *listener, void *data); +static void menu(const Arg *arg); @@ -60,7 +60,7 @@ index bf763df..7adaccc 100644 static void monocle(Monitor *m); static void motionabsolute(struct wl_listener *listener, void *data); static void motionnotify(uint32_t time, struct wlr_input_device *device, double sx, -@@ -405,6 +417,11 @@ static struct wlr_box sgeom; +@@ -408,6 +420,11 @@ static struct wlr_box sgeom; static struct wl_list mons; static Monitor *selmon; @@ -72,15 +72,15 @@ index bf763df..7adaccc 100644 #ifdef XWAYLAND static void activatex11(struct wl_listener *listener, void *data); static void associatex11(struct wl_listener *listener, void *data); -@@ -659,6 +676,7 @@ cleanup(void) +@@ -675,6 +692,7 @@ cleanup(void) wlr_xwayland_destroy(xwayland); xwayland = NULL; #endif + wl_event_source_remove(menu_source); wl_display_destroy_clients(dpy); if (child_pid > 0) { - kill(child_pid, SIGTERM); -@@ -1645,6 +1663,136 @@ maximizenotify(struct wl_listener *listener, void *data) + kill(-child_pid, SIGTERM); +@@ -1717,6 +1735,136 @@ maximizenotify(struct wl_listener *listener, void *data) wlr_xdg_surface_schedule_configure(c->surface.xdg); } @@ -217,7 +217,7 @@ index bf763df..7adaccc 100644 void monocle(Monitor *m) { -@@ -2510,6 +2658,10 @@ setup(void) +@@ -2576,6 +2724,10 @@ setup(void) * e.g when running in the x11 backend or the wayland backend and the * compositor has Xwayland support */ unsetenv("DISPLAY");