Re: [dev] [st] New feature idea

2013-03-30 Thread Raphaël Proust
On Fri, Mar 29, 2013 at 11:45 PM, Raphaël Proust wrote: > On Fri, Mar 29, 2013 at 6:58 PM, Christoph Lohmann <2...@r-36.net> wrote: >> Greetings. >> >> On Fri, 29 Mar 2013 19:58:39 +0100 Raphaël Proust >> wrote: >>> On Fri, Mar 29, 2013 at 6:36 PM, Calvin Morrison >>> wrote: >>> > On 29 March

[dev] [surf] [patch] Follow download redirections

2013-03-30 Thread Nick
Attached is a patch enabling HTTP redirection following by curl, for the download stuff in curl. This is useful as a bunch of websites rely on 302 redirects for their download sections, Project Gutenberg being a good example. >From 0a9009669fd9a9bba0ffe873a3ad3c2ca24e1db5 Mon Sep 17 00:00:00 200

Re: [dev] [st] New feature idea

2013-03-30 Thread Bastien Dejean
Raphaël Proust: > The problem is: xbindkeysrc has now idea about $PWD so it doesn't work > with relative path. https://github.com/baskerville/sxhkd

Re: [dev] [st] New feature idea

2013-03-30 Thread Raphaël Proust
On Sat, Mar 30, 2013 at 12:13 PM, Bastien Dejean wrote: > Raphaël Proust: > >> The problem is: xbindkeysrc has now idea about $PWD so it doesn't work >> with relative path. > > https://github.com/baskerville/sxhkd > I'll have a look at the difference between sxhkd and xbindkeys, but I don't see h

Re: [dev] [dwm] [patch] allow no tags to be selected

2013-03-30 Thread Markus Teich
done. it would be nice if someone could check my english though. ;) --Markus Am 29.03.2013 19:47, schrieb Raphaël Proust: > On Fri, Mar 29, 2013 at 5:48 PM, Markus Teich >> Do you think it is worth adding to the wiki? > > Yes.

Re: [dev] [st] New feature idea

2013-03-30 Thread Bastien Dejean
Raphaël Proust: > I don't see how sxhkd can deal with $PWD. My bad: I misread you.

Re: [dev] [st] New feature idea

2013-03-30 Thread Martti Kühne
actually looking at this, thinking... wat? > preview `find 2012-03*.jpg` | less yeah, that's what I also type when I'm drunk, but it's wrong and leaves matching the files to the shell instead of to find. you were looking for -name. > What are you guys using as a plumber in daily work? after see

[dev] [dwmstatus] dynamic infos

2013-03-30 Thread Thuban
Hello, I tried to code a function to show in the bar various informations. The function show, line per line, the content of /tmp/dwmbuf. It's useful for notification of mcabber, downloads or anything you want. You just have to do it : echo "my notification" >> /tmp/dwmbuf As I'm not a good progr

Re: [dev] [dwmstatus] dynamic infos

2013-03-30 Thread Markus Teich
Am 30.03.2013 16:00, schrieb Thuban: > As I'm not a good programmer, please correct and modify this function. Which function? attachement? ;) --Markus

[dev] Re: [st] New feature idea

2013-03-30 Thread Christian Neukirchen
Raphaël Proust writes: > On Fri, Mar 29, 2013 at 6:36 PM, Calvin Morrison > wrote: >> On 29 March 2013 14:31, Nick wrote: >>> […] >> >> While I find many of those features useless, some of them are plain >> cool, and are innovative. Why are we stuck with a text terminal when >> we aren't using

Re: [dev] [dwmstatus] dynamic infos

2013-03-30 Thread Thuban
Sorry. Here are the file containing the function : http://dwm.suckless.org/dwmstatus/dynamic_info.c And in attachement, see tmpinfo() function. Regards, Le 16:42:33 le 30 mars 2013 , Markus Teich a écrit : > Am 30.03.2013 16:00, schrieb Thuban: > > As I'm not a good programmer, please correct

Re: [dev] [dwm] [patch] allow no tags to be selected

2013-03-30 Thread Raphaël Proust
On Sat, Mar 30, 2013 at 1:28 PM, Markus Teich wrote: > done. > > it would be nice if someone could check my english though. ;) Looks okay to me. (Although I am never sure about plurals when there is none of something (i.e. "no tag" vs "no tags").) > > --Markus > > > Am 29.03.2013 19:47, schrieb

Re: [dev] Re: [st] New feature idea

2013-03-30 Thread Raphaël Proust
On Sat, Mar 30, 2013 at 3:50 PM, Christian Neukirchen wrote: > Raphaël Proust writes: > >> On Fri, Mar 29, 2013 at 6:36 PM, Calvin Morrison >> wrote: >>> On 29 March 2013 14:31, Nick wrote: […] >>> >>> While I find many of those features useless, some of them are plain >>> cool, and are i

Re: [dev] [dwmstatus] dynamic infos

2013-03-30 Thread Markus Teich
-your indentation style is inconsistent, decide if you want to use tabs or spaces, in context of the file: use tabs! -return does not need braces. -the /tmp/.dwmbuf.tmp could get filled up if a process is misconfigured and spams /tmp/dwmbuf with lots of lines. You only retrieve one line per second.

[dev] Re: [st] New feature idea

2013-03-30 Thread Christian Neukirchen
Raphaël Proust writes: > On Sat, Mar 30, 2013 at 3:50 PM, Christian Neukirchen > wrote: >> Raphaël Proust writes: >> >>> On Fri, Mar 29, 2013 at 6:36 PM, Calvin Morrison >>> wrote: On 29 March 2013 14:31, Nick wrote: > […] While I find many of those features useless, some o

Re: [dev] [dwmstatus] dynamic infos

