Re: [hackers] [dmenu][RFC][PATCH] History functionality

2015-12-11 Thread Silvan Jegen
Heyho On Fri, Dec 11, 2015 at 3:41 PM, Xarchus wrote: > On Wed, Dec 09, 2015 at 11:16:07AM +0100, Silvan Jegen wrote: >> On Wed, Dec 9, 2015 at 11:12 AM, Roberto E. Vargas Caballero >> wrote: >> > On Wed, Dec 09, 2015 at 10:31:09AM +0100, Silvan Jegen wrote: >&g

Re: [hackers] [dmenu][RFC][PATCH] History functionality

2015-12-09 Thread Silvan Jegen
On Wed, Dec 9, 2015 at 11:12 AM, Roberto E. Vargas Caballero wrote: > On Wed, Dec 09, 2015 at 10:31:09AM +0100, Silvan Jegen wrote: >> I realized that I am not dealing with the case that the history file >> does not exist already. I added a simple check for that (although I >

Re: [hackers] [dmenu][RFC][PATCH] History functionality

2015-12-09 Thread Silvan Jegen
On Tue, Dec 8, 2015 at 8:34 PM, Silvan Jegen wrote: > Heyhey > > On Thu, Dec 03, 2015 at 02:57:52AM -0800, Xarchus wrote: >> [...] >> >> - improved the history/cache parsing/de-duplication awk one-liner in >> dmenu_path; the former 'NR==FNR' test was

Re: [hackers] [dmenu][RFC][PATCH] History functionality

2015-12-08 Thread Silvan Jegen
Heyhey On Thu, Dec 03, 2015 at 02:57:52AM -0800, Xarchus wrote: > [...] > > - improved the history/cache parsing/de-duplication awk one-liner in > dmenu_path; the former 'NR==FNR' test was not enough: in case of a not > supplied or empty history file it attempted to remove a count followed by a

Re: [hackers] [dmenu][RFC][PATCH] History functionality

2015-12-03 Thread Silvan Jegen
Hi On Thu, Dec 3, 2015 at 11:57 AM, Xarchus wrote: > And a couple of fixes for the 'history' patch: > > - fixed the code in the BEGIN block of the inline awk program in dmenu_run; > if no history file was supplied the awk script was just ignoring any > output from dmenu > > - improved the histo

Re: [hackers] [dmenu][RFC][PATCH 0/4] Using sort and simple C program to get dmenu history functionality

2015-12-02 Thread Silvan Jegen
On Tue, Dec 1, 2015 at 8:04 PM, Silvan Jegen wrote: > Heyho! > > On Tue, Dec 01, 2015 at 05:51:59AM -0800, Xarchus wrote: >> >> This updhist awk script replacement will work with multiselect (multiple >> inputs will simply increment their count or added as new). Thi

Re: [hackers] [dmenu][RFC][PATCH 0/4] Using sort and simple C program to get dmenu history functionality

2015-12-01 Thread Silvan Jegen
Heyho! On Tue, Dec 01, 2015 at 05:51:59AM -0800, Xarchus wrote: > On Mon, Nov 30, 2015 at 03:28:42PM +0100, Silvan Jegen wrote: > > Heyho! > > > > On Sat, Nov 28, 2015 at 11:25 PM, Hiltjo Posthuma > > wrote: > > > > > > This can be implemented in

Re: [hackers] [dmenu][RFC][PATCH 0/4] Using sort and simple C program to get dmenu history functionality

2015-11-30 Thread Silvan Jegen
Heyho! On Sat, Nov 28, 2015 at 11:25 PM, Hiltjo Posthuma wrote: > On Fri, Nov 27, 2015 at 7:38 PM, Silvan Jegen wrote: >> Heyhey >> >> I kept thinking about a more general way to implement history >> functionality for dmenu and this is what I came up with. >&

[hackers] [dmenu][RFC][PATCH 0/4] Using sort and simple C program to get dmenu history functionality

2015-11-27 Thread Silvan Jegen
the input file itself. Suggestions are welcome! Silvan Jegen (4): Use sort to generate the command list Pass a file path to dmenu_path and run updhist Add updhist to the Makefile Add the updhist program Makefile | 12 ++--- dmenu_path | 12 +++-- dmenu_run | 5 +++- updhi

[hackers] [dmenu][RFC][PATCH 2/4] Pass a file path to dmenu_path and run updhist

2015-11-27 Thread Silvan Jegen
The history file is read by sort and updhist updates the counts in the history file. --- dmenu_run | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dmenu_run b/dmenu_run index 834ede5..4858b0d 100755 --- a/dmenu_run +++ b/dmenu_run @@ -1,2 +1,5 @@ #!/bin/sh -dmenu_path | dm

[hackers] [dmenu][RFC][PATCH 3/4] Add updhist to the Makefile

2015-11-27 Thread Silvan Jegen
--- Makefile | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a7cd04f..0071db0 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,10 @@ include config.mk -SRC = drw.c dmenu.c stest.c util.c +SRC = drw.c dmenu.c stest.c util.c updhist.c

[hackers] [dmenu][RFC][PATCH 1/4] Use sort to generate the command list

2015-11-27 Thread Silvan Jegen
We use sort to generate the list of commands ordered by their use count. --- dmenu_path | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) mode change 100644 => 100755 dmenu_path diff --git a/dmenu_path b/dmenu_path old mode 100644 new mode 100755 index 338bac4..b6f5a9b --- a/dm

[hackers] [dmenu][RFC][PATCH 4/4] Add the updhist program

2015-11-27 Thread Silvan Jegen
This program reads a command (or any character sequence) from stdin and takes the path to the history file as an argument. The history file should be empty or contain a list of commands each of which should be followed by a tab character and a usage count. An example for a line in such a history fi

Re: [hackers] [PATCH][vis] Change op_put to repeat put operation count times

2015-07-30 Thread Silvan Jegen
On Thu, Jul 30, 2015 at 06:51:21PM +0200, Marc André Tanner wrote: > On Wed, Jul 29, 2015 at 08:52:07PM +0200, Silvan Jegen wrote: > > This is the quick-and-dirty way to implement a feature I miss from Vim. > > Thanks. Yes the count/repetition code needs an overhaul. I'm n

[hackers] [PATCH][vis] Change op_put to repeat put operation count times

2015-07-29 Thread Silvan Jegen
--- This is the quick-and-dirty way to implement a feature I miss from Vim. I realize that I added some newlines for readability (subjective, I know) but I can send a new version of the patch without those if you don't want them. vis.c | 13 ++--- 1 file changed, 10 insertions(+), 3 del

Re: [hackers] [surf] Removing a memory leak when u wasn't freed. || Christoph Lohmann

2014-02-06 Thread Silvan Jegen
On Thu, Feb 6, 2014 at 6:50 AM, wrote: > commit 127dc366efeda9afc6086be67b60979af1d71205 > Author: Christoph Lohmann <2...@r-36.net> > Date: Thu Feb 6 06:47:22 2014 +0100 > > Removing a memory leak when u wasn't freed. > > diff --git a/surf.c b/surf.c > index c598404..1ec4c62 100644 > --- a

<    1   2