~ruther/dwl

236982e2f0eb5eed6e6c4269e2fc1e934d0f687e — Rutherther 8 months ago bde847d + 4a50263
Merge branch 'v0.7/focusnthclient' into v0.7/patched-base
2 files changed, 22 insertions(+), 0 deletions(-)

M config.def.h
M dwl.c
M config.def.h => config.def.h +1 -0
@@ 171,6 171,7 @@ static const Key keys[] = {
	{ MODKEY,                    XKB_KEY_period,     focusmon,       {.i = WLR_DIRECTION_RIGHT} },
	{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_less,       tagmon,         {.i = WLR_DIRECTION_LEFT} },
	{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_greater,    tagmon,         {.i = WLR_DIRECTION_RIGHT} },
	{ MODKEY,                    XKB_KEY_m,          focusnthclient, {0} },
	TAGKEYS(          XKB_KEY_1, XKB_KEY_exclam,                     0),
	TAGKEYS(          XKB_KEY_2, XKB_KEY_at,                         1),
	TAGKEYS(          XKB_KEY_3, XKB_KEY_numbersign,                 2),

M dwl.c => dwl.c +21 -0
@@ 332,6 332,7 @@ static void focusortogglescratch(const Arg *arg);
static Monitor *numtomon(int num);
static void focusnthmon(const Arg *arg);
static void focusstack(const Arg *arg);
static void focusnthclient(const Arg *arg);
static Client *focustop(Monitor *m);
static void fullscreennotify(struct wl_listener *listener, void *data);
static void gpureset(struct wl_listener *listener, void *data);


@@ 3321,6 3322,26 @@ tagnthmon(const Arg *arg)
}

void
focusnthclient(const Arg *arg)
{
	Client *c;
	unsigned int i = arg->ui;

	wl_list_for_each(c, &clients, link) {
		if (!VISIBLEON(c, selmon) || c->isfloating) {
			continue;
		}

		if (i == 0) {
			focusclient(c, 1);
			return;
		}

		i--;
	}
}

void
tile(Monitor *m)
{
	unsigned int mw, my, ty;

Do not follow this link