2013-03-30 Thread Thuban
Le 17:37:54 le 30 mars 2013 , Markus Teich a écrit : > -your indentation style is inconsistent, decide if you want to use tabs > or spaces, in context of the file: use tabs! Damn! I thought this problem was soved in my vim configuration... > -return does not need braces. OK > -the /tmp/.dwmbuf.tmp

Re: [dev] [dwmstatus] dynamic infos

2013-03-30 Thread Markus Teich
Am 30.03.2013 18:45, schrieb Thuban: > Le 17:37:54 le 30 mars 2013 , Markus Teich a écrit : >> -your indentation style is inconsistent, decide if you want to use tabs >> or spaces, in context of the file: use tabs! > Damn! I thought this problem was soved in my vim configuration... from my .vimrc:

Re: [dev] [dwmstatus] dynamic infos

2013-03-30 Thread Carlos Torres
On Sat, Mar 30, 2013 at 3:55 PM, Markus Teich wrote: > > > from my .vimrc: > " show whitespace > set list listchars=tab:╺╴,eol:¬,trail:·,extends:→,precedes:← and set noexpandtab he doesn't need to have set listchars, he can toggle set list and set nolist when needed to check for ^t > > --Markus

[dev] print utility

2013-03-30 Thread Calvin Morrison
Comrades, I just spend about fifteen minutes writing this little tool that I call print: http://mutantturkey.com/print/ All it does is print the specified line from a file. example usage: $ print constitution.txt 1 We the People of the United States, in Order to form a more perfect Union, $ p

Re: [dev] print utility

2013-03-30 Thread Robert Ransom
On 3/30/13, Calvin Morrison wrote: > Comrades, > > I just spend about fifteen minutes writing this little tool that I call > print: #!/bin/sh sed -ne "$2"p "$1"

[dev] Re: print utility

2013-03-30 Thread Christian Neukirchen
Calvin Morrison writes: > What do you guys think of the tool? Of the code? It does one thing and > one thing well. It has a format string vulnerability. Also, sed or awk do this trivially already. -- Christian Neukirchenhttp://chneukirchen.org

Re: [dev] Re: print utility

2013-03-30 Thread Calvin Morrison
On 30 March 2013 21:49, Christian Neukirchen wrote: > Calvin Morrison writes: > >> What do you guys think of the tool? Of the code? It does one thing and >> one thing well. > > It has a format string vulnerability. Good catch thank you! >Also, sed or awk do this trivially already. Sed and awk

Re: [dev] Re: print utility

2013-03-30 Thread Carlos Torres
awesome!!! that is the coolest pocket knife EVER! JUST BOUGHT IT! On Sat, Mar 30, 2013 at 9:54 PM, Calvin Morrison wrote: > On 30 March 2013 21:49, Christian Neukirchen wrote: >> Calvin Morrison writes: >> >>> What do you guys think of the tool? Of the code? It does one thing and >>> one thing

Re: [dev] print utility

2013-03-30 Thread Charlie Kester
On 03/30/2013 18:28, Calvin Morrison wrote: Comrades, I just spend about fifteen minutes writing this little tool that I call print: http://mutantturkey.com/print/ All it does is print the specified line from a file. example usage: $ print constitution.txt 1 We the People of the United State

Re: [dev] print utility

2013-03-30 Thread Calvin Morrison
On 30 March 2013 22:27, Charlie Kester wrote: > On 03/30/2013 18:28, Calvin Morrison wrote: >> >> Comrades, >> >> I just spend about fifteen minutes writing this little tool that I call >> print: >> >> http://mutantturkey.com/print/ >> >> All it does is print the specified line from a file. >> >>

Re: [dev] print utility

2013-03-30 Thread Robert Ransom
On 3/30/13, Calvin Morrison wrote: > What do you guys think of the tool? Of the code? It does one thing and > one thing well. Or perhaps you're just learning C and wanted someone to review your code. Style issues: * Error messages should be sent to stderr (s/printf(/fprintf(stderr, / on error-m

Re: [dev] print utility

2013-03-30 Thread Robert Ransom
On 3/30/13, Calvin Morrison wrote: >> - What guarantee do you have that the input file won't contain any lines >> with length > LINE_MAX? As far as I know, that's an arbitrary number, >> and >> there is no intrinsic limit on the length of the lines in a Unix text >> file. > > I didn't feel very g

Re: [dev] print utility

2013-03-30 Thread Calvin Morrison
On 30 March 2013 22:30, Robert Ransom wrote: > On 3/30/13, Calvin Morrison wrote: >> What do you guys think of the tool? Of the code? It does one thing and >> one thing well. > > Or perhaps you're just learning C and wanted someone to review your code. A bit of both really, a good code review is

Re: [dev] print utility

2013-03-30 Thread Carlos Torres
On Sat, Mar 30, 2013 at 10:53 PM, Calvin Morrison wrote: > Should I have a seperate declaration and then intialization later or > just combine the statements: > > int line = atoi(argv[2]); > > or > > int line; > line = atoi(argv[2]); > that is a style question, most people like to read the functio

Re: [dev] print utility

2013-03-30 Thread Robert Ransom
On 3/30/13, Calvin Morrison wrote: > On 30 March 2013 22:30, Robert Ransom wrote: >> On 3/30/13, Calvin Morrison wrote: >>> What do you guys think of the tool? Of the code? It does one thing and >>> one thing well. >> >> Or perhaps you're just learning C and wanted someone to review your code. >

Re: [dev] print utility

2013-03-30 Thread Chris Down
I really don't see the need for a tool like this. Saying sed and awk are not suckless is like saying C is not suckless -- sed and awk are languages with a very specific domain, text processing. Perhaps you think *an implementation* sucks. Good. GNU coreutils packages awful versions of awk/sed. If y