Re: [dev] Re: [dev] Usage, -h, - -help, help, synopsis, …

2010-08-18 Thread anonymous
On Tue, Aug 17, 2010 at 07:35:15PM +0100, Connor Lane Smith wrote: > Hey, > > > Options without values are combined? Is that correct? > > Can be. Though, many suckless projects don't accept this and use, eg, > strcmp(argv[i], "-sb"). A number of non-suckless programs are similar. Most default X1

Re: [dev] Re: [dev] Re: [dev] Us age, -h, --help, help, synopsis, …

2010-08-18 Thread anonymous
On Tue, Aug 17, 2010 at 09:36:14PM +0200, Alexander Teinum wrote: > It would be a nice challenge to write a really small getopt() > replacement, and a program that generates usage text. Check getflags(8)[1], it parse options and generate usage messages for rc scripts. For C there are ARGBEGIN, AR

Re: [dev] [surf] URI handling, with patch

2010-08-18 Thread anonymous
On Tue, Aug 17, 2010 at 06:52:40PM -0400, Ryan Mullen wrote: > Second, dmenu's "suggested" integration with surf is a bit dodgy. If, > for example, a user is viewing surf.suckless.org and they wish to > navigate to suckless.org, they would be required to strike > shift+return in order to actually v

Re: [dev] Re: [dev] Re: [dev] Re : [dev] [dev] Usage, -h, --help, help, synops is, …

2010-08-18 Thread anonymous
On Wed, Aug 18, 2010 at 05:55:10PM +0200, Alexander Teinum wrote: > Is it okay to use three dots in the usage text? (See echo’s man page.) > I think it means that you can repeat what’s before the three dots. It is ok and they should be used. And it should be 3 dots, not … so usage is in ASCII. A

Re: [dev] Stripping html from email

2010-08-24 Thread anonymous
On Tue, Aug 24, 2010 at 08:57:12AM -0400, Kurt H Maier wrote: > On Tue, Aug 24, 2010 at 8:38 AM, Nick wrote: > > On Tue, Aug 24, 2010 at 07:31:18AM -0400, Kurt H Maier wrote: > >> http://search.cpan.org/~kilinrax/HTML-Strip-1.06/Strip.pm > > > > Umm. Is no-one reading the body of the original requ

Re: [dev] Stripping html from email

2010-08-24 Thread anonymous
On Mon, Aug 23, 2010 at 11:55:35PM -0400, Josh Rickmar wrote: > Yeah, not quite what I'm looking for. Basically I want something > that I can pipe the message to with my MDA (fdm) before it is > delievered to my maildir. Thanks, I didn't know about fdm and used getmail+procmail. Now I have switc

[dev] [9base] /bin/rc

2010-08-24 Thread anonymous
On page http://suckless.org/people/Kris there are scripts that starts with /bin/rc she-bang. Someone have also sent some script with #!/bin/rc in it to this list. So I want to ask what is the best way to put rc into /bin under Linux. Is there any options in plan9port or 9base that allow to instal

Re: [dev] [9base] /bin/rc

2010-08-24 Thread anonymous
On Tue, Aug 24, 2010 at 09:45:14PM +0200, Moritz Wilhelmy wrote: > ever heard of symlinks? > ln -s /path/to/plan9port/bin/rc /bin/rc I heard, but even moving rc in installation script is a better solution.

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-24 Thread anonymous
Looks like Forth.

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-24 Thread anonymous
In C variables can only be created in the start of block ({} brackets). You sometimes declare new variables anywhere like in C++. You include files include include files. IMO one external include file (that is placed into /usr/include) should be enough. And internal include files can be placed

Re: [dev] Stripping html from email

2010-08-24 Thread anonymous
On Tue, Aug 24, 2010 at 04:26:46PM -0700, Robert Ransom wrote: > On Tue, 24 Aug 2010 20:01:10 +0400 > The ‘tdb’ library is actually LGPLed. Ok, tdb.h says it is under LGPL. But both on SourceForge page and in Arch Linux package it is said it is under GPLv3. Probably it was just copied from Sourc

Re: [dev] nscript - a little stack-based scripting language interpretter I wrote

