[wiki] [sites] [tabbed][patch][hidetabs] Update hidetabs to apply cleanly on tabbed 0.9 || m3cgx

From: <git_AT_suckless.org>
Date: Mon, 26 Jan 2026 04:24:52 +0100

commit 1a839ad07586a44a5513237d38f36ec0e6bf7a83
Author: m3cgx <m3cgx_AT_airmail.cc>
Date: Sun Jan 25 22:22:09 2026 -0500

    [tabbed][patch][hidetabs] Update hidetabs to apply cleanly on tabbed 0.9

diff --git a/tools.suckless.org/tabbed/patches/hidetabs/index.md b/tools.suckless.org/tabbed/patches/hidetabs/index.md
index 2b98ee7f..cd08a822 100644
--- a/tools.suckless.org/tabbed/patches/hidetabs/index.md
+++ b/tools.suckless.org/tabbed/patches/hidetabs/index.md
_AT_@ -7,15 +7,16 @@ This patch hides all the tabs and only shows them when Mod+Shift is pressed.
 All functions with switching, rotating, and creating tabs involve Mod+Shift.
 When not doing one of these functions, visibility of the tabs is not needed.
 
-This patch relies on the keyrelease patch to support show/hide on
+This patch relies on the keyrelease patch to support show/hide on
 keypress/keyrelease.
 
-This patch was inspired by and borrows from the autohide patch originally
+This patch was inspired by and borrows from the autohide patch originally
 by Carlos Pita.
 
 Download
 --------
 * [tabbed-hidetabs-20191216-b5f9ec6.diff](tabbed-hidetabs-20191216-b5f9ec6.diff)
+* [tabbed-hidetabs-0.9.diff](tabbed-hidetabs-0.9.diff)
 
 Author
 ------
diff --git a/tools.suckless.org/tabbed/patches/hidetabs/tabbed-hidetabs-0.9.diff b/tools.suckless.org/tabbed/patches/hidetabs/tabbed-hidetabs-0.9.diff
new file mode 100644
index 00000000..96a69585
--- /dev/null
+++ b/tools.suckless.org/tabbed/patches/hidetabs/tabbed-hidetabs-0.9.diff
_AT_@ -0,0 +1,95 @@
+diff --git a/config.def.h b/config.def.h
+index 3b8ac97..35b2423 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -63,10 +63,13 @@ static const Key keys[] = {
+ { MODKEY|ShiftMask, XK_u, toggle, { .v = (void*) &urgentswitch } },
+
+ { 0, XK_F11, fullscreen, { 0 } },
++
++ { MODKEY, XK_Shift_L, showbar, { .i = 1 } },
++ { ShiftMask, XK_Control_L, showbar, { .i = 1 } },
+ };
+
+ static Key keyreleases[] = {
+ /* modifier key function argument */
+- { 0, XK_Shift_L, NULL, { 0 } },
+-
++ { MODKEY|ShiftMask, XK_Shift_L, showbar, { .i = 0 } },
++ { MODKEY|ShiftMask, XK_Control_L, showbar, { .i = 0 } },
+ };
+diff --git a/tabbed.c b/tabbed.c
+index 017deb2..f4e6c63 100644
+--- a/tabbed.c
++++ b/tabbed.c
+_AT_@ -127,6 +127,7 @@ static void run(void);
+ static void sendxembed(int c, long msg, long detail, long d1, long d2);
+ static void setcmd(int argc, char *argv[], int);
+ static void setup(void);
++static void showbar(const Arg *arg);
+ static void spawn(const Arg *arg);
+ static int textnw(const char *text, unsigned int len);
+ static void toggle(const Arg *arg);
+_AT_@ -154,7 +155,7 @@ static void (*handler[LASTEvent]) (const XEvent *) = {
+ [MapRequest] = maprequest,
+ [PropertyNotify] = propertynotify,
+ };
+-static int bh, obh, wx, wy, ww, wh;
++static int bh, obh, wx, wy, ww, wh, vbh;
+ static unsigned int numlockmask;
+ static Bool running = True, nextfocus, doinitspawn = True,
+ fillagain = False, closelastclient = False,
+_AT_@ -171,6 +172,7 @@ static char winid[64];
+ static char **cmd;
+ static char *wmname = "tabbed";
+ static const char *geometry;
++static Bool barvisibility = False;
+
+ char *argv0;
+
+_AT_@ -326,9 +328,18 @@ void
+ drawbar(void)
+ {
+ XftColor *col;
+- int c, cc, fc, width;
++ int c, cc, fc, width, nbh;
+ char *name = NULL;
+
++ nbh = barvisibility ? vbh : 0;
++ if (nbh != bh) {
++ bh = nbh;
++ for (c = 0; c < nclients; c++)
++ XMoveResizeWindow(dpy, clients[c]->win, 0, bh, ww, wh-bh);
++ }
++
++ if (bh == 0) return;
++
+ if (nclients == 0) {
+ dc.x = 0;
+ dc.w = ww;
+_AT_@ -1031,7 +1042,7 @@ setup(void)
+ screen = DefaultScreen(dpy);
+ root = RootWindow(dpy, screen);
+ initfont(font);
+- bh = dc.h = dc.font.height + 2;
++ vbh = dc.h = dc.font.height + 2;
+
+ /* init atoms */
+ wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
+_AT_@ -1125,6 +1136,13 @@ setup(void)
+ focus(-1);
+ }
+
++void
++showbar(const Arg *arg)
++{
++ barvisibility = arg->i;
++ drawbar();
++}
++
+ void
+ spawn(const Arg *arg)
+ {
+--
+2.51.0
+
Received on Mon Jan 26 2026 - 04:24:52 CET

This archive was generated by hypermail 2.3.0 : Mon Jan 26 2026 - 04:36:45 CET