commit b22a6819ba803bd55985fc8c78e1de996ce644e1
parent e4cee4a347519d0a60f7f74fedb21fccce15bf39
Author: hhvn <dev@hhvn.uk>
Date: Mon, 8 Nov 2021 17:42:11 +0000
config.h tabbed.c: detach clients
Diffstat:
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/config.h b/config.h
@@ -60,6 +60,7 @@ static Key keys[] = {
{ MODKEY, XK_0, move, { .i = 9 } },
{ MODKEY, XK_q, killclient, { 0 } },
+ { MODKEY, XK_d, detachclient,{ 0 } },
{ MODKEY, XK_u, focusurgent, { 0 } },
{ MODKEY|ShiftMask, XK_u, toggle, { .v = (void*) &urgentswitch } },
diff --git a/tabbed.c b/tabbed.c
@@ -114,6 +114,7 @@ static void initfont(const char *fontstr);
static Bool isprotodel(int c);
static void keypress(const XEvent *e);
static void killclient(const Arg *arg);
+static void detachclient(const Arg *arg);
static void manage(Window win);
static void maprequest(const XEvent *e);
static void move(const Arg *arg);
@@ -705,6 +706,12 @@ killclient(const Arg *arg)
}
void
+detachclient(const Arg *arg)
+{
+ XReparentWindow(dpy, clients[sel]->win, root, 0, 0);
+}
+
+void
manage(Window w)
{
updatenumlockmask();