@@ 157,6 157,7 @@ static const Key keys[] = {
{ MODKEY, Key_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },
{ MODKEY|WLR_MODIFIER_SHIFT, Key_comma, tagmon, {.i = WLR_DIRECTION_LEFT} },
{ MODKEY|WLR_MODIFIER_SHIFT, Key_period, tagmon, {.i = WLR_DIRECTION_RIGHT} },
+ { MODKEY, Key_period, focusnthclient, {0} },
TAGKEYS( Key_1, 0),
TAGKEYS( Key_2, 1),
TAGKEYS( Key_3, 2),
@@ 323,6 323,7 @@ static void focusclient(Client *c, int lift);
static void focusmon(const Arg *arg);
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 size_t getunusedtag(void);
@@ 568,6 569,8 @@ applyrules(Client *c)
newtags = p->tags;
}
}
+ c->geom.x = (mon->w.width - c->geom.width) / 2 + mon->m.x;
+ c->geom.y = (mon->w.height - c->geom.height) / 2 + mon->m.y;
setmon(c, mon, newtags);
}
@@ 3149,6 3152,22 @@ tagnthmon(const Arg *arg)
}
void
+focusnthclient(const Arg *arg)
+{
+ Client *c;
+ unsigned int i = arg->ui;
+
+ wl_list_for_each(c, &clients, link) {
+ if (i == 0) {
+ focusclient(c, 1);
+ return;
+ }
+
+ i--;
+ }
+}
+
+void
tile(Monitor *m)
{
unsigned int mw, my, ty;