ports/contrib (3.4): tabbed: remove config.h
commit 52056d73ee3a41abff435f38f59aed392143c535 Author: John Vogel <jvogel4@stny.rr.com> Date: Tue May 22 22:35:41 2018 -0400 tabbed: remove config.h Also expand README to explain how to generate a custom config.h and some hints on using this port as a reference for a private and customized tabbed port. diff --git a/tabbed/.md5sum b/tabbed/.md5sum index ea205ddf..4ba7e5ae 100644 --- a/tabbed/.md5sum +++ b/tabbed/.md5sum @@ -1,2 +1 @@ -910b1cbcf62051064c58029987e05db8 config.h 7898992feb9358e0196119750b77b42c tabbed-0.6.tar.gz diff --git a/tabbed/.signature b/tabbed/.signature index ac906fdf..e448e887 100644 --- a/tabbed/.signature +++ b/tabbed/.signature @@ -1,6 +1,5 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3wy+8aXDScJvCyLQjMKZ/8J9oBGmgUm+U87wxYi+BBM/MWmQiBBWXFxjN4yij/VR8ztzpYOgVdaUjHZEnWjmwgo= -SHA256 (Pkgfile) = 52d447b0e9d0825ac3fca5425143198722083969b9ddbab77c9d9f85eb95562c +RWSagIOpLGJF38t22lu2LUKfs6BH+5uaYXCC/qlDrv3TtA0UjY2E+Sgj2DSMyeq7BkQzi8BPwgDckYojz1EJ6m6X9/6RdPz53Q0= +SHA256 (Pkgfile) = 6b8ccaddf1c4b525acaaff7632c2a17e8e8d466a47d1acd83bf3f158ceddd369 SHA256 (.footprint) = fe3b64ecc7dfd8cb41db9f7c9413838451390cc68fb45a4eceacb82636d6f2ec SHA256 (tabbed-0.6.tar.gz) = 7651ea3acbec5d6a25469e8665da7fc70aba2b4fa61a2a6a5449eafdfd641c42 -SHA256 (config.h) = b53a40916d44090c31cdf5b259336deb70b79d15888f6941e7b8d216370cda55 diff --git a/tabbed/Pkgfile b/tabbed/Pkgfile index a212658c..70796376 100644 --- a/tabbed/Pkgfile +++ b/tabbed/Pkgfile @@ -5,13 +5,16 @@ name=tabbed version=0.6 -release=1 -source=(http://dl.suckless.org/tools/$name-$version.tar.gz config.h) +release=2 +source=(http://dl.suckless.org/tools/$name-$version.tar.gz) build () { - cd "$name-$version" + cd $name-$version + + if [ -f $PKGMK_ROOT/config.h ]; then + cp $PKGMK_ROOT/config.h . + fi - cp $SRC/config.h . make CC=gcc make DESTDIR=$PKG PREFIX=/usr install } diff --git a/tabbed/README b/tabbed/README index d285b389..473940a6 100644 --- a/tabbed/README +++ b/tabbed/README @@ -1 +1,14 @@ -Edit config.h and rebuild the package to configure tabbed. +The configuration of tabbed is done by creating a custom config.h +and (re)compiling the source code. To create a custom config.h, +unpack the tarball, copy the file tabbed-$version/config.def.h to +tabbed's port directory, and edit to suit your preferences. Then, +when you call pkgmk in the tabbed port directory, the custom +config.h will be detected and copied into the source before +compilation. I recommend that you save a copy your custom config.h +some where other than the tabbed port directory, so that your changes +won't get nuked when updating ports or performing a prtsweep or +prtwash (see opt/prt-utils for more information about those two). + +Another solution for customizing tabbed is to create a custom and +(preferably) private port that contains your custom config and also +might include patches, such as from https://suckless.org/patches/. diff --git a/tabbed/config.h b/tabbed/config.h deleted file mode 100644 index ceda9f70..00000000 --- a/tabbed/config.h +++ /dev/null @@ -1,58 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -/* appearance */ -static const char font[] = "-*-*-medium-*-*-*-14-*-*-*-*-*-*-*"; -static const char* normbgcolor = "#222222"; -static const char* normfgcolor = "#cccccc"; -static const char* selbgcolor = "#555555"; -static const char* selfgcolor = "#ffffff"; -static const char before[] = "<"; -static const char after[] = ">"; -static const int tabwidth = 200; -static const Bool foreground = True; - -/* - * Where to place a new tab when it is opened. When npisrelative is True, - * then the current position is changed + newposition. If npisrelative - * is False, then newposition is an absolute position. - */ -static int newposition = 0; -static Bool npisrelative = False; - -#define SETPROP(p) { \ - .v = (char *[]){ "/bin/sh", "-c", \ - "prop=\"`xwininfo -children -id $1 | grep '^ 0x' | sed -e's@^ *\\(0x[0-9a-f]*\\) \"\\([^\"]*\\)\".*@\\1 \\2@' | xargs -0 printf %b | dmenu -l 10`\" &&" \ - "xprop -id $1 -f $0 8s -set $0 \"$prop\"", \ - p, winid, NULL \ - } \ -} - -#define MODKEY ControlMask -static Key keys[] = { \ - /* modifier key function argument */ - { MODKEY|ShiftMask, XK_Return, focusonce, { 0 } }, - { MODKEY|ShiftMask, XK_Return, spawn, { 0 } }, - { MODKEY, XK_t, spawn, SETPROP("_TABBED_SELECT_TAB") }, - - { MODKEY|ShiftMask, XK_l, rotate, { .i = +1 } }, - { MODKEY|ShiftMask, XK_h, rotate, { .i = -1 } }, - { MODKEY|ShiftMask, XK_j, movetab, { .i = -1 } }, - { MODKEY|ShiftMask, XK_k, movetab, { .i = +1 } }, - { MODKEY, XK_Tab, rotate, { .i = 0 } }, - - { MODKEY, XK_1, move, { .i = 0 } }, - { MODKEY, XK_2, move, { .i = 1 } }, - { MODKEY, XK_3, move, { .i = 2 } }, - { MODKEY, XK_4, move, { .i = 3 } }, - { MODKEY, XK_5, move, { .i = 4 } }, - { MODKEY, XK_6, move, { .i = 5 } }, - { MODKEY, XK_7, move, { .i = 6 } }, - { MODKEY, XK_8, move, { .i = 7 } }, - { MODKEY, XK_9, move, { .i = 8 } }, - { MODKEY, XK_0, move, { .i = 9 } }, - - { MODKEY, XK_q, killclient, { 0 } }, - - { 0, XK_F11, fullscreen, { 0 } }, -}; -
participants (1)
-
crux@crux.nu