[dev] dwm-5.6 issues on openbsd 4.5

2009-07-20 Thread Donald Allen
I installed dwm 5.4.1 from the openbsd package on my Thinkpad X61
running openbsd 4.5 (amd64). Works fine, no issues, other than
attempts to pipe the date into stdin not working (I think how to use
the read-from-stdin facility to display stuff needs to be explained
more fully in the documentation).

I then downloaded the 5.6 tar file, compiled it, and changed my
.xinitrc to point to the resulting dwm executable. I'm running it as I
type this. Unlike 5.4.1, left-clicking labels has no effect, other
than to blue-highlight the clicked label. To move to displaying the
windows associated with, say, label 9, I have to use the keyboard
(alt-9). Also, clicking the layout label causes it to toggle between
indicating tiled and floating, but no change in the layout occurs;
again, this must be accomplished with the keyboard. At least in my
particular environment, use of the mouse to change tag or layout is
broken in 5.6.

My usage of dwm is pretty simple. I start X with startx, and my
.xinitrc simply invokes dwm. I then start an xterm and run the
applications I want, backgrounding them with the shell.

As I said, 5.4.1 works fine, but it looks to me like something got
broken subsequent to that version.

/Don Allen



Re: [dev] dwm-5.6 issues on openbsd 4.5

2009-07-20 Thread Anselm R Garbe
2009/7/20 Donald Allen :
> I installed dwm 5.4.1 from the openbsd package on my Thinkpad X61
> running openbsd 4.5 (amd64). Works fine, no issues, other than
> attempts to pipe the date into stdin not working (I think how to use
> the read-from-stdin facility to display stuff needs to be explained
> more fully in the documentation).
>
> I then downloaded the 5.6 tar file, compiled it, and changed my
> .xinitrc to point to the resulting dwm executable. I'm running it as I
> type this. Unlike 5.4.1, left-clicking labels has no effect, other
> than to blue-highlight the clicked label. To move to displaying the
> windows associated with, say, label 9, I have to use the keyboard
> (alt-9). Also, clicking the layout label causes it to toggle between
> indicating tiled and floating, but no change in the layout occurs;
> again, this must be accomplished with the keyboard. At least in my
> particular environment, use of the mouse to change tag or layout is
> broken in 5.6.
>
> My usage of dwm is pretty simple. I start X with startx, and my
> .xinitrc simply invokes dwm. I then start an xterm and run the
> applications I want, backgrounding them with the shell.
>
> As I said, 5.4.1 works fine, but it looks to me like something got
> broken subsequent to that version.

What's your output of xrandr ?

Kind regards,
Anselm



Re: [dev] dwm-5.6 issues on openbsd 4.5

2009-07-20 Thread Anselm R Garbe
2009/7/20 Anselm R Garbe :
> 2009/7/20 Donald Allen :
>> I installed dwm 5.4.1 from the openbsd package on my Thinkpad X61
>> running openbsd 4.5 (amd64). Works fine, no issues, other than
>> attempts to pipe the date into stdin not working (I think how to use
>> the read-from-stdin facility to display stuff needs to be explained
>> more fully in the documentation).
>>
>> I then downloaded the 5.6 tar file, compiled it, and changed my
>> .xinitrc to point to the resulting dwm executable. I'm running it as I
>> type this. Unlike 5.4.1, left-clicking labels has no effect, other
>> than to blue-highlight the clicked label. To move to displaying the
>> windows associated with, say, label 9, I have to use the keyboard
>> (alt-9). Also, clicking the layout label causes it to toggle between
>> indicating tiled and floating, but no change in the layout occurs;
>> again, this must be accomplished with the keyboard. At least in my
>> particular environment, use of the mouse to change tag or layout is
>> broken in 5.6.
>>
>> My usage of dwm is pretty simple. I start X with startx, and my
>> .xinitrc simply invokes dwm. I then start an xterm and run the
>> applications I want, backgrounding them with the shell.
>>
>> As I said, 5.4.1 works fine, but it looks to me like something got
>> broken subsequent to that version.
>
> What's your output of xrandr ?

Ah and does disabling the XINERAMA build flags make any difference in
your setup?

--Anselm



Re: [dev] dwm-5.6 issues on openbsd 4.5

