Re: [hackers] [dwm][PATCH] Do not call die() upon '-v' invocation

2016-10-29 Thread Klemens Nanni
On Sat, Oct 29, 2016 at 08:42:12PM +0200, Laslo Hunhold wrote: On Fri, 28 Oct 2016 14:40:01 +0200 Klemens Nanni <k...@posteo.org> wrote: Returning -1 upon a valid invocation like 'dwm -v' is just wrong. I agree, but we should get rid of this EXIT_* stuff altogether. My pr

[hackers] [slock][PATCH] Improve option parsing routine

2016-10-28 Thread Klemens Nanni
This reduces the amount of strcmp() calls and comparisons in general to a minimum. --- slock.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/slock.c b/slock.c index 283b04e..e9b050a 100644 --- a/slock.c +++ b/slock.c @@ -298,15 +298,14 @@ main(int argc, char

[hackers] [slock][PATCH] Remove arg.h, simplify option parsing

2016-10-28 Thread Klemens Nanni
arg.h is really ugly code and way to complex for tools like slock that have such minimal synopsis. Regardless of that, usage() does not have to be a function of it's own if it's called just once. This (hopefully) is the final commit implementing proper command-line pargsing adhering to the POSIX

[hackers] [slock][PATCH] Allow usage of -- as end-of-options specifier

2016-10-28 Thread Klemens Nanni
As pointed out in #suckless, sticking to the POSIX Utility Syntax Guidelines[0] is a good idea. 0: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html#tag_12_02 --- slock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slock.c b/slock.c index af5edb2..1d28e3a 100644

[hackers] [slock][PATCH] Replace arg.h with if statements, simplify

2016-10-28 Thread Klemens Nanni
arg.h is pretty ugly code, but that is a matter of taste. Technically speaking the argument parsing can be done much cleaner especially for programs with such simple synopsis. Regardless of that, usage() does not have to be a function of it's own if it's called just once. ++argv is put on a

[hackers] [dwm][PATCH] Do not call die() upon '-v' invocation

2016-10-28 Thread Klemens Nanni
Returning -1 upon a valid invocation like 'dwm -v' is just wrong. --- dwm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dwm.c b/dwm.c index 421bf27..35828b4 100644 --- a/dwm.c +++ b/dwm.c @@ -2122,8 +2122,10 @@ zoom(const Arg *arg) int main(int argc, char *argv[])

[hackers] [st][PATCH] Add missing device path to '-l' example

2016-10-13 Thread Klemens Nanni
Also, it's ttyS0 not ttySO. --- st.1 | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/st.1 b/st.1 index 1e3f1d4..aedc174 100644 --- a/st.1 +++ b/st.1 @@ -96,18 +96,18 @@ use a tty .I line instead of a pseudo terminal. .I line -should be a (pseudo-)serial device (e.g.

Re: [hackers] [PATCH] [slock] Remove faulty example and add a section on security considerations

2016-09-28 Thread Klemens Nanni
On Wed, Sep 28, 2016 at 09:48:25PM +0200, FRIGN wrote: Setting `DontVTSwitch' in xorg.conf(5) disables this feature completely whereas chjj's fork (which mine is based on) blocks it in slock only, which is imho a much saner approach since there are many legitimate reasons to use multiple virtual

Re: [hackers] [PATCH] [slock] Remove faulty example and add a section on security considerations

2016-09-28 Thread Klemens Nanni
On Wed, Sep 28, 2016 at 09:09:24PM +0200, FRIGN wrote: I know this fork, and with the changes presented in this patch, slock is just as secure as his version. The difference is that he for instance implemented ways to upload webcam images to imgur, send SMS's and auto-shutdown when the user

Re: [hackers] [ubase][PATCH 1/5] mount: Use ternary operators

2016-07-11 Thread Klemens Nanni
The second hunk actually breaks it by setting either fsopts or dirname but never both, so please ignore that one. signature.asc Description: PGP signature

[hackers] [ubase][PATCH 5/5] mount: Simplify exit logic

2016-07-11 Thread Klemens Nanni
--- mount.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mount.c b/mount.c index d0b2fd8..529ee86 100644 --- a/mount.c +++ b/mount.c @@ -124,9 +124,8 @@ mounthelper(const char *fsname, const char *dir, const char *fstype) eargv[i] = NULL;

[hackers] [ubase][PATCH 3/5] mount: Typofix

2016-07-11 Thread Klemens Nanni
--- mount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mount.c b/mount.c index 1f17789..1696219 100644 --- a/mount.c +++ b/mount.c @@ -54,7 +54,7 @@ findtype(const char *types, const char *t) } static void -parseopts(const char *popts, unsigned long *flags, char

[hackers] [ubase][PATCH 4/5] mount: Fix ambigious if statement

2016-07-11 Thread Klemens Nanni
--- mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mount.c b/mount.c index 1696219..d0b2fd8 100644 --- a/mount.c +++ b/mount.c @@ -253,9 +253,10 @@ main(int argc, char *argv[]) target = me->mnt_dir;

Re: [hackers] [dmenu] [PATCHES] Improve code readability

2016-06-22 Thread Klemens Nanni
On Tue, Jun 21, 2016 at 10:19:57AM +0200, Hiltjo Posthuma wrote: I don't think it is an improvement, so will disregard it. Certainly not performance- or featurewise and the first patch may well be thrown away as well, but how is turning this lengthy and empty-bodied for loop into a much clearer

[hackers] [dmenu] [PATCHES] Improve code readability

2016-06-20 Thread Klemens Nanni
Hello, those patches speak for themselves and apply cleanly on origin/HEAD. Best regards, kl3 From 9c23731e6eca581cbeed4a17ea734f857f816ef0 Mon Sep 17 00:00:00 2001 From: Klemens Nanni <k...@posteo.org> Date: Tue, 24 May 2016 15:29:02 +0200 Subject: [PATCH 1/2] Use parantheses in t

[hackers] [sites] Add new capscolor patch for slock

2016-01-30 Thread Klemens Nanni
I rebased Andrew Hills "capscolor" patch for slock onto the current HEAD at 9dfe0ce, this patch adds it to the wiki. commit ba95deb099021e893ed8b5f27d20dff4e5737454 Author: Klemens Nanni <k...@posteo.org> Date: Sat Jan 30 22:39:25 2016 +0100 [slock] 20160130-capscolor.

[hackers] [dmenu] Typofix, patches rebased

2016-01-11 Thread Klemens Nanni
piles fine, though. Making them apply without errors ontop of latest git was all I did, no changes in functionality or whatsoever. Best Regards, Klemens >From 367f55b3fc31c23fdc0d534a04e3563938a58977 Mon Sep 17 00:00:00 2001 From: Klemens Nanni <k...@posteo.org> Date: Mon, 11 Jan 2016 13:

Re: [hackers] [dmenu] Typofix, patches rebased

2016-01-11 Thread Klemens Nanni
dmenu-git-20161101-instant.patch contains a typo at line 23, 's,next,text' fixes it. Klemens Nanni: > Hey, > > cc596365a (unbolify dmenu) "breaks" some of the patches provided at > tools.suckless.org/dmenu/patches. Basically 's,bool,int' was all I had > to do besides some