tabbed

Fork of suckless' tabbed with my personal patches
git clone https://git.instinctive.eu/tabbed.git
Log | Files | Refs | README | LICENSE

commit d7be05b8f5cd84c88868a7a9a153a1ae763520cb
parent 0e9ee18e5e8ee6075d5c34d50f1978c445b1d1b5
Author: Natasha Kerensikova <natacha@instinctive.eu>
Date:   Sun, 12 Mar 2023 10:18:59 +0100

Command-line option for autohide

Diffstat:
Mtabbed.1 | 3+++
Mtabbed.c | 9++++++---
2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/tabbed.1 b/tabbed.1 @@ -3,6 +3,7 @@ tabbed \- generic tabbed interface .SH SYNOPSIS .B tabbed +.RB [ \-a ] .RB [ \-c ] .RB [ \-d ] .RB [ \-k ] @@ -38,6 +39,8 @@ disabled by providing the -s parameter. If no command is provided tabbed will just print its xid and run no command. .SH OPTIONS .TP +.B \-a +hide tab bar when there is only one client. .B \-c close tabbed when the last tab is closed. Mutually exclusive with -f. .TP diff --git a/tabbed.c b/tabbed.c @@ -156,7 +156,7 @@ static int bh, obh, wx, wy, ww, wh, vbh; static unsigned int numlockmask; static Bool running = True, nextfocus, doinitspawn = True, fillagain = False, closelastclient = False, - killclientsfirst = False; + killclientsfirst = False, autoHide = False; static Display *dpy; static DC dc; static Atom wmatom[WMLast]; @@ -338,7 +338,7 @@ drawbar(void) return; } - nbh = nclients > 1 ? vbh : 0; + nbh = (!autoHide || nclients > 1) ? vbh : 0; if (bh != nbh) { bh = nbh; for (i = 0; i < nclients; i++) @@ -1283,7 +1283,7 @@ xsettitle(Window w, const char *str) void usage(void) { - die("usage: %s [-dfksv] [-g geometry] [-n name] [-p [s+/-]pos]\n" + die("usage: %s [-adfksv] [-g geometry] [-n name] [-p [s+/-]pos]\n" " [-r narg] [-o color] [-O color] [-t color] [-T color]\n" " [-u color] [-U color] command...\n", argv0); } @@ -1296,6 +1296,9 @@ main(int argc, char *argv[]) char *pstr; ARGBEGIN { + case 'a': + autoHide = True; + break; case 'c': closelastclient = True; fillagain = False;