2009-07-20 Thread Szabolcs Nagy
On 7/20/09, Donald Allen  wrote:
> running openbsd 4.5 (amd64). Works fine, no issues, other than
> attempts to pipe the date into stdin not working (I think how to use
this has changed see README in the source (or the man)

> type this. Unlike 5.4.1, left-clicking labels has no effect, other
> than to blue-highlight the clicked label. To move to displaying the
something like
 static Button buttons[] = {
 { ClkTagBar,0,  Button1,view,{0} },
should be in your config.h

when updating dwm make sure your config.h has the proper definitions,
since it might change between revisions

if it's not a config problem then the behaviour is odd



Re: [dev] dwm-5.6 issues on openbsd 4.5

2009-07-20 Thread Donald Allen
On Mon, Jul 20, 2009 at 10:56 AM, Anselm R Garbe wrote:
> 2009/7/20 Anselm R Garbe :
>> 2009/7/20 Donald Allen :
>>> I installed dwm 5.4.1 from the openbsd package on my Thinkpad X61
>>> running openbsd 4.5 (amd64). Works fine, no issues, other than
>>> attempts to pipe the date into stdin not working (I think how to use
>>> the read-from-stdin facility to display stuff needs to be explained
>>> more fully in the documentation).
>>>
>>> I then downloaded the 5.6 tar file, compiled it, and changed my
>>> .xinitrc to point to the resulting dwm executable. I'm running it as I
>>> type this. Unlike 5.4.1, left-clicking labels has no effect, other
>>> than to blue-highlight the clicked label. To move to displaying the
>>> windows associated with, say, label 9, I have to use the keyboard
>>> (alt-9). Also, clicking the layout label causes it to toggle between
>>> indicating tiled and floating, but no change in the layout occurs;
>>> again, this must be accomplished with the keyboard. At least in my
>>> particular environment, use of the mouse to change tag or layout is
>>> broken in 5.6.
>>>
>>> My usage of dwm is pretty simple. I start X with startx, and my
>>> .xinitrc simply invokes dwm. I then start an xterm and run the
>>> applications I want, backgrounding them with the shell.
>>>
>>> As I said, 5.4.1 works fine, but it looks to me like something got
>>> broken subsequent to that version.
>>
>> What's your output of xrandr ?
>
> Ah and does disabling the XINERAMA build flags make any difference in
> your setup?

Disabling the xinerama build flags appears to fix the problems (I say
"appears" because I haven't tested it extensively, but I'm running it
now, and the symptoms I described are gone). Thanks for the help.

/Don


>
> --Anselm
>
>



Re: [dev] dwm-5.6 issues on openbsd 4.5

2009-07-20 Thread Donald Allen
On Mon, Jul 20, 2009 at 11:06 AM, Szabolcs Nagy wrote:
> On 7/20/09, Donald Allen  wrote:
>> running openbsd 4.5 (amd64). Works fine, no issues, other than
>> attempts to pipe the date into stdin not working (I think how to use
> this has changed see README in the source (or the man)

Thanks -- it's in the README, which , of course, I didn't read. Should
be in the man page, though, IMHO. In any case, the suggested code
works fine.

/Don

>
>> type this. Unlike 5.4.1, left-clicking labels has no effect, other
>> than to blue-highlight the clicked label. To move to displaying the
> something like
>  static Button buttons[] = {
>  { ClkTagBar,            0,              Button1,        view,    {0} },
> should be in your config.h
>
> when updating dwm make sure your config.h has the proper definitions,
> since it might change between revisions
>
> if it's not a config problem then the behaviour is odd
>
>



Re: [dev] dwm-5.6 issues on openbsd 4.5

2009-07-20 Thread Anselm R Garbe
2009/7/20 Donald Allen :
> On Mon, Jul 20, 2009 at 10:56 AM, Anselm R Garbe wrote:
>> 2009/7/20 Anselm R Garbe :
>>> 2009/7/20 Donald Allen :
 I installed dwm 5.4.1 from the openbsd package on my Thinkpad X61
 running openbsd 4.5 (amd64). Works fine, no issues, other than
 attempts to pipe the date into stdin not working (I think how to use
 the read-from-stdin facility to display stuff needs to be explained
 more fully in the documentation).

 I then downloaded the 5.6 tar file, compiled it, and changed my
 .xinitrc to point to the resulting dwm executable. I'm running it as I
 type this. Unlike 5.4.1, left-clicking labels has no effect, other
 than to blue-highlight the clicked label. To move to displaying the
 windows associated with, say, label 9, I have to use the keyboard
 (alt-9). Also, clicking the layout label causes it to toggle between
 indicating tiled and floating, but no change in the layout occurs;
 again, this must be accomplished with the keyboard. At least in my
 particular environment, use of the mouse to change tag or layout is
 broken in 5.6.

 My usage of dwm is pretty simple. I start X with startx, and my
 .xinitrc simply invokes dwm. I then start an xterm and run the
 applications I want, backgrounding them with the shell.

 As I said, 5.4.1 works fine, but it looks to me like something got
 broken subsequent to that version.
>>>
>>> What's your output of xrandr ?
>>
>> Ah and does disabling the XINERAMA build flags make any difference in
>> your setup?
>
> Disabling the xinerama build flags appears to fix the problems (I say
> "appears" because I haven't tested it extensively, but I'm running it
> now, and the symptoms I described are gone). Thanks for the help.

Ok, but would you mind sharing the output of xrandr? I've got the
suspect that dwm creates two overlapping monitors in your setup, if
compiled with xinerama support.

Kind regards,
Anselm



Re: [dev] dwm-5.6 issues on openbsd 4.5

2009-07-20 Thread Donald Allen
Anselm --

By the way, my compliments on your work. I'm of the minimalist
persuasion when it comes to almost anything involving computers. I
much prefer to start with a small environment and add just what I need
and no more. So, of course, I can't stand Windows (for many, many
reasons, but its bloatedness is one of them) and I dislike Ubuntu,
Gnome, and especially KDE (which has the quiet good taste of, say, Las
Vegas). I also much prefer using the keyboard to the mouse, especially
when I have to carefully place the mouse in a very small target area,
so I can, for example, resize a window.

I had been using, believe it or not, twm, because it's fast and very
customizable. I also couldn't find a more contemporary wm that I
liked. I have now. dwm eliminates a lot of the mousing that I couldn't
escape from with twm. Very nice work -- thank you.

/Don Allen



Re: [dev] dwm-5.6 issues on openbsd 4.5

2009-07-20 Thread Donald Allen
On Mon, Jul 20, 2009 at 11:27 AM, Anselm R Garbe wrote:
> 2009/7/20 Donald Allen :
>> On Mon, Jul 20, 2009 at 10:56 AM, Anselm R Garbe wrote:
>>> 2009/7/20 Anselm R Garbe :
 2009/7/20 Donald Allen :
> I installed dwm 5.4.1 from the openbsd package on my Thinkpad X61
> running openbsd 4.5 (amd64). Works fine, no issues, other than
> attempts to pipe the date into stdin not working (I think how to use
> the read-from-stdin facility to display stuff needs to be explained
> more fully in the documentation).
>
> I then downloaded the 5.6 tar file, compiled it, and changed my
> .xinitrc to point to the resulting dwm executable. I'm running it as I
> type this. Unlike 5.4.1, left-clicking labels has no effect, other
> than to blue-highlight the clicked label. To move to displaying the
> windows associated with, say, label 9, I have to use the keyboard
> (alt-9). Also, clicking the layout label causes it to toggle between
> indicating tiled and floating, but no change in the layout occurs;
> again, this must be accomplished with the keyboard. At least in my
> particular environment, use of the mouse to change tag or layout is
> broken in 5.6.
>
> My usage of dwm is pretty simple. I start X with startx, and my
> .xinitrc simply invokes dwm. I then start an xterm and run the
> applications I want, backgrounding them with the shell.
>
> As I said, 5.4.1 works fine, but it looks to me like something got
> broken subsequent to that version.

 What's your output of xrandr ?
>>>
>>> Ah and does disabling the XINERAMA build flags make any difference in
>>> your setup?
>>
>> Disabling the xinerama build flags appears to fix the problems (I say
>> "appears" because I haven't tested it extensively, but I'm running it
>> now, and the symptoms I described are gone). Thanks for the help.
>
> Ok, but would you mind sharing the output of xrandr? I've got the
> suspect that dwm creates two overlapping monitors in your setup, if
> compiled with xinerama support.

Ah, I forgot to tell you something about my configuration, which I now
suspect is important. The X61 is sitting in its little docking station
and I've got an external monitor plugged into that, via a kvm (usb
keyboard and mouse, too, also via the kvm). So there are two monitors
involved -- the laptop's and the external one.

Here's the output of xrandr with 5.6 running, no xinerama:

Screen 0: minimum 320 x 200, current 1440 x 900, maximum 1440 x 1440
VGA connected 1440x900+0+0 (normal left inverted right x axis y axis)
410mm x 257mm
   1440x...@6060.2*+
   1440x900   59.9 +   75.0 60.0
   1400x1050  60.0
   1280x1024  75.0 72.0 70.0 60.0
   1280x960   60.0
   1152x864   75.0 75.0
   1280x720   60.0
   1024x768   75.1 75.0 70.1 60.0
   832x62474.6
   800x60072.2 75.0 60.3 56.2
   640x48075.0 72.8 72.8 75.0 66.0 60.0 59.9
   720x40070.1
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis)
246mm x 185mm
   1024x768   50.0*+   60.0 40.0
   800x60060.3 56.2
   640x48060.0 59.9

Same, with xinerama enabled:

Screen 0: minimum 320 x 200, current 1440 x 900, maximum 1440 x 1440
VGA connected 1440x900+0+0 (normal left inverted right x axis y axis)
410mm x 257mm
   1440x...@6060.2*+
   1440x900   59.9 +   75.0 60.0
   1400x1050  60.0
   1280x1024  75.0 72.0 70.0 60.0
   1280x960   60.0
   1152x864   75.0 75.0
   1280x720   60.0
   1024x768   75.1 75.0 70.1 60.0
   832x62474.6
   800x60072.2 75.0 60.3 56.2
   640x48075.0 72.8 72.8 75.0 66.0 60.0 59.9
   720x40070.1
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis)
246mm x 185mm
   1024x768   50.0*+   60.0 40.0
   800x60060.3 56.2
   640x48060.0 59.9


