Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-28 Thread Roberto E. Vargas Caballero
> > In file included from /usr/X11R6/include/X11/Xlib.h:47, > > from st.c:25: > > /usr/X11R6/include/X11/Xfuncproto.h:144:24: warning: ISO C does not permit > > named variadic macros > > st.c: In function 'techo': > > st.c:2303: warning: comparison is always false due to limited r

Re: [dev] [dwm] trayless workflow

2014-04-28 Thread Bigby James
On 04/26, Yuri Karaban wrote: > Hello, > > I browsed suckless mailing lists and I found that system tray is > discouraged in dwm and it's suggested to use tags instead. > > I was always using workspace separation (with other window manager) and > I have instant messengers on dedicated workspace.

[dev] [st PATCH] Do not save cursor in tresize.

2014-04-28 Thread noname
This patch fixes the bug introduced in 8f11e1cd034ff28ca47bb4955505db7fa8016ba8 To reproduce the bug: 1. Save cursor: printf '\e[s' 2. Load cursor: printf '\e[u' 3. Resize st window. 4. Load cursor again: printf '\e[u' --- st.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [dev] [st] Feature to replace st window by spawned x window

2014-04-28 Thread Michael Hauser
koneu writes: > ( mupdf mything.pdf ; st ) & exit > The shell is just like the Dude's rug: it really ties the room^WUNIX together. :*) -- 'aware water' is an anagram for 'we are at war'

Re: [dev] [st] Feature to replace st window by spawned x window

2014-04-28 Thread koneu
( mupdf mything.pdf ; st ) & exit

Re: [dev] [st] Feature to replace st window by spawned x window

2014-04-28 Thread noname
On Mon, Apr 28, 2014 at 05:17:56PM -0400, Nick wrote: > Does someone with more knowledge of X11 know whether this is likely > to be readily do-able? Can you launch an arbitrary X program and say > "use this window"? I'm guessing not, but don't really know. It is impossible as each application ca

Re: [dev] [st] Feature to replace st window by spawned x window

2014-04-28 Thread Lee Fallat
On Mon, Apr 28, 2014 at 5:17 PM, Nick wrote: > Esteemed comrades, > > I remember reading ages ago about how graphical programs launched > from Plan9's terminal thing (/editor/whatever) replace the window > it's in. I would really love a patch for st to do the same. So I > could type 'mupdf mything

[dev] [st] Feature to replace st window by spawned x window

2014-04-28 Thread Nick
Esteemed comrades, I remember reading ages ago about how graphical programs launched from Plan9's terminal thing (/editor/whatever) replace the window it's in. I would really love a patch for st to do the same. So I could type 'mupdf mything.pdf' and mupdf launches in the same window as st was

Re: [dev] [st PATCH] Simplify tputtab.

