[wiki] [sites] added patch-section and autohide-patch for tabbed || Doomicide

From: <git_AT_suckless.org>
Date: Thu, 06 Dec 2012 21:11:59 +0100

commit 9a1e105982a4005b2d3dac6fde296a66f3326c9a
Author: Doomicide <dm_AT_archlinux.info>
Date: Thu Dec 6 21:11:42 2012 +0100

    added patch-section and autohide-patch for tabbed

diff --git a/tools.suckless.org/tabbed.md b/tools.suckless.org/tabbed.md
deleted file mode 100644
index 71ddb42..0000000
--- a/tools.suckless.org/tabbed.md
+++ /dev/null
_AT_@ -1,20 +0,0 @@
-![tabbed running nyancat](/tabbed.png)
-
-tabbed
-======
-Simple generic tabbed fronted to xembed aware applications, originally designed
-for [surf](http://surf.suckless.org) but also usable with many other
-application, i.e. [st](http://st.suckless.org), [uzbl](http://uzbl.org),
-[urxvt](http://software.schmorp.de/pkg/rxvt-unicode) and
-[xterm](http://invisible-island.net/xterm/)
-
-Development
------------
-You can [browse](http://git.suckless.org/tabbed) its source code repository or get a copy using the following command:
-
- git clone http://git.suckless.org/tabbed
-
-Download
---------
-* [tabbed-0.4.1](http://dl.suckless.org/tools/tabbed-0.4.1.tar.gz) (20120707)
-
diff --git a/tools.suckless.org/tabbed.png b/tools.suckless.org/tabbed.png
deleted file mode 100644
index 41acbc7..0000000
Binary files a/tools.suckless.org/tabbed.png and /dev/null differ
diff --git a/tools.suckless.org/tabbed/index.md b/tools.suckless.org/tabbed/index.md
new file mode 100644
index 0000000..a3404c3
--- /dev/null
+++ b/tools.suckless.org/tabbed/index.md
_AT_@ -0,0 +1,20 @@
+![tabbed running nyancat](tabbed.png)
+
+tabbed
+======
+Simple generic tabbed fronted to xembed aware applications, originally designed
+for [surf](http://surf.suckless.org) but also usable with many other
+application, i.e. [st](http://st.suckless.org), [uzbl](http://uzbl.org),
+[urxvt](http://software.schmorp.de/pkg/rxvt-unicode) and
+[xterm](http://invisible-island.net/xterm/)
+
+Development
+-----------
+You can [browse](http://git.suckless.org/tabbed) its source code repository or get a copy using the following command:
+
+ git clone http://git.suckless.org/tabbed
+
+Download
+--------
+* [tabbed-0.4.1](http://dl.suckless.org/tools/tabbed-0.4.1.tar.gz) (20120707)
+
diff --git a/tools.suckless.org/tabbed/patches/autohide.diff b/tools.suckless.org/tabbed/patches/autohide.diff
new file mode 100644
index 0000000..38dbbec
--- /dev/null
+++ b/tools.suckless.org/tabbed/patches/autohide.diff
_AT_@ -0,0 +1,13 @@
+Autohide
+========
+
+This patch hides the tab bar if only one tab is open.
+
+Download
+--------
+* [tabbed-0.4.1-autohide.diff](tabbed-0.4.1-autohide.diff)
+
+Author
+------
+* original author unknown
+* 0.4.1 doom - <dm_AT_archlinux.info>
diff --git a/tools.suckless.org/tabbed/patches/index.md b/tools.suckless.org/tabbed/patches/index.md
new file mode 100644
index 0000000..9d98e5c
--- /dev/null
+++ b/tools.suckless.org/tabbed/patches/index.md
_AT_@ -0,0 +1,29 @@
+Patches
+=======
+
+diff generation
+---------------
+For git users:
+
+ cd dmenu-directory
+ hg diff > dmenu-X.Y-yourpatchname.diff
+
+For tarballs:
+
+ cd modified-dmenu-directory/..
+ diff -up original-dmenu-directory modified-dmenu-directory > dmenu-X.Y-yourpatchname.diff
+
+where `X.Y` is a dmenu tag name or version number.
+
+
+patch application
+-----------------
+For git users:
+
+ cd dmenu-directory
+ hg patch path/to/patch.diff
+
+For tarballs:
+
+ cd dmenu-directory
+ patch -p1 < path/to/patch.diff
diff --git a/tools.suckless.org/tabbed/patches/tabbed-0.4.1-autohide.diff b/tools.suckless.org/tabbed/patches/tabbed-0.4.1-autohide.diff
new file mode 100644
index 0000000..f4a317a
--- /dev/null
+++ b/tools.suckless.org/tabbed/patches/tabbed-0.4.1-autohide.diff
_AT_@ -0,0 +1,50 @@
+diff -up ../tabbed-0.4.1/tabbed.c ./tabbed.c
+--- ../tabbed-0.4.1/tabbed.c 2012-08-20 09:15:07.000000000 +0200
++++ ./tabbed.c 2012-11-08 20:02:21.048334570 +0100
+_AT_@ -142,7 +142,7 @@ static void (*handler[LASTEvent]) (const
+ [MapRequest] = maprequest,
+ [PropertyNotify] = propertynotify,
+ };
+-static int bh, wx, wy, ww, wh;
++static int vbh, bh, wx, wy, ww, wh;
+ static unsigned int numlockmask = 0;
+ static Bool running = True, nextfocus, doinitspawn = True;
+ static Display *dpy;
+_AT_@ -283,7 +283,7 @@ die(const char *errstr, ...) {
+ void
+ drawbar() {
+ unsigned long *col;
+- int n, width;
++ int n, width, nbh;
+ Client *c, *fc;
+ char *name = NULL;
+
+_AT_@ -292,10 +292,18 @@ drawbar() {
+ dc.w = ww;
+ XFetchName(dpy, win, &name);
+ drawtext(name ? name : "", dc.norm);
+- XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, bh, 0, 0);
++ XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, vbh, 0, 0);
+ XSync(dpy, False);
+ return;
+ }
++ nbh = clients->next ? vbh : 0;
++ if (nbh != bh) {
++ bh = nbh;
++ for (c = clients; c; c = c->next)
++ XMoveResizeWindow(dpy, c->win, 0, bh, ww, wh - bh);
++ }
++ if (bh == 0)
++ return;
+ width = ww;
+ for(c = clients; c; c = c->next)
+ c->tabx = -1;
+_AT_@ -736,7 +744,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[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
+ wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
diff --git a/tools.suckless.org/tabbed/tabbed.png b/tools.suckless.org/tabbed/tabbed.png
new file mode 100644
index 0000000..41acbc7
Binary files /dev/null and b/tools.suckless.org/tabbed/tabbed.png differ
Received on Thu Dec 06 2012 - 21:11:59 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 06 2012 - 21:12:08 CET