2010-08-26 Thread anonymous
On Thu, Aug 26, 2010 at 01:11:00AM +0200, pancake wrote: > *) about using 'def' instead of $ ..is probably more forthy, but reduces the > performance of the VM.. having 'def' will enable >to override 'def' definition..which is one of the most important features > of lisp/fortran. the same app

Re: [dev] [libdc] default font and unicode

2010-09-30 Thread anonymous
On Thu, Sep 30, 2010 at 11:49:52AM +0200, sta...@cs.tu-berlin.de wrote: > Hi, > > I've switched to newer dmenu (one with libdc) these days and noticed that > with the deafult font Cyrillic characters are broken. > > The attached tiny patch selects a fixed font aware of unicode and works for > me.

Re: [dev] [dmenu] Patch for XDG Base Directory specification of dmenu_path

2011-01-02 Thread anonymous
On Sat, Jan 01, 2011 at 06:04:45PM +, Bjartur Thorlacius wrote: > On 12/30/10, Anselm R Garbe wrote: > > On 30 December 2010 20:47, Jon Raphaelson wrote: > >> Attached is a patch to dmenu_path which (if enabled in the config.mk) > >> changes the cache file location to be XDG Base Directory Sp

[dev] dwm cleanup patch

2011-01-07 Thread anonymous
-3 LOC diff -r 23b71491e149 dwm.c --- a/dwm.c Thu Dec 02 10:16:47 2010 + +++ b/dwm.c Fri Jan 07 18:23:41 2011 +0300 @@ -980,7 +980,7 @@ void initfont(const char *fontstr) { char *def, **missing; - int i, n; + int n; missing = NULL; dc.font.set = X

Re: [dev] Config files

2011-02-09 Thread anonymous
Methods discussed in this thread (environment variables and shell scripts) are already covered in TAOUP:

Re: [dev] st patch for draw() etc.

2011-04-23 Thread anonymous
On Fri, Apr 22, 2011 at 12:31:37AM +0200, Aurélien Aptel wrote: > On Wed, Apr 20, 2011 at 5:46 PM, Magnus Leuthner > wrote: > > Please note that the drawing for the selection while selecting only works if > > the -Os option to GCC is omitted. I have not idea why but I would be very > > interested

[dev] [st] cleanup patch

2011-04-23 Thread anonymous
Whitespace fixes and small changes in brelease(): code for selecting word is no longer executed when you triple-click. diff -r 2a6ed7b26469 st.c --- a/st.c Fri Apr 22 00:42:58 2011 +0200 +++ b/st.c Sat Apr 23 15:36:45 2011 +0400 @@ -363,11 +363,11 @@ utf8size(char *s) { unsigned

Re: [dev] [st] cleanup patch

2011-04-26 Thread anonymous
There is a problem with old code commented out with #ifdef: % CFLAGS=-DDEBUG make st build options: CFLAGS = -DDEBUG -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -DVERSION="0.1.1" LDFLAGS = -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -lutil CC = cc CC st.c st.c: In fu

Re: [dev] [st] cleanup patch

2011-04-26 Thread anonymous
It would be also nice to remove debugging code from st.c: void ttywrite(const char *s, size_t n) { {size_t nn; for(nn = 0; nn < n; nn++) dump(s[nn]); }

Re: [dev] [st] cleanup patch

2011-04-26 Thread anonymous
GLYPH_DIRTY is not used at all. drawregion is called only from draw, so screen is refreshed every time. This is really slow: try to start Midnight Commander in st and uxterm and compare.

Re: [dev] st patch for draw() etc.

2011-04-27 Thread anonymous
On Sat, Apr 23, 2011 at 03:48:46PM +0400, anonymous wrote: > On Fri, Apr 22, 2011 at 12:31:37AM +0200, Aurélien Aptel wrote: > > On Wed, Apr 20, 2011 at 5:46 PM, Magnus Leuthner > > wrote: > > > Please note that the drawing for the selection while selecting only works

Re: [dev] dmenu-4.3

2011-05-19 Thread anonymous
On Wed, May 18, 2011 at 04:45:24PM +0100, Connor Lane Smith wrote: > I've just released dmenu-4.3, which is basically smaller and faster. > smaller and faster > faster For me it is slower. It lists all my files with find, and it is very slow. Why should it list all my files and directories?

Re: [dev] Re: dmenu-4.3

2011-05-20 Thread anonymous
On Thu, May 19, 2011 at 09:10:36PM +0200, Christian Neukirchen wrote: > anonymous writes: > > > On Wed, May 18, 2011 at 04:45:24PM +0100, Connor Lane Smith wrote: > >> I've just released dmenu-4.3, which is basically smaller and faster. > > > >> smaller

[dev] [st] code cleanup

2011-05-26 Thread anonymous
Attached. diff -r 2effc50d2c4f st.c --- a/st.c Sun May 22 16:57:27 2011 +0200 +++ b/st.c Thu May 26 14:30:53 2011 +0400 @@ -473,8 +473,7 @@ void selnotify(XEvent *e) { - unsigned long nitems; - unsigned long ofs, rem; + unsigned long nitems, ofs, rem; int for

Re: [dev] [st] Font issues

2011-05-31 Thread anonymous
On Tue, May 31, 2011 at 07:19:26PM +0200, Aurélien Aptel wrote: > > transparency support. In my opinion "st" seems like not very stable now, > > If you found a bug, please report it. It's the only way we can fix it. Code for text selection is buggy. I can only see what I selected after either I

[dev] [st] fix segfault

2011-06-08 Thread anonymous
This patch fixes segfault. To reproduce, start selecting, move your mouse out of window and back while holding LMB. diff -r 6c311c25323e st.c --- a/st.c Wed Jun 08 21:35:58 2011 +0200 +++ b/st.c Thu Jun 09 01:27:14 2011 +0400 @@ -615,7 +615,7 @@ if(oldey != sel.ey || olde

[dev] [st] mutt and cursor

2011-06-13 Thread anonymous
Since revision 202 cursor is hidden after I quit from mutt. If I do "update 201", everything is ok. I don't know how to fix it right way. Also "reset" command don't help, cursor is still hidden. Is it a bug? http://hg.suckless.org/st/rev/0f21f57006c9

[dev] [sbase] simplify nohup

2011-06-24 Thread anonymous
Patch attached. diff -r 0021d9f2b4e6 nohup.c --- a/nohup.c Thu Jun 23 02:08:41 2011 +0100 +++ b/nohup.c Fri Jun 24 11:18:06 2011 +0400 @@ -13,16 +13,14 @@ main(int argc, char *argv[]) { int fd; - struct sigaction sa; if(getopt(argc, argv, "") != -1) exi

[dev] [sbase] echo.c cleanup

2011-06-28 Thread anonymous
Patch attached. diff -r 2f259700e4f2 echo.c --- a/echo.cSat Jun 25 18:49:32 2011 +0100 +++ b/echo.cTue Jun 28 15:29:52 2011 +0400 @@ -12,15 +12,12 @@ char c; while((c = getopt(argc, argv, "n")) != -1) - switch(c) { - case 'n': + if

Re: [dev] [st] mutt and cursor

2011-07-04 Thread anonymous
On Mon, Jul 04, 2011 at 12:44:18PM +0100, Ethan Grammatikidis wrote: > On Tue, 14 Jun 2011 06:34:03 +0400 > anonymous wrote: > > > Since revision 202 cursor is hidden after I quit from mutt. If I do > > "update 201", everything is ok. I don't know how to fi

Re: [dev] suckless http library

2011-07-04 Thread anonymous
On Mon, Jul 04, 2011 at 04:17:33PM +0100, Nick wrote: > Or a nice suckless program that does HTTP that I can derive inspiration from? http://hg.suckless.org/quark/

Re: [dev] [dmenu] dmenu_run improvements

2011-07-24 Thread anonymous
On Sun, Jul 24, 2011 at 02:34:22PM +0800, lolilolicon wrote: > > unset IFS > > > > cmd=$(dmenu "$@" < "$CACHE") && eval exec "$cmd" > Yeah, I see you just hate backticks :P > There is a difference: % echo `echo '\\'` \ % echo $(echo '\\') \\

[dev] [dwm] code cleanup

2011-07-26 Thread anonymous
Style fixes, removed missing = NULL; line. XCreateFontSet do it for you at the beginning of function [1]. Added missing blank line, still 5 lines removed. dwm page [2] says "dwm is only a single binary, and its source code is intended to never exceed 2000 SLOC". wc -l says there are 20

Re: [dev] [dwm] code cleanup

2011-07-26 Thread anonymous
Forgot to attach. diff -r 701f651eaecc dwm.c --- a/dwm.c Sun Jul 24 10:41:43 2011 +0100 +++ b/dwm.c Tue Jul 26 21:58:41 2011 +0300 @@ -433,9 +433,9 @@ } if(ev->window == selmon->barwin) { i = x = 0; - do { + do

Re: [dev] [dwm] code cleanup

2011-07-26 Thread anonymous
On Tue, Jul 26, 2011 at 11:54:14PM +0200, Peter Hartlich wrote: > Hi, > > > void > > grabkeys(void) { > > + unsigned int i, j; > > + unsigned int modifiers[] = { 0, LockMask, numlockmask, > > numlockmask|LockMask }; > > + KeyCode code; > > + > > updatenumlockmask(); > > - { > > -

Re: [dev] [dwm] applications in floating layout mode by default

2011-07-29 Thread anonymous
On Fri, Jul 29, 2011 at 02:20:41PM +0200, mauro tonon wrote: > Usually, in dwm, I prefer to have only terminals (xterm, rxvt, etc) > in tiled mode and all other applications in floating mode... > At first, I added many lines to the rules section in config.h > but, now, I solved the problem in this

Re: [dev] [dwm] applications in floating layout mode by default

2011-07-29 Thread anonymous
By the way, why applyrules sets tags and isfloating to 0 before applying rules? It is already done by calloc() in manage(). And it doesn't set c->mon to NULL, so I think we can just remove all initialization. Code cleanup patch: diff -r b46ae56abe65 dwm.c --- a/dwm.c Wed Jul 27 19:59:10 201

Re: [dev] [st] shift-insert patch (more general: key.mask and state)

2011-08-01 Thread anonymous
I think my patch is better. There is no special case for 0 mask and state and when we match for Ctrl and Shift it works only when they both are pressed. With your patch it will work for Ctrl only or for Shift only. Maybe it can be adopted for dwm so we would be able to remove this CLEANMASK macr

Re: [dev] [st] shift-insert patch (more general: key.mask and state)

2011-08-01 Thread anonymous
On Mon, Aug 01, 2011 at 03:34:46PM +0400, anonymous wrote: > Maybe it can be adopted for dwm so we would be able to remove this > CLEANMASK macro. Patch is attached. Maybe I missed something because I don't understand what numlockmask is for. Maybe my patch breaks something or m

Re: [dev] [st] shift-insert patch (more general: key.mask and state)

2011-08-01 Thread anonymous
On Mon, Aug 01, 2011 at 01:50:33PM +0100, Ethan Grammatikidis wrote: > On Mon, 1 Aug 2011 15:52:37 +0400 > anonymous wrote: > > > On Mon, Aug 01, 2011 at 03:34:46PM +0400, anonymous wrote: > > > Maybe it can be adopted for dwm so we would be able to remove th

Re: [dev] [st] shift-insert patch (more general: key.mask and state)

2011-08-01 Thread anonymous
On Mon, Aug 01, 2011 at 05:55:25PM +0200, Aurélien Aptel wrote: > On Mon, Aug 1, 2011 at 1:34 PM, anonymous wrote: > > I think my patch is better.  There is no special case for 0 mask and state > > and when we match for Ctrl and Shift it works only when they both are > > pres

Re: [dev] [st] shift-insert patch (more general: key.mask and state)

2011-08-01 Thread anonymous
On Mon, Aug 01, 2011 at 03:52:37PM +0400, anonymous wrote: > On Mon, Aug 01, 2011 at 03:34:46PM +0400, anonymous wrote: > Patch is attached. Forgot to attach. To make it work, you should reorder TAGKEYS, so masks with more modifiers are matched first. #define TAGKEYS(K

[dev] [st] cleanup

2011-08-04 Thread anonymous
Little cleanup patch. diff -r e64c97268f1a st.c --- a/st.c Thu Jun 09 18:25:56 2011 +0200 +++ b/st.c Thu Aug 04 19:44:02 2011 +0300 @@ -523,8 +523,7 @@ xev.selection = xsre->selection; xev.target = xsre->target; xev.time = xsre->time; - /* reject */ - x

Re: [dev] [dwm] scrot -s fails

2011-08-19 Thread anonymous
On Fri, Aug 19, 2011 at 08:22:12PM +0200, Bastien Dejean wrote: > Hi, > > The following command don't work (i.e. I can't select the region of the > screen I'm willing to capture) when it's spawn from dwm: > > static const char *partialshotcmd[] = { "scrot", "-s", NULL }; > > Any idea why? > >

Re: [dev] [dwm] scrot -s fails

2011-08-19 Thread anonymous
On Fri, Aug 19, 2011 at 07:30:08PM +, Bjartur Thorlacius wrote: > Þann fös 19.ágú 2011 18:22, skrifaði Bastien Dejean: > >static const char *partialshotcmd[] = { "scrot", "-s", NULL }; > > > I'd guess that the argument is never passed, as the string is > terminated by the NUL after scrot. > >

Re: [dev] [dwm] scrot -s fails

2011-08-19 Thread anonymous
On Fri, Aug 19, 2011 at 10:34:28PM +, Bjartur Thorlacius wrote: > Þann fös 19.ágú 2011 21:51, skrifaði anonymous: > >I have tried to do the same thing. Bound scrot to MODKEY+g, pressed > >it and switched to first TTY. It says "giblib error: couldn't grab > >

Re: [dev] [dmenu] An x, y, w patch for dmenu 4.4

2011-08-21 Thread anonymous
On Sun, Aug 21, 2011 at 02:24:27PM -0400, Kurt H Maier wrote: > On Sun, Aug 21, 2011 at 12:52 PM, Bastien Dejean wrote: > > https://bbs.archlinux.org/viewtopic.php?id=124915 > > If it's not important enough to copy and paste the text from the > stupid forum, it's not important enough for us to re

Re: [dev] [dwm] 2000 SLOC

2011-11-01 Thread anonymous
On Mon, Oct 31, 2011 at 10:21:19PM +0100, Connor Lane Smith wrote: > ... because it clashes with the developers' CSS. That's the problem. I > think there ought to be pure style-free semantic HTML, and then users > can style every site to fit their personal needs, without it resulting > in ugly. ht

[dev] sbase ls patch

2011-12-22 Thread anonymous
Tiny cleanup patch. Now more memory is allocated than necessary. diff -r dcb29ce4485f ls.c --- a/ls.c Tue Nov 08 19:35:38 2011 +0100 +++ b/ls.c Fri Dec 23 02:34:01 2011 +0400 @@ -62,7 +62,7 @@ many = (argc > optind+1); if((n = argc - optind) > 0) { - if(!(

Re: [dev] sbase ls patch

2011-12-22 Thread anonymous
On Thu, Dec 22, 2011 at 11:10:49PM -, Bjartur Thorlacius wrote: > >Tiny cleanup patch. Now more memory is allocated than necessary. > Is that a good thing or a typo? > Now more memory is allocated than necessary, but after applying this patch it will allocate just as much memory as required.

Re: [dev] Environment variables

2012-02-12 Thread anonymous
On Sun, Feb 12, 2012 at 01:09:44PM +0100, Christoph Lohmann wrote: > Greetings comrades. > > Some of you might be more experienced in the old Unix ways and > might know how in the good old days all the environment variables > were standardized. What I am up to: There are these new stylish > ways o

Re: [dev] deprecated projects

2012-03-25 Thread anonymous
On Sun, Mar 25, 2012 at 06:10:43PM +0200, Anselm R Garbe wrote: > If anyone sees further potential for cleaning up > > http://hg.suckless.org/ > > please let me know. Merge ssid into sbase?

<    1   2