/Don



>
> Kind regards,
> Anselm
>
>



Re: [dev] dwm-5.6 issues on openbsd 4.5

2009-07-20 Thread Szabolcs Nagy
On 7/20/09, Donald Allen  wrote:
> Thanks -- it's in the README, which , of course, I didn't read. Should
> be in the man page, though, IMHO. In any case, the suggested code

ok, man is updated
i think a 5.6.1 will come out soon..



[dev] 9base awk bug

2009-07-20 Thread quinq . ml


9base.awk.20090720.patch
Description: Binary data


Re: [dev] [dwm] pertag and bstack for 5.6 release

2009-07-20 Thread Dave Heistand
>  http://port70.net/~kzed/dwm-5.6/
>  batteries not included / ymmv.
>  worksforme, though
> 
> Best regards,
>  Mate

Works for me too, thank you very much!



Re: [dev] dwm-5.6

2009-07-20 Thread sqweek
2009/7/18 Szabolcs Nagy :
> my problem was that it seems that c and ieee754 does not even require
> that the arithmetic operations are well defined: same operation on
> same numbers with same type does not necessary give the same result
> (even on same architecture with same compiler)
>
> for example
> (double)atoi("1")/atoi("3") == (double)atoi("1")/atoi("3")
> gives false with gcc on my x86 machine eventhough the two expressions
> are semantically equivalent

 Interesting indeed, I get the same result here. However, if you store
