Re: [dev] [tabbed] [PATCH] Remove unnecessary xargs call.

From: Markus Teich <markus.teich_AT_stusta.mhn.de>
Date: Thu, 10 Apr 2014 08:26:52 +0200

Alexander S. wrote:
> Oh wait, I actually introduced it into surf's SETPROP, but this one
> was probably copied from there.

Yes, I copied it from surf to tabbed:
http://git.suckless.org/tabbed/commit/?id=a1aa453e99f198186d39b90b1229cc1bcb8dc466

Also I tried to reproduce the explained behaviour with both xargs calls removed
from surf and from tabbed by searching for „ä“ (which is non ascii) with
ctrl-g from surf and ctrl-t from tabbed, but nothing unexpected happened. It
showed all urls containing this letter as it should do.

The relevant setting from my surf config.h (I split SETPROP to SETURI and
SETSEARCH):

#define SETURI { \
        .v = (char *[]){ "/bin/sh", "-c", \
                "prop=\"`xprop -id $0 _SURF_URI" \
                " | cut -d '\"' -f 2" \
                " | tac - \"${HOME}/.surf/history\"" \
                " | awk '!x[$0]++'" \
                " | dmenu -l 10`\"" \
                " && xprop -id $0 -f _SURF_GO 8s -set _SURF_GO \"$prop\"", \
                winid, NULL \
        } \
}

The relevant setting from my tabbed config.h:

#define SETPROP(p) { \
        .v = (char *[]){ "/bin/sh", "-c", \
                "prop=\"`xwininfo -children -id $1 | grep '^ 0x'" \
                " | sed -e's_AT_^ *\\(0x[0-9a-f]*\\) \"\\([^\"]*\\)\".*@\\1 \\2@'" \
                " | tac - \"${HOME}/.$2/history\"" \
                " | awk '!x[$0]++'" \
                " | dmenu -l 10`\"" \
                " && xprop -id $1 -f $0 8s -set $0 \"$prop\"", \
                p, winid, clientbin, NULL \
        } \
}

Could you please elaborate a little bit more about the necessity of this xargs?
Thanks.

--Markus
Received on Thu Apr 10 2014 - 08:26:52 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 10 2014 - 08:36:13 CEST