2014-04-28 Thread koneu
Roberto E. Vargas Caballero wrote: > But I feel that the patch is a bit confusing. I use sometime this kind > of expressions (for example (!(p = f()) || p != q), and I get confussed > here, so maybe it is not a good idea. If another suckless developers think > the patch should be applied then I wil

Re: [dev] [st PATCH] Simplify tputtab.

2014-04-28 Thread Roberto E. Vargas Caballero
Upss, you are rigth. > && is a sequence point > > According to ISO IEC 9899:1999: > """ > The following are the sequence points described in 5.1.2.3: > ... > - The end of the first operand of the following operators: logical AND > && (6.5.13); logical OR || (6.5.14); conditional ? (6.5.15); co

[dev] [PATCH 2/2] No need to zero-initialize global variables

2014-04-28 Thread Yuri Karaban
--- st.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/st.c b/st.c index d03230f..431f483 100644 --- a/st.c +++ b/st.c @@ -3844,9 +3844,6 @@ main(int argc, char *argv[]) { char *titles; uint cols = 80, rows = 24; - xw.l = xw.t = 0; - xw.isfixed = False; -

[dev] [PATCH 1/2] DisplayWidth instead of DisplayHeight was used

2014-04-28 Thread Yuri Karaban
--- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index 9079834..d03230f 100644 --- a/st.c +++ b/st.c @@ -3044,7 +3044,7 @@ xinit(void) { if(xw.gm & XNegative) xw.l += DisplayWidth(xw.dpy, xw.scr) - xw.w - 2; if(xw.gm & YNegati

[dev] [PATCH] [slock] Use MODE and GROUP in install

2014-04-28 Thread Steve Dee
--- Makefile | 4 ++-- config.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2bea555..d53171c 100644 --- a/Makefile +++ b/Makefile @@ -40,8 +40,8 @@ install: all @echo installing executable file to ${DESTDIR}${PREFIX}/bin @mkd

Re: [dev] [st PATCH] Simplify tputtab.

2014-04-28 Thread noname
On Mon, Apr 28, 2014 at 10:54:21AM +0200, Roberto E. Vargas Caballero wrote: > > - for(++x; x < term.col && !term.tabs[x]; ++x) > > + while(++x < term.col && !term.tabs[x]) > ... > > - for(--x; x > 0 && !term.tabs[x]; --x) > > +

Re: [dev] [st] [PATCH] Simplify selected().

2014-04-28 Thread noname
On Mon, Apr 28, 2014 at 06:58:29PM +0200, Roberto E. Vargas Caballero wrote: > Uhmmm, I am not sure about this patch, because it is related to some > parts of st that are not handled by me, and I am not sure if these > modifications are correct. Could someone else take care of this patch? > > Rega

Re: [dev] [st] [PATCH] Simplify selected().

2014-04-28 Thread Roberto E. Vargas Caballero
Uhmmm, I am not sure about this patch, because it is related to some parts of st that are not handled by me, and I am not sure if these modifications are correct. Could someone else take care of this patch? Regards, -- Roberto E. Vargas Caballero

Re: [dev] [PATCH] Don't make bold text bright with default color

2014-04-28 Thread Roberto E. Vargas Caballero
> So instead of patching it worth adding to FAQ: > > Q: Why st brightens the bold face with default color, while other >terminals don't? > A: You can achieve compatible behavior by placing defaultfg outside of >first 256 palette entries. Could you send a patch for this? (FAQ is part of st

Re: [dev] [st PATCH 4/6] Do not export chscale and cwscale.

2014-04-28 Thread Roberto E. Vargas Caballero
I'll apply it, thanks! -- Roberto E. Vargas Caballero

Re: [dev] [st PATCH] Simplify xunloadfonts.

2014-04-28 Thread Roberto E. Vargas Caballero
> + while(frclen > 0) > + XftFontClose(xw.dpy, frc[--frclen].font); I'll apply the patch. -- Roberto E. Vargas Caballero

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-28 Thread Christoph Lohmann
Greetings. On Mon, 28 Apr 2014 18:05:54 +0200 "Roberto E. Vargas Caballero" wrote: > >> The problem is Wall change from one system to another (this is something > >> OpenBSD users know with strcpy calls...), and it doesn't force how to > >> remove the warning, so at the end I think style is no

Re: [dev] [st] utf broken after aa35bbd7a16c6c210a7574a8c45bbe939d5b2922

2014-04-28 Thread Martin Kopta
On Mon, Apr 28, 2014 at 05:08:39PM +0200, Roberto E. Vargas Caballero wrote: > Please, could you try this patch? It works. Thank you very much sir! pgpbQ7gvDO98q.pgp Description: PGP signature

Re: [dev] [st] [PATCH] Fix techo handling of control and multibyte characters.

2014-04-28 Thread Roberto E. Vargas Caballero
>> The problem is Wall change from one system to another (this is something >> OpenBSD users know with strcpy calls...), and it doesn't force how to >> remove the warning, so at the end I think style is not really improved >> with Wall (and guys, some of the warning are really, really stupid).

Re: [dev] [st] utf broken after aa35bbd7a16c6c210a7574a8c45bbe939d5b2922

2014-04-28 Thread Martti Kühne
On Mon, Apr 28, 2014 at 5:08 PM, Roberto E. Vargas Caballero wrote: > Please, could you try this patch? > I can confirm this patch works. Thanks a lot for your time. cheers! mar77i

Re: [dev] [st] utf broken after aa35bbd7a16c6c210a7574a8c45bbe939d5b2922

2014-04-28 Thread Roberto E. Vargas Caballero
Please, could you try this patch? diff --git a/st.c b/st.c index cb4b508..22cc0ce 100644 --- a/st.c +++ b/st.c @@ -70,8 +70,9 @@ char *argv0; #define LEN(a) (sizeof(a) / sizeof(a)[0]) #define DEFAULT(a, b) (a) = (a) ? (a) : (b) #define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) -#defi

Re: [dev] [slock][PATCH] Caps Lock colour

2014-04-28 Thread Markus Teich
Martin Kopta wrote: > XSetWindowBackground(dpy, locks[screen]->win, (ev.xkey.state && > LockMask) ? > locks[screen]->colors[2] : locks[screen]->colors[1]); And while we're at it, how about: XSetWindowBackground(dpy, locks[screen]->win, locks[screen]->colors[(ev.xkey.state && Loc

Re: [dev] [st] utf broken after aa35bbd7a16c6c210a7574a8c45bbe939d5b2922

2014-04-28 Thread Roberto E. Vargas Caballero
Hi, > > I have just updated my st to aa35bbd7a16c6c210a7574a8c45bbe939d5b2922 and > > have > > problem with utf8. When I try to display czech characters (ěščřžýáíé..) with > > mutt, st gets completely broken. > > Also, vim doesn't display some czech characters while typing and st starts > > spiti

Re: [dev] [st] utf broken after aa35bbd7a16c6c210a7574a8c45bbe939d5b2922

2014-04-28 Thread Martti Kühne
On Mon, Apr 28, 2014 at 12:24 PM, Martin Kopta wrote: > Hi, > > I have just updated my st to aa35bbd7a16c6c210a7574a8c45bbe939d5b2922 and have > problem with utf8. When I try to display czech characters (ěščřžýáíé..) with > mutt, st gets completely broken. > > Also, vim doesn't display some czech

Re: [dev] [slock][PATCH] Caps Lock colour

2014-04-28 Thread Martin Kopta
On Mon, Apr 28, 2014 at 08:05:59PM +1000, Thiébaud Weksteen wrote: > See attached! > > ... >8 . Why not simply XSetWindowBackground(dpy, locks[screen]->win, (ev.xkey.state && LockMask) ? locks[screen]->colors[2] : locks[screen]->colors[1]); ? You aren't using the caps_

[dev] [st] utf broken after aa35bbd7a16c6c210a7574a8c45bbe939d5b2922

2014-04-28 Thread Martin Kopta
Hi, I have just updated my st to aa35bbd7a16c6c210a7574a8c45bbe939d5b2922 and have problem with utf8. When I try to display czech characters (ěščřžýáíé..) with mutt, st gets completely broken. Also, vim doesn't display some czech characters while typing and st starts spiting out errors like this

Re: [dev] [slock][PATCH] Caps Lock colour

2014-04-28 Thread Thiébaud Weksteen
Hi, >> -if(llen == 0 && len != 0) { >> +caps_state = ev.xkey.state && LockMask; >> +if((llen == 0 && len != 0)) { > > Why the extra parentheses in the if statement? A prior test was including another condition. It was a leftover from th

Re: [dev] [st PATCH] Simplify tputtab.

2014-04-28 Thread Roberto E. Vargas Caballero
> - for(++x; x < term.col && !term.tabs[x]; ++x) > + while(++x < term.col && !term.tabs[x]) ... > - for(--x; x > 0 && !term.tabs[x]; --x) > + while(--x > 0 && !term.tabs[x]) I'm sorry, but this patch is incorrect, beca

Re: [dev] [st PATCH] Use tfulldirt instead of setting all lines dirty in tresize.

2014-04-28 Thread Roberto E. Vargas Caballero
> In fact tfulldirt should be removed completely, as tswapscreen calls > tfulldirt later (twice). Yeah, it is true, it can be removed, but in case of removing it, a comment should be put in tresize, because it is not ovbious that lines become dirty. Regards, -- Roberto E. Vargas Caballero

Re: [dev] [st PATCH] tresize return value is not used

2014-04-28 Thread Roberto E. Vargas Caballero
I think instead of removing the return value, we should check the value returned, and in case of not being possible the resize command then print a warning in stderr. Regards, -- Roberto E. Vargas Caballero

Re: [dev] [st PATCH 6/6] Remove one indentation level in getsel().

2014-04-28 Thread Roberto E. Vargas Caballero
I'll apply it, thanks. -- Roberto E. Vargas Caballero

Re: [dev] [st PATCH 5/6] Remove unused dump() function.

2014-04-28 Thread Roberto E. Vargas Caballero
I'll apply it, thanks. -- Roberto E. Vargas Caballero

Re: [dev] [st PATCH 3/6] Add missing function prototypes.

2014-04-28 Thread Roberto E. Vargas Caballero
I'll apply it, thanks. -- Roberto E. Vargas Caballero

Re: [dev] [st PATCH 1/6] Compute ena_sel as one expression.

2014-04-28 Thread Roberto E. Vargas Caballero
I'll apply it, thanks. -- Roberto E. Vargas Caballero

Re: [dev] [st PATCH 2/6] Use MODBIT in xseturgency.

2014-04-28 Thread Roberto E. Vargas Caballero
I'll apply it, thanks. -- Roberto E. Vargas Caballero

[dev] [st][PATCH 4/4] Simplify expressions in tputc()

2014-04-28 Thread Roberto E. Vargas Caballero
--- st.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/st.c b/st.c index 339d8a9..470a34e 100644 --- a/st.c +++ b/st.c @@ -2450,6 +2450,7 @@ tputc(char *c, int len) { bool control; long unicodep; int width; + Glyph *gp;

[dev] [st][PATCH 3/4] Fix misplaced break

2014-04-28 Thread Roberto E. Vargas Caballero
This misplaced break was causing an incorrect fall through from DSR to DECSTBM. --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index 33e4277..339d8a9 100644 --- a/st.c +++ b/st.c @@ -2087,8 +2087,8 @@ csihandle(void) { len = snprint

[dev] [st][PATCH 2/4] Create a function for DEC test

2014-04-28 Thread Roberto E. Vargas Caballero
Almost of the sequences execute their action in a separate function, which is good because helps to read the full set of sequences faster. --- st.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/st.c b/st.c index 0425c72..33e4277 100644 --- a/st.c +++

[dev] [st][PATCH 1/4] Remove repeated initialisation of term.esc

2014-04-28 Thread Roberto E. Vargas Caballero
Once a sequence is completed term.esc must return to 0, so instead of repeating this expression in all the cases is better put it at the end of the block. --- st.c | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/st.c b/st.c index 124c047..0425c72 10064