the division results in variables[1] you do get equality... strange.
Maybe related to the 80-bit floating point format used internally on
the cpu?
 I wonder if this is a gcc bug - the above expression gives me true in
the plan 9 compilers. Longstanding one though, I see it in gcc 3.3.6,
3.4.6 and 4.3.2 (ie, every compiler on my system).

[1] like so:
double d1 = (double)atoi("1")/atoi("3);
double d2 = (double)atoi("1")/atoi("3);
d1 == d2; /* true */

-sqweek



Re: [dev] [dwm] pertag and bstack for 5.6 release

2009-07-20 Thread Sidney Amani
Hi,

Thanks for the patches, I wonder why does pertag patch is not included in the
mainstream, IMO using dwm without is not handy.

To fix the warning you are better changing the "lts" variable type:

-  Layout *lts[LENGTH(tags) + 1];
+  const Layout *lts[LENGTH(tags) + 1];

It works fine for me as well.

Regards
-- 
Sidney Amani



[dev] dwm with top and bottom bar

2009-07-20 Thread Sidney Amani
Hi list,

I would like to share my conf which is optimized for laptops or
single screen users.

As I like to keep my top bar with the window title and tag
descriptions, I couldn't display enough information in the
top-right corner.
So I just quickly patched dwm to add a empty bottom border
and I use conky to display information at the bottom.

My bottom bar is only 10 pix but anyway if you miss some
space you can use MODKEY+B to get the full screen available.

I let you take a look at the screenshot :
http://yfrog.com/b8screenshotconf1p

If you want to do the same just launch conky like this :
conky -d -y 2

This is the patch, you just have to define an "int marginbottom"
in your config.h with the size in pixel of the bottom margin.

diff -r bcce736c1de3 dwm.c
--- a/dwm.c Tue Jul 14 19:07:53 2009 +0100
+++ b/dwm.c Mon Jul 20 22:43:09 2009 +0200
@@ -1674,6 +1674,9 @@
m->wh = m->mh;
if(m->showbar) {
m->wh -= bh;
+m->wh -= marginbottom;
+if(!m->topbar)
+  m->wy += marginbottom;
m->by = m->topbar ? m->wy : m->wy + m->wh;
m->wy = m->topbar ? m->wy + bh : m->wy;
}

Enjoy

-- 
Sidney Amani



Re: [dev] dwm-5.6

2009-07-20 Thread Szabolcs Nagy
On 7/20/09, sqweek  wrote:
>> for example
>> (double)atoi("1")/atoi("3") == (double)atoi("1")/atoi("3")
>> gives false with gcc on my x86 machine eventhough the two expressions
>> are semantically equivalent
>
>  Interesting indeed, I get the same result here. However, if you store
> the division results in variables[1] you do get equality... strange.
> Maybe related to the 80-bit floating point format used internally on
> the cpu?
yes

gcc (without optimization) generates different instructions for the
two divisions, the first one uses 80bit float registers, the second
one is not

if you bind the result to variables then the difference is obviously
gone however

  if ( (a = (double)atoi("1")/atoi("3"))
   ==  (b = (double)atoi("1")/atoi("3")) )
  puts("eq");
  else
  puts("not eq");

  if (a == b)
  puts("eq");
  else
  puts("not eq");

will print
  not eq
  eq
with old gcc (< 4), which is even more surprising behaviour

>  I wonder if this is a gcc bug - the above expression gives me true in
> the plan 9 compilers. Longstanding one though, I see it in gcc 3.3.6,
> 3.4.6 and 4.3.2 (ie, every compiler on my system).

in c89 and the original c99 standard this is not a bug, but
'unspecified behaviour', as the standard tries to pose very limited
requirements on floating point arithmetic, so division with different
precisions is allowed

but the revised c99 standard (c99 + technical corrections ==
n1256.pdf) does not allow this, the cast operator should round
everything to double precision, so with -std=c99 it should work
correctly

for details i refer to the comp.lang.c thread i started about this issue
http://groups.google.com/group/comp.lang.c/browse_thread/thread/d4fa2a342d6779a8/1f86f6e537f6d2f1



Re: [dev] 9base awk bug

2009-07-20 Thread Uriel
P9p now includes awk, one less reason to use 9base.

uriel

On Mon, Jul 20, 2009 at 6:32 PM,  wrote:
> Hi,
>
> I tried to build 9base, and I encountered the following error:
> In file included from awk.h:184,
>  from re.c:34:
> proto.h:134: error: conflicting types for 'getline'
> /usr/include/stdio.h:651: error: previous declaration of 'getline' was here
>
> I attached a patch that corrects this error.
>



Re: [dev] 9base awk bug

2009-07-20 Thread Jacob Todd
On Mon, Jul 20, 2009 at 06:32:02PM +0200, quinq...@gmail.com wrote:
> Hi,I tried to build 9base, and I encountered the following 
> error:In file included from 
> awk.h:184,
>  from re.c:34:proto.h:134: error: conflicting types for 
> 'getline'/usr/include/stdio.h:651: error: previous declaration of 
> 'getline' was hereI attached a patch that corrects this error.

Please only send plain-text mail to the list.

-- 
Jake Todd
// If it isn't broke, tweak it!


pgpyAESvC1Hw3.pgp
Description: PGP signature


Re: [dev] [dwm] pertag and bstack for 5.6 release

2009-07-20 Thread Jacob Todd
On Mon, Jul 20, 2009 at 10:26:36PM +0200, Sidney Amani wrote:
> Hi,
> 
> Thanks for the patches, I wonder why does pertag patch is not included in the
> mainstream, IMO using dwm without is not handy.
> 
> ..
> -- 
> Sidney Amani
> 
Check the beginning of this month's archive, I started a discussion on it. I
don't use pertag anymore; I was persuaded.

-- 
Jake Todd
// If it isn't broke, tweak it!


pgpJtsI6FY7L0.pgp
Description: PGP signature