+ sel->tags[arg->i] = tags[arg->i];
+ arrange(NULL);
+}
+
+static void
+ban_client(Client *c)
+{
+ XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
+ XMoveWindow(dpy, c->title, c->tx + 2 * sw, c->ty);
+}
+
+void
+floating(Arg *arg)
+{
+ Client *c;
+
+ arrange = floating;
+ for(c = clients; c; c = c->next) {
+ if(c->tags[tsel])
+ resize(c, True);
+ else
+ ban_client(c);
+ }
+ if(sel && !sel->tags[tsel]) {
+ if((sel = next(clients))) {
+ craise(sel);
+ focus(sel);
+ }
+ }
+ discard_events(EnterWindowMask);
+}
+
+void
+tiling(Arg *arg)
+{
+ Client *c;
+ int n, i, w, h;
+
+ w = sw - mw;
+ arrange = tiling;
+ for(n = 0, c = clients; c; c = c->next)
+ if(c->tags[tsel])
+ n++;
+
+ h = (n > 1) ? sh / (n - 1) : sh;
+
+ for(i = 0, c = clients; c; c = c->next) {
+ if(c->tags[tsel]) {
+ if(n == 1) {
+ c->x = sx;
+ c->y = sy;
+ c->w = sw - 2 * c->border;
+ c->h = sh - 2 * c->border;
+ }
+ else if(i == 0) {
+ c->x = sx;
+ c->y = sy;
+ c->w = mw - 2 * c->border;
+ c->h = sh - 2 * c->border;
+ }
+ else {
+ c->x = sx + mw;
+ c->y = sy + (i - 1) * h;
+ c->w = w - 2 * c->border;
+ c->h = h - 2 * c->border;
+ }
+ resize(c, False);
+ i++;
+ }
+ else
+ ban_client(c);
+ }
+ if(sel && !sel->tags[tsel]) {
+ if((sel = next(clients))) {
+ craise(sel);
+ focus(sel);