Re: [hackers] [slock] No need for usage() || FRIGN

2016-02-15 Thread Markus Teich
Dimitris Papastamos wrote: > On Mon, Feb 15, 2016 at 11:35:11AM +0100, FRIGN wrote: > > My considerations here were that it was quite arbitrary not to document -h, > > given we "allow" a command to be passed to slock as second + further > > arguments. However, I respect your stances on this and

Re: [hackers] [slock] Use argv0 instead of passing "slock:" to die every time || FRIGN

2016-02-15 Thread Markus Teich
FRIGN wrote: > we came up with this in sbase/ubase as an idiomatic way to set argv0 > for tools that don't use arg.h. > We need argv0 here because I moved the prepending of the argv[0] into > die(), and thus we need to store the argv0 in a global variable. Heyho frign, sure, but I asked why you

Re: [hackers] [slock] Use argv0 instead of passing "slock:" to die every time || FRIGN

2016-02-15 Thread Markus Teich
g...@suckless.org wrote: > + argv0 = argv[0], argc--, argv++; > - if (argc >= 2 && fork() == 0) { > + if (argc >= 1 && fork() == 0) { > if (dpy) > close(ConnectionNumber(dpy)); > - execvp(argv[1], argv+1); > - die("slock:

Re: [hackers] [slock] No need for usage() || FRIGN

2016-02-15 Thread Markus Teich
Christoph Lohmann wrote: > On Sun, 14 Feb 2016 10:46:52 +0100 g...@suckless.org wrote: > > 1) if you are running off git, -v will show the last stable > >release, effectively making this option useless. > >people running stable versions leave open an

[hackers] [vis] [PATCH] fix {, }, (, ) movements

2016-02-02 Thread Markus Teich
- Split the functions, so the algorithms are more clear - Paragraph movements work backwards - Paragraph movements work consistently with \r\n line breaks always placing the cursor on the first character of the first empty line before/after the paragraph - Sentence movements now work better at

[hackers] [vis] [PATCH] Rename stderr field to err

2016-01-31 Thread Markus Teich
The name `stderr` was confused by the compiler with the following defines: $ grep -r "define stderr" ./dependency/install/usr/include/stdio.h:#define stderr (stderr) ./dependency/sources/musl-1.1.12/include/stdio.h:#define stderr (stderr) --- vis-cmds.c | 20 ++-- 1 file changed,

[hackers] [vis] [PATCH] Fix to/till movements

2016-01-19 Thread Markus Teich
Some corner cases allowed to move between lines with the to/till movements. The change in find_prev serves two purposes. When searching for a string which the cursor is already above the match, this match is returned (pos += len). Secondly there was a failure when searching for strings with len

Re: [hackers] [slock] add option to run command after screen is locked

2015-12-26 Thread Markus Teich
Quentin Rameau wrote: > > + die("surf: execvp %s failed: %s\n", argv[1], strerror(errno)); > ^--- but that's slock here ;) Heyho Quentin, oops, will be fixed. --Markus

[hackers] [PATCH] add option to run command after screen is locked

2015-12-26 Thread Markus Teich
--- Heyho, I wrote a patch to support running arbitrary commands after slock has succesfully locked the screen. Mainly this is useful for suspending the system after it has been locked like `slock s2ram`. If there are no objections, I will merge it upstream. --Markus slock.c | 12

Re: [hackers] [sent] [PATCH 2/2] replace farbfeld with libnetpbm

2015-12-11 Thread Markus Teich
Grant Mathews wrote: > Aside from those points: would rewriting the patch to not use libnetpbm, > but to use the Netpbm helpers instead, be acceptable? Heyho Grant, no it will not, but as noted in the other mail you are welcome to push your patch to the wiki. --Markus

Re: [hackers] [sent] [PATCH 2/2] replace farbfeld with libnetpbm

2015-12-11 Thread Markus Teich
Heyho Grant, Grant Mathews wrote: > On Thu, Dec 10, 2015 at 04:39:49PM +0100, FRIGN wrote: > > Netpbm is arguably almost more complex than BMP and not easy to handle. > > It's literally the top result when I search for the phrase "simplest image > format". So your world is limited by the first

Re: [hackers] [sent] [PATCH 2/2] replace farbfeld with libnetpbm

2015-12-10 Thread Markus Teich
FRIGN wrote: > __You need a library to handle it__ and it's not that much of a popular format > to justify installing a library for it. Heyho, like FRIGN pointed out correctly this patch would negate the effort and goal of the switch to farbfeld. sent with farbfeld uses a separate process

Re: [hackers] [PATCH] [sent] Quick patch to replace png with farbfeld

2015-12-08 Thread Markus Teich
FRIGN wrote: > Dimitris Papastamos wrote: > > This also works with jpg and gif and others. The 2ff wrapper will use > > imagemagick conversion tools. This is temporary as jpg2ff and gif2ff will > > also be implemented. > > As a side note, the 2ff-filter can also receive

Re: [hackers] [sent] Support farbfeld as an intermediate format || sin

2015-12-08 Thread Markus Teich
Dimitris Papastamos wrote: > > + for (bin = NULL, i = 0; i < LEN(filters); i++) { > > + if (regcomp(, filters[i].regex, > > + REG_NOSUB | REG_EXTENDED | REG_ICASE)) > > + continue; > > + if (!regexec(, filename, 0, NULL, 0)) { > > +

Re: [hackers] [sent][PATCH] Use background color for transparent PNG images

2015-12-04 Thread Markus Teich
Heyho, Alexis wrote: > It makes sense not to merge this patch, when a switch to farbfeld is > due for the next release. Any rough plans on when this will happen? As always: When I can spare the time. ;) Dimitris already wrote two patches, which I just have to check and try out, so it shouldn't

Re: [hackers] [PATCH] Use right click as previous and enable scrolling to switch slides

2015-11-25 Thread Markus Teich
Carlos Torres wrote: > Assuming this is for sent Heyho Carlos, Yes it was and it has already been applied a few hours later. Patches sent on the hackers list don't need an acknowledgement that they have been applied, since you can clearly see that from the mail which is sent by the git hook.

Re: [hackers] [sent] Bail out before allocating slides if file is empty

2015-11-18 Thread Markus Teich
Quentin Rameau wrote: > In load() we allocated slides before checking if we actually read anything > from the FILE fp and then continue with an allocated but “empty” space wich > would lead to errors. Heyho, of course that is another fix for the problem related to memory sanitazion. I merged it,

Re: [hackers] [sent] drw.c: Avoid potential memory leak in drw_cur_create()

2015-11-18 Thread Markus Teich
Quentin Rameau wrote: > If drw was NULL, memory was still allocated for cur. Heyho Quentin, thanks, I applied it. The drw code of sent diverged from the drw code of dmenu/dwm/… a couple of months ago. I submitted my changes earlier this year, they were never merged into upstream libdrw. Now we

Re: [hackers] [dwm] setfullscreen: don't process the property twice

2015-11-02 Thread Markus Teich
Quentin Rameau wrote: > if(fullscreen) { > - … > + if(!c->isfullscreen) { > + … > + } > } > - else { > + else if(c->isfullscreen) { Heyho Quentin, you should merge the conditions of the first two nested if statements and

Re: [hackers] [dwm] setfullscreen: don't process the property twice

2015-11-02 Thread Markus Teich
Quentin Rameau wrote: > Humm, why should I exactly? > > if(fullscreen) { > if(!c->isfullscreen) > } else if(c->isfullscreen) > > against > > if(fullscreen && !c->isfullscreen) > else if (!fullscreen && c->isfullscreen) > > For me the second form is less understandable and has more

Re: [hackers] [surf] [PATCH] fix style path generation

2015-10-18 Thread Markus Teich
Christoph Lohmann wrote: > Please use git‐format‐patch(1) to get the appropriate authorship in the git > log. Heyho Christoph, You can actually just call `git am FILENAME` with FILENAME being the email including headers and git will apply the patch just fine with correct authorship. I thought

Re: [hackers] [surf] [PATCH] fix style path generation

2015-10-18 Thread Markus Teich
Christoph Lohmann wrote: > With the git‐format‐patch you can have multiple lines for the descrip‐ tion > of the patch. Now it’s just your header. That’s the reason why I like this > more. Heyho Christoph, This also works with `git send-email`: Just put the extended commit description above

[hackers] [surf] [PATCH] fix style path generation

2015-10-18 Thread Markus Teich
--- Heyho, attached patch fixes building the styledir/stylefile path for the new buildfile/buildpath semantics. --Markus surf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/surf.c b/surf.c index 0fae80b..b99a84b 100644 --- a/surf.c +++ b/surf.c @@ -1263,7 +1263,7 @@

Re: [hackers] [surf] Fix ssl failure detection || Quentin Rameau

2015-07-15 Thread Markus Teich
g...@suckless.org wrote: + if (webkit_web_view_get_tls_info(c-view, NULL, tlsflags) + tlsflags) { Heyho, I would switch the test around and check for `tlsflags` first. It probably doesn't affect the binary, but is easier to read for humans. --Markus

<    1   2