Re: [dwm] musca wm

2009-05-17 Thread Matthias-Christian Ott
On Sun, May 17, 2009 at 01:17:40PM +, Kurt H Maier wrote:
 On 5/17/09, Jacob Todd jaketodd...@gmail.com wrote:
  On Sun, May 17, 2009 at 12:55:27PM +0200, Preben Randhol wrote:
As to Ubuntu, you can say what you like, but at least for me the
maintenance time reduced dramatically after going from Debian to
Ubuntu on the 5-6 machines I maintain. And that is something I
appreciate, not how small space I can get a distribution to use...
   
 
  The time it takes you to go from one version Ubuntu to another takes less 
  time
   than upgrading a Debian machine? I don't think so.
 
 
 Saying Ubuntu is faster than Debian or vice versa is like saying a
 green wagon is faster than a blue wagon.  They're the same thing, and
 most of my admin time is spent undoing the stupid changes to upstream
 code.

I agree. I use Ubuntu, because its release cycles are shorter, but
prefer Debian over Ubuntu, because Debian aims to be a free GNU/Linux
Distribution while Ubuntu does not (some software Canonical produces is
released as proprietary software).

However, I don't see a big difference between Debian and Ubuntu
for non-GNOME users.

I was quite happy with CRUX until I had some clashes with the developers.

Regards,
Matthias-Christian



Re: [dwm] [OT] frequency scaling and power consumption

2009-05-09 Thread Matthias-Christian Ott
On Sat, May 09, 2009 at 01:56:09PM +0800, bill lam wrote:
  Personally I have noticed that locking my laptops scaling CPU to the
  lowest frequency does give quite a noticeable improvement to the battery
  life, around an extra hour on top of the usual 4~ hours and reduces the
  temperature enough to make the fan shut off . Just enabling on-demand
  scaling didn't help much as it would scale up to full frequency far to
  often. Even with the CPU locked in lo frequency mode it almost never lags.
  
  
 
 Thanks all for confirmation.  Since I only have a desktop, no
 notebook/netbook ;-( it is somehow difficult to verify the
 improvement.  I now lock the cpu frequency to 1.1GHZ (half of the
 original 2.1G).
 
 Less heat means less power consumption, I guess someone suggested,
 (I'm not sure that's why I asked for advise), that it takes more time
 to complete the job at lower frequency so that actual power
 consumption will in some case increase.

It's more efficient to run at full speed and then let the CPU halt (you
have to have a tickless system though) [1-4]. Decreasing power consumption
of sychronous processors is a really hard problem [5-7]. But anyhow I'm not
a physicist or electrical engineer.
 
Regards,
Matthias-Christian

[1] http://www.codon.org.uk/~mjg59/power/good_practices.html
[2] https://www.redhat.com/docs/wp/performancetuning/Power_Management_Guide.pdf
[3] http://www.ncsu.edu/wcae/ISCA2007/p52-suarez.pdf
[4] http://lists.us.dell.com/pipermail/linux-poweredge/2007-December/033900.html
[5] http://www.anandtech.com/cpuchipsets/showdoc.aspx?i=3276p=6
[6] http://patmos2001.eivd.ch/program/Repro%5CArt_10_1.pdf
[7] http://async.org.uk/ukasyncforum14/forum14-papers/forum14-moore.pdf
[8] http://www.fulcrummicro.com/press_archives/edn_03-0501.pdf



Re: [dwm] [OT] frequency scaling and power consumption

2009-05-09 Thread Matthias-Christian Ott
On Sat, May 09, 2009 at 12:29:50AM -0500, Kurt H Maier wrote:
 From a physics standpoint if you're generating less heat you're
 consuming less power.

That's true, but I don't believe that the reduction of power consumption is
proportional to the performance losings, so the performance per watt ratio
could be worse.

Regards,
Matthias-Christian 



Re: [dwm] HELP! I don't understand config.h or how dwm works!

2009-05-08 Thread Matthias-Christian Ott
On Fri, May 08, 2009 at 03:14:39PM -0400, Benjamin Conner wrote:
 Hey, I'm new to the mailing lists.  The subject says it all.  I don't know

Actually it's just one mailing list.

 how to setup DWM.  I want some autostart programs, some keyboard shortcuts,
 and some basic stuff so I can use it. (and once I can use it, to use it well
 :P)  Can anyone give me some basic help to using DWM?  I found some stuff
 but nothing helps for me.  I can post my config.h too.  I will attach it to
 the message.  Debian Sid. DWM 5.5.  Thanks.  I really appreaciate if anyone
 can help.

Learn C. Use man.
 
 Tommy.

Regards,
Matthias-Christian



Re: [dwm] dwm's future

2009-05-01 Thread Matthias-Christian Ott
On Thu, Apr 30, 2009 at 03:44:46PM +0200, Matthias Kirschner wrote:
 hi Szabolcs,
 
 * Szabolcs Nagy nszabo...@gmail.com [2009-04-29 13:37:17 +0200]:
 
  On 4/28/09, Matthias Kirschner m...@fsfe.org wrote:
   I am very interested in that list. Can you please sent it to me?
  
  
  cad softwares (and many related formats are closed as well)
 
 Was already on my list.
 
  fpga tool chain
 
 Thanks, added to my list.

Well, for certain ATMEL fpga exists Free Software tools [1], because someone
published the bytestream.
 
 Best wishes,
 Matthias

Regards,
Matthias-Christian

[1] http://research.cs.berkeley.edu/project/slipway/



Re: [dwm] dwm's future

2009-04-29 Thread Matthias-Christian Ott
On Wed, Apr 29, 2009 at 01:05:40PM +0200, Martin Oppegaard wrote:
 On Wed, Apr 29, 2009 at 12:58:23PM +0200, Preben Randhol wrote:
  On Wed, 29 Apr 2009 10:45:35 +0200
  Martin Oppegaard mar...@deathaven.com wrote:
  
   On Wed, Apr 29, 2009 at 10:35:12AM +0200, Preben Randhol wrote:
On Wed, 29 Apr 2009 10:25:55 +0200
Martin Oppegaard mar...@deathaven.com wrote:

 I like free software.

But not GPL?

   It's just another lock in which is getting too big. 
   
  
  Sure, if you want to make proprietary software...
  
 If you want to be free from wacko organisations.

Are you sure, you know what you are talking about? At least all people I
know from Free Software Foundation Europe are quite friendly and really care
about Free Software and fight actively against proprietary software. They
are by no means wackos.

But as mentioned this discussion could go on and on without a result.
 
  -- 
  Preben Randhol

Regards,
Matthias-Christian



Re: [dwm] dwm's future

2009-04-29 Thread Matthias-Christian Ott
On Wed, Apr 29, 2009 at 01:37:17PM +0200, Szabolcs Nagy wrote:
 On 4/28/09, Matthias Kirschner m...@fsfe.org wrote:
  I am very interested in that list. Can you please sent it to me?
 
 
 cad softwares (and many related formats are closed as well)
 
 fpga tool chain
 
Well, they are not superior or unique. Their formats are just proprietary
and there's no Free Software for that, because the vendors try by all means
to prevent this.

Regards,
Matthias-Christian



Re: [dwm] dwm's future

2009-04-27 Thread Matthias-Christian Ott
On Mon, Apr 27, 2009 at 10:35:20AM +0100, Anselm R Garbe wrote:
 Thanks for all the valueable input so far in this thread.
 
 I think here are the action points:
 
 1) I plan to separate the bar stuff code-wise into two portions -- the
 tag bar with tags and layout info, and the title/status bar, but
 things will stay as they are from a user perspective, it's just some
 code cleanup which allows replacing the tagbar and/or title/status bar
 with something else (or avoiding to compile it in)
 
 There might be possible pango/cairo implementations of this stuff, I
 plan to have a font API interface, something like libsfont which is
 used by dwm and dmenu to start with, and which depends on either Xlib
 or some more fancy sucking stuff optionally.
 
 2) I need to investigate into the reparent stuff first, I really
 dislike going the reparent route, because each parent window consumes
 much more X resource memory (basically twice the buffer sizes as we
 have already if you use a reparenting WM -- this makes everything
 slower). I really think bug the authors of the broken apps to fix
 their apps that they do not assume a reparenting WM.
 
 So the action here is: let's make a list of all apps which are known
 to be broken and behaving strange with dwm first, that I can
 investigate.
 
 - Mathematica (Version?)
 - ... please provide input

That's mainly proprietary software. dwm shouldn't support that kind of
software, but instead expose their bare brokenness to the user. Maybe users
will realise then that proprietary software is not worth using, because you
can't even fix trivial bugs like this.
 
 3) I agree multihead has got some preference, I like the approach to
 assign certain tags to specific screens.

Could you please briefly explain why you are opposed to XRandR. It seems
pretty common and usable.
 
 Kind regards,
 Anselm

Regards,
Matthias-Christian



Re: [dwm] dwm's future

2009-04-27 Thread Matthias-Christian Ott
On Mon, Apr 27, 2009 at 08:50:49PM +0200, Valentin wrote:
 On Mon, Apr 27, 2009 at 08:47:33PM +0200, Matthias-Christian Ott wrote:
  On Mon, Apr 27, 2009 at 10:35:20AM +0100, Anselm R Garbe wrote:
  
  That's mainly proprietary software. dwm shouldn't support that kind of
  software, but instead expose their bare brokenness to the user. Maybe users
  will realise then that proprietary software is not worth using, because you
  can't even fix trivial bugs like this.
 
 Except some of us don't have a choice and have to use this for their
 work or at uni...

Well, what about GNU Octave? Mathematica seems to have become as much a
disease as Fortran was in last decades.
  
  Regards,
  Matthias-Christian
 
 Regards,
 Valentin

Regards,
Matthias-Christian



Re: [dwm] dwm's future

2009-04-27 Thread Matthias-Christian Ott
On Mon, Apr 27, 2009 at 12:05:57PM -0700, Amit Uttamchandani wrote:
   Except some of us don't have a choice and have to use this for their
   work or at uni...
  
  Well, what about GNU Octave? Mathematica seems to have become as much a
  disease as Fortran was in last decades.
 
 
 I once tried to explain to my professor if I could use Octave instead
 of Matlab but he wouldn't even hear of it...I even tried explaining
 that is compatible, etc., etc. but no luck...
 
Most teachers are morons. I tried to convince some of mine to switch to Free
Software or accept non-Microsoft formats, such as PDF or PostScript, but
they either refused to listen or thought Free Software is evil and accused
me of using pirated software, etc. (of course I listed all four freedoms
they have with Free Software and tried explain to them what Free Software
licenses are about).

The problem with them seems to be that they have been an educational authority
for so long that they think they know everything better and don't have to
listen. When I was supposed to hand in yet another Microsoft Word or Excel file
(that's quite common), I tried to explain that to one of them, but She said:
That's bad luck, search for someone who let's you use his computer! and
walked away.

Well, I could go on. However, morons don't justify the use or the introduction
of fixes for this software.

Regards,
Matthias-Christian



Re: [dwm] dwm's future

2009-04-27 Thread Matthias-Christian Ott
On Mon, Apr 27, 2009 at 04:05:36PM -0400, Jeremy Jay wrote:
 
 Don't be a bigot, it just makes you look like a moron too. Free Software

Well, you are a moron if you get bad marks, because you didn't hand in your
papers, because you refuse to use proprietary software: You don't change
anything and just hurt yourself.

I always found someone to typeset my texts or just printed them out. It
worked in the majority of cases.

 is about choice, forcing people to use an app just because you use it is

No, not because I use it, just because it's Free Software. That's the fact
that matters.

 pretty stupid and annoying and just gives people a negative association
 with it. Let people make their own choices. Last I checked it was very

They don't let their students choose either.

 easy to save as .xls or .doc, and its much less hassle for those less
 tech literate.

Still you are using pragmatic arguments to invalidate my fundamental
arguments. We'll never come to an agreement then.

It's not about the ease of use, it's about the nature of the software
itself. I would even use Free Software if it's harder to use and less
powerful. In fact I do this on daily basis.

I partially agree that this is hard to explain these kind of persons (not
because they are to stupid or not skilled enough to understand this, but
because they don't want to listen or understand it).
 
 Professors choose to use the software they want because they're
 comfortable with it, not to spite you.

But its their duty to provide equal access and opportunity to their
students. If they require their students to use proprietary software,
don't fullfil that duty, despite the fact that proprietary software is a
contradiction to education.

Well, this discussion will lead is just more E-Mail traffic and wasted time,
so I suggest to do everyone a favour and stop here. All relevant arguments
have been mentioned and further discussion won't yield a result.
 
 Jeremy

Regards,
Matthias-Christian

 On Mon 27 Apr 2009 - 09:38PM, Matthias-Christian Ott wrote:
  On Mon, Apr 27, 2009 at 12:05:57PM -0700, Amit Uttamchandani wrote:
 Except some of us don't have a choice and have to use this for their
 work or at uni...

Well, what about GNU Octave? Mathematica seems to have become as much a
disease as Fortran was in last decades.
   
   
   I once tried to explain to my professor if I could use Octave instead
   of Matlab but he wouldn't even hear of it...I even tried explaining
   that is compatible, etc., etc. but no luck...
   
  Most teachers are morons. I tried to convince some of mine to switch to Free
  Software or accept non-Microsoft formats, such as PDF or PostScript, but
  they either refused to listen or thought Free Software is evil and accused
  me of using pirated software, etc. (of course I listed all four freedoms
  they have with Free Software and tried explain to them what Free Software
  licenses are about).
  
  The problem with them seems to be that they have been an educational 
  authority
  for so long that they think they know everything better and don't have to
  listen. When I was supposed to hand in yet another Microsoft Word or Excel 
  file
  (that's quite common), I tried to explain that to one of them, but She said:
  That's bad luck, search for someone who let's you use his computer! and
  walked away.
  
  Well, I could go on. However, morons don't justify the use or the 
  introduction
  of fixes for this software.
  
  Regards,
  Matthias-Christian
  
 



Re: [dwm] dwm's future

2009-04-27 Thread Matthias-Christian Ott
On Mon, Apr 27, 2009 at 10:58:31PM +0200, pancake wrote:
 When I was in the university I had to use matlab. Proffessors told me  
 that I can use the windows boxes in place, but for personal reasons  
 (time and so) I proposed them to use the telnet interface and use it  
 remotely.

 It happened that their license didn't allowed them to export the  
 application via network. Which is IMHO a very stupid and privative  
 limitation.

 At this point I decided to install octave on a remote netbsd box, add  
 some fixes to the package and I develop all the tasks finding  
 equivalences between the sintaxes.

 The last page of my work was an explanation of the reasons for using it. 
 I just explain that I don't support software that limits my freedom and 
 possibilities, and I also explain how incorrect is to teech people with 
 privative tools.

 They accept my project but things didn't changed.

At least you didn't loose your dignity, carried out your principles and
proofed that Free Software is as powerful as an expensive proprietary software.

Regards,
Matthias-Christian

 On Apr 27, 2009, at 9:05 PM, Amit Uttamchandani atu13...@csun.edu  
 wrote:

 Except some of us don't have a choice and have to use this for their
 work or at uni...

 Well, what about GNU Octave? Mathematica seems to have become as  
 much a
 disease as Fortran was in last decades.


 I once tried to explain to my professor if I could use Octave instead
 of Matlab but he wouldn't even hear of it...I even tried explaining
 that is compatible, etc., etc. but no luck...





Re: [dwm] [idea] mwm - minimal/minimun/monocle window manager

2009-04-26 Thread Matthias-Christian Ott
On Sun, Apr 26, 2009 at 04:11:25PM -0300, Leandro Chescotta wrote:
 minimal/minimum/monocle window manager, this come to my head today, when i
 meet antiwm http://sourceforge.net/projects/antiwm this is like dwm, but
 with no tags, no bottom bar, no layouts, more like ratpoison, the thing is
 that i tryed ratpoison and antiwm, and it lacks a couple of things, so, i
 see that suckless have wmii, stripping down there is dwm, and why not a
 smaller one like a suckless antiwm... mwm! :) this are the things i think
 mwm need...
 
 - no tags, only a list of opened windows, that you can cycle with one
 keybinding or Alt+number
 - no bottom bar, just the window list that you can show/hide
 - no layouts, only a monocle-like one, and a floating layer for
 mplayer/feh/gimp
 - lol, an arch linux AUR package with the config.h ready to customize the
 few font/colors/keybindings/apps
 
Despite the fact that dwm already supports this, I like the idea. It should
be quite usable on netbooks and other computers with small screen where
monocle is the only option.

 maybe this is not worthy, but i like the idea, maybe you too, maybe is like
 getting dwm code and strip it down a little, only, maybe not...

You could probably through away much of dwm's code then.

Let us know when you release mwm.

Regards,
Matthias-Christian



Re: [dwm] Low Power Fanless Computer

2009-04-25 Thread Matthias-Christian Ott
On Sat, Apr 25, 2009 at 03:23:39PM +0200, yy wrote:
 While I really like Asus products (I'm very happy with my eee), maybe
 the msi catalog is also worth a look. Both windbox and windnettop look
 like interesting fanless desktop replacements in the same line than
 the eeebox.
 If you want to have your own server the idea of accompanying one of
 these devices with plug computers and/or some cheap NAS looks funny,
 but given the current price of VPS I don't think home-servers are well
 worth any more.

I don't want the computer to be a server. It's supposed to become my main
workstation.

After my router (which has a Geode LX 800) had a 1/10 of the Whetstone score
of my laptop, I decided to buy a Intel Atom based system, because the PPW
ratio is much higher. I currently consider buying a T7-330 Atom Barebone
[1]. It's quite cheap and meets most of my requirements, although I'm not
really satisfied.
  
 PS[OT]: you would not get rich this way, but I would buy such a thing
 for a reasonable price: 1. find the right (cheap) plug computers to
 run plan9 cpu servers, the right nas device to run venti, and the
 right eee/wind/whichever terminal. 2. preconfigure everything and
 package it in a cute box. 3. sell it. 4. profit! 5. goto 1

You probably won't make any profit with exotic operating systems ;). Moreover,
I don't see the need for a separate file server in system with only one user.

 -- 
 - yiyus || JGL .

Regards,
Matthias-Christian

[1] http://www.tranquilpc-shop.co.uk/acatalog/T7-330_Barebones.html



Re: [dwm] Re: Low Power Fanless Computer

2009-04-25 Thread Matthias-Christian Ott
On Sat, Apr 25, 2009 at 07:42:11PM +0800, Wu Zhe wrote:
 Matthias-Christian Ott o...@mirix.org
 writes:
 
  Intel's Atom processors are modern and have probably the highest performance
  per watt ration. However, the smallest affordable form-factor is mini-itx
  (I talked to several companies that manufacture smaller industrial boards,
  but the price performance ratio was terrible and buying one of those would
  be my last option). Similar to the Nano most of the Atom Boards have a power
  consumption that's a bit above 25W (there are the Z510 and Z530 embedded
  Atom CPUs, but the come with the GMA 500 graphics chip which has no free
  drivers). Nvidia's Ion, especially the Acer AspireRevo, seems to be quite
  promising, but has proprietary drivers.
 
 Have you looked at Fit-PC2? It's really power efficient (only draw 8W at
 full CPU load ), the only downside is it uses GMA 500 for
 graphics. Anyway, this is the closest thing I know.

I really considered buying it (I'm registred in the forums and was waiting
for the first resellers in Europe to sell it) until I found out that the
GMA 500 has no Free Software drivers. But despite this, the the fit-PC2 and
Nivida's Ion Platform were the best systems I could find.

Regards,
Matthias-Christian



Re: [dwm] Low Power Fanless Computer

2009-04-25 Thread Matthias-Christian Ott
On Sat, Apr 25, 2009 at 11:50:04AM -0400, voltaic wrote:
 I have been looking into this kind of thing myself. What I found is
 that getting an Atom nettop computer would be a significant downgrade
 in performance (from my Pentium M). Both in performance and
 power/Watt. Also, GMA900 on the EEEs is slow enough that rendering
 webpages is not very smooth. Imagine what that would be like in 3
 years.

Hmm, currently my Pentium 4 M works quite well, but as I said, JavaScript
will slow down our computers much more in the future ;).
 
 I looked at two things. First is the Neuros Link, which has a low
 power Athlon LE-1660. The form factor is not that small, and it does
 have a fan (supposedly quiet), but it does accommodate a full hard
 drive, has eSATA, DVI and HDMI. The problem with it is the ATI
 graphics chip... Linux support for these is still terrible, despite
 the recent releases of documentation. The open source driver is moving
 very slowly for the AMD/ATI hardware.

ATI graphics cards are a no-go criteria for me, I've enough trouble with
the one in my laptop.
 
 Though, Neuros Link is very cheap ($250):
 http://www.neurostechnology.com/neuros-link
 
 Another item is the Dell Studio Hybrid. That thing gets good reviews.
 It is a real computer, unlike the Atom stuff. There is a Core 2 Duo
 laptop processor in there, which is the best performance/Watt you can
 get. Apparently it is very quiet (does have a fan), draws 25W at idle,
 and 40W max, and has a GMA X3100 graphics chip. DVI and HDMI (though
 only one can be active at a time, so no dual screen). It can be had
 for $500. Sadly, it is not small enough to be VESA mountable. Also, no
 eSATA, so you are stuck with a single internal drive.
 
 http://www.dell.com/hybrid

Yes, the received a gold rating from EPEAT:

http://www.epeat.net/ProductDisplay.aspx?return=searchaction=viewsearch=trueproductid=1897epeatcountryid=1

But today every major Computer manufacturer has that.
 
 Anyway, I think both of these options are imperfect, but maybe someone
 will find them useful. I am waiting for the NVIDIA Ion stuff to come
 out. NVIDIA has a acceptable Linux drivers I hear.

Proprietary drivers are not acceptable for. I ported the Nvidia drivers to
the latest -mm tree for a while and that was no fun. X.org updates broke
them entirely and you had to wait a week or so to use 3d acceleration again.
 
 -v

Regards,
Matthias-Christian



Re: [dwm] Low Power Fanless Computer

2009-04-25 Thread Matthias-Christian Ott
On Sat, Apr 25, 2009 at 07:18:45PM +0200, pmarin wrote:
 Low power computers...Why not a netbook?

Because netbooks and laptops aren't ergonomic.
 
 On Sat, Apr 25, 2009 at 6:58 PM, Charlie Kester corky1...@comcast.net wrote:
  On Sat 25 Apr 2009 at 08:45:40 PDT Matthias-Christian Ott wrote:
 
  After my router (which has a Geode LX 800) had a 1/10 of the Whetstone
  score
  of my laptop, I decided to buy a Intel Atom based system, because the PPW
  ratio is much higher. I currently consider buying a T7-330 Atom Barebone
  [1]. It's quite cheap and meets most of my requirements, although I'm
  not really satisfied.
 
  Sweet!  What network chip is used on the motherboard of the T7-330?  I
  have a Atom-based system that uses the Intel reference motherboard, and
  I had problems getting FreeBSD to work with the network chip.  (I ended
  up adding a PCI card, using up the one and only slot.)
 
  The Northbridge on the Intel board also needs a fan, so my system isn't
  silent.  (sigh)
 
 
 



[dwm] Low Power Fanless Computer

2009-04-24 Thread Matthias-Christian Ott
Hi,
after a few months of latop-only computing (my good old P4 1.8Ghz is now -
after 7 years - a Windows machine in our household), I plan to switch to a
normal computer again.

My requirements are the following:

  o Low power consumption ( 10W; 25W upper limit)
  o Support for major Free Software operating systems (no strange, custom
GNU/Linux distributions), especially GNU/Linux or NetBSD
  o Fanless and no moving parts
  o No proprietary drivers, etc. (BIOS and bootloader acceptable)
  o Standard form-factor or custom case/enclosure (if so, hole for rp-sma
connector)
  o Smallest form-factor that is possible (I don't understand why computers
are still the size of a bottle crate)
  o Standard connectors (USB, VGA/DVI, Ethernet)
  o VESA mount (if possible)
  o low budget ( 500€)

After I found no RISC processors or SOCs, I looked at x86 CPUs. There three
low power architectures: VIA C7 and Nano, AMD Geode and Intel Atom.

VIA's technology (especially the C7) seems to be out-dated. VIA offers a
mini-itx board with its Nano CPU (VIA VB8001), but it has small fan and its
power consumption is slightly above the limit.

AMD's Geode is obsolete as well. The Geode LX family has the advantage of
low power consumption and small form factor. However, the performance per
watt ration is low.

Intel's Atom processors are modern and have probably the highest performance
per watt ration. However, the smallest affordable form-factor is mini-itx
(I talked to several companies that manufacture smaller industrial boards,
but the price performance ratio was terrible and buying one of those would
be my last option). Similar to the Nano most of the Atom Boards have a power
consumption that's a bit above 25W (there are the Z510 and Z530 embedded
Atom CPUs, but the come with the GMA 500 graphics chip which has no free
drivers). Nvidia's Ion, especially the Acer AspireRevo, seems to be quite
promising, but has proprietary drivers.

I wanted to ask you (because you very likely use your computers the same way
I do) whether you think the Geode is sufficient for the next three years or
so, otherwise would buy a cheap Atom mini-itx computer.

Usually I use my computer just for programming, typesetting (mainly
with groff and heirloom-doctools, but also occasionally with LaTeX),
reading and research. I don't need any computing power for simulations,
calculations, etc.; I can get access to bigger machines if I really have
such special tasks.

What bothers me a bit are these multimedia applications (video codecs,
etc.) and particularly web applications. I'm really not sure if the
Geode would be able to render on of these new JavaScript + HTML =
graphics-and-user-interface-API web apps in one and a half years or
so. Moreover, I can't imagine the CPU to decode a medium-sized h.264 videos
which seem to have become today's quasi-standard.

Maybe you know a better alternative.

Regards,
Matthias-Christian



Re: [dwm] Slightly OT: Looking for decent graphics card

2009-04-14 Thread Matthias-Christian Ott
On Tue, Apr 14, 2009 at 05:58:06PM +0200, Tube wrote:
 Sorry for being a little bit off-topic but I think you're the people who might
 have the clue. I'm looking for a good 2D graphics card from a manufacturer
 that supports linux drivers that work. I used Matrox all the years but the
 provided drivers don't run anymore with the latest version of xorg.

I picked up a Matrox G450 one year ago (new for 1€ on eBay). The driver
is a bit ugly, but it's hackable. Reverse engineering the blob is also
not hard.
 
 Any suggestion for a good power saving card?

What about an AMD geode ;)? Moreover, Intels cards are mainly Free
Software. You could also solder one yourself (there are SMD framebuffer
chips): http://www.xgitech.com/products/products_1.asp?P=3 (there are
some pci card with these chips)
 
 TIA
 Tube

Regards,
Matthias-Christian



Re: [dwm] [dmenu] OPTFLAGS in config.mk + patch

2009-04-08 Thread Matthias-Christian Ott
On Wed, Apr 08, 2009 at 05:37:01PM +0300, Daniel Bainton wrote:
 2009/4/8 Szabolcs Nagy nszabo...@gmail.com:
  On 4/8/09, Daniel Bainton d...@driftaway.org wrote:
  2009/4/8 Jan Blazek appoli...@gmail.com:
  +OPTFLAGS = -Os
 
  This wont make any difference, you can't pass it from the command line
  like this anyway.
  You're overwriting OPTFLAGS here all the time to -Os. You'll have to
  use the following for it to work:
  OPTFLAGS ?= -Os
 
 
  that's not posix, but a bsd (and gnu) make extension though
 
 
 Ah. But anyway, the original wont work for specifying it in the command 
 line...

http://www.opengroup.org/onlinepubs/009695399/utilities/make.html:

[...]
-e
Cause environment variables, including those with null values, to override 
macro assignments within makefiles.
[...]
 
 --
 Daniel
 

Regards,
Matthias-Christian



Re: [dwm] daily ed usage

2009-03-13 Thread Matthias-Christian Ott
On Fri, Mar 13, 2009 at 11:19:01AM +0100, Stefan Kuttler wrote:
 Hi,

Hi,

 Usually I like to use ed because it's really fast and exact. 
 Of course I use vi(m) too and hate ed(itor) wars. 

I use ed too, although I'm probably a novice user. I use vim only for
long files, so I get an overview (often 1,$p etc. is not enough). 
 
  The software I use:
 [your answer here]
 
 Greetings 
 Stefan

Regards,
Matthias-Christian



Re: [dwm] suckless.org stylesheet glitch

2009-03-11 Thread Matthias-Christian Ott
On Wed, Mar 11, 2009 at 12:59:05AM +0100, Uriel wrote:
 Good point, probably the werc stylesheet should be split and
 reorganized to avoid this kind of issues, I will think about it.
 
 Also, www.suckless.org is *SLOW* to the point of being unusable, and
 i'm sure that is not werc's fault because http://cat-v.org and many
 other werc sites are quite fast.

Do you use ipv6? It's also a bit slow for me, because I use an ipv6 tunnel from
Hurricane Electric. But that's ok.
 
 uriel

Regards,
Matthias-Christian

 On Wed, Mar 11, 2009 at 12:31 AM, twfb twf...@googlemail.com wrote:
  Greetings,
 
  suckless.org currently links to two stylesheets /pub/style/style.css and
  /_werc/pub/style.css both are active for media screen. The former
  stylesheet (/pub) uses among other things orange background for the
  midHeader class. This results in a split-second display of a different
  colour scheme (werc default?) as the stylesheets load.
 
  Posting to d...@suckless as w...@suckless was subscriber only.
 
  Regards
  --
  TWFB  -  PGP: D7A420B3
 
 
 



Re: [dwm] GSoC2009

2009-03-10 Thread Matthias-Christian Ott
On Tue, Mar 10, 2009 at 01:47:45PM +, Anselm R Garbe wrote:
 For those of you who haven't noticed, we are applying as a mentoring
 organization during GSoC2009 this year.
 
 http://www.suckless.org/GSoC2009
 
 We set up a new mailing list for GSoC specific questions which is
 world-writable here:
 
 g...@suckless.org

You should put this on the wiki page.
 
 We do not know yet if we will be accepted.
 
 Kind regards,
 --Anselm

Regards,
Matthias-Christian 



Re: [dwm] GSoC 2009 mentors please shout

2009-03-07 Thread Matthias-Christian Ott
On Fri, Mar 06, 2009 at 06:21:41PM -0500, voltaic wrote:
 Hey Matthias,

Hi,
 
 That URL you mentioned has some simple typos in it. The page is not
 publicly editable, so I thought I'd let you know. The things that
 stick out at me right away are:

Well, you can edit it. See http://www.suckless.org/wiki/ for further
details.
 
 proof should be prove
 Our project scopes focus on advanced should be ...focuses on advanced
 projects who focus should be projects that focus
 Need a comma after average and normal end users

Thanks, very obvious. The comma seems reasonable.
 
 I could go on, but editing that page over email is not the most
 efficient way of doing things.

Just send me the diff or push it yourself. However, I'll take out my
grammar book and look for mistakes in the GSoC page.

Could another native speaker (preferably British) look for mistakes
as well?

Regards,
Matthias-Christian
 
 On Fri, Mar 6, 2009 at 10:13 AM, Matthias-Christian Ott o...@mirix.org 
 wrote:
  On Fri, Mar 06, 2009 at 03:02:17PM +, Anselm R Garbe wrote:
  Hi there,
 
  please send me a private mail if you'd be willing to mentor a GSoC
  project this year for suckless.org.
  We need at least 10 mentors I'd say.
 
  I also created a list of mentors:
 
  http://www.suckless.org:8000/gsoc.html
 
  You may add yourself to the list if Anselm agreed.
 
  Kind regards,
  --Anselm
 
  Regards,
  Matthias-Christian Ott
 
 
 



Re: [dwm] GSoC 2009 mentors please shout

2009-03-06 Thread Matthias-Christian Ott
On Fri, Mar 06, 2009 at 03:02:17PM +, Anselm R Garbe wrote:
 Hi there,
 
 please send me a private mail if you'd be willing to mentor a GSoC
 project this year for suckless.org.
 We need at least 10 mentors I'd say.

I also created a list of mentors:

http://www.suckless.org:8000/gsoc.html

You may add yourself to the list if Anselm agreed.
 
 Kind regards,
 --Anselm

Regards,
Matthias-Christian Ott



Re: [dwm] [OT] minimalist ruby?

2009-02-25 Thread Matthias-Christian Ott
On Wed, Feb 25, 2009 at 05:46:02PM +0100, pancake wrote:
 in the description says:


  VM specs

* Register based
  http://github.com/macournoyer/tinyrb/blob/master/vm/opcode.h,
  (like Lua)
* Boehm GC http://www.hpl.hp.com/personal/Hans_Boehm/gc/
* Very small  64K, ~2000 sloc
* Method caching and some inlining
* Lexer in Ragel, parser in Lemon

 that ~2kloc sounds suckless :)


 http://code.macournoyer.com/tinyrb/ [+]


The README states that it's just a subset of Ruby [1].

Regards,
Matthias-Christian

[1] http://github.com/macournoyer/tinyrb/tree/master



Re: [dwm] nabble access

2009-02-24 Thread Matthias-Christian Ott
On Mon, Feb 23, 2009 at 03:46:44PM -0200, Carlos Pita wrote:
 Hi,
 
 what do you think about adding this list to nabble? For accessing
 through a nntp reader gmane is great, but I find nabble more
 convenient as a web interface, besides the fact that it provides very
 valuable thread alerts (in case you are suscribed to -nomail, as me).

-1

Why do you prefer nntp over E-Mail? I also can't see why thread alerts
are useful, nearly all E-Mail clients let you search within your
E-Mails. Just setup a cronjob that searches your dwm folder in your
Maildir for the keywords you want or download the current archive and
grep for the keyword.
 
 Best regards
 -Carlos

Regards,
Matthias-Christian



Re: [dwm] Google Summer of Code 2009

2009-02-21 Thread Matthias-Christian Ott
On Fri, Feb 20, 2009 at 04:52:28PM +0100, Matthias-Christian Ott wrote:
 Since they require every participating project to provide a website
 that lists the ideas for the student projects, I suggest to setup a wiki
 page. Maybe we can discuss them here prior posting them.

I added some of my own ideas and some ideas that have come up on the
mailing list and a to wiki page. I also included some general policies
and information.

Maybe a native speaker could proof-read the page from time to time since
it's part of the official application as mentoring organisation.

I encourage everybody to propose further ideas.

Someone (arg?) should also add his contact information on the page and
some other formalities you are supposed to put on that page (see pages
of other organisation in 2008).
 
Regards,
Matthias-Christian



[dwm] Google Summer of Code 2009

2009-02-20 Thread Matthias-Christian Ott
Hi,
this year there will be Google' Summer of Code and Anselm has agreed
that the suckless project will pariticipate. Usually it will be
announced in the next weeks.

Since they require every participating project to provide a website
that lists the ideas for the student projects, I suggest to setup a wiki
page. Maybe we can discuss them here prior posting them.

Regards,
Matthias-Christian



Re: [dwm] Google Summer of Code 2009

2009-02-20 Thread Matthias-Christian Ott
On Fri, Feb 20, 2009 at 04:52:28PM +0100, Matthias-Christian Ott wrote:
 Hi,
 this year there will be Google' Summer of Code and Anselm has agreed
 that the suckless project will pariticipate. Usually it will be
 announced in the next weeks.

They already have setup the website [1]. Deadline is 9th March 2009
for organisations and 3rd April 2009 for students [2].
 
Regards,
Matthias-Christian

[1] http://code.google.com/soc/
[2] 
http://google-summer-of-code.googlecode.com/files/GSoC2009-Presentation-BlueLogo.pdf



Re: [dwm] [OT] Personal Website and CSS

2009-02-19 Thread Matthias-Christian Ott
On Wed, Feb 18, 2009 at 10:31:47PM +, Anselm R Garbe wrote:
 2009/2/18 Matthias-Christian Ott o...@mirix.org:
  since several years I have been planed to launch a personal website. I
  used to do quite aesthetical web design before I have subscribed to
  minimalism. What annoyed me then and now was CSS and its implementations
  in modern browsers.
 
  When I tried to design a minimalist website (just some typographic
  enhancements to make texts more read- and printable), I realised that
  there seems to be no agreed standard for a default CSS stylesheet merely a
  recommendation from the CSS standard [1] (which is incomplete) and a lot
  of people seem to be concerned about resetting the browser CSS defaults -
  even the W3C does so in their stylesheets [2]. Most people seems to have
  installed nearly all popular browsers, test with those and incorporate
  workarounds if necessary.
 
  All in all this seems very absurd to me and I would like to know how
  you approached this problem.
 
  At the moment I'm just aware of The Anti-web Manifesto [3] that someone
  linked to on this mailing list. Although I mainly subscribe to it,
  browsers like Mozilla Firefox have terrible default typographic style
  and using text-mode browsers like links often seems to be only solution
  when reading longer texts.
 
  Any ideas?
 
 I think the only way is dropping HTML and CSS altogether and going
 with something new. I'd be very interested in contributing. I think
 the replacement should not only focus on presentation but equally on
 forming a base for less suckish applications which are highly network
 transparent.

Although not perfect, I like Display PostScript - at least it's approach
of having a text-based drawing language for network-transparent graphics.

One could take this idea and implement a register based virtual machine
that uses a stack to store their contents. You could then compile
arbitrary descriptions (like vector images or programmes) into assembly
language for the machine. Another advantage of this would be that you
can build hardware (e.g. programme FPGAs) that does all the computation.

I recently had to do some quick and dirty vector drawing and was quite
content with cairo.

I don't know how to incorporate events into this. But I suppose that
one could build an event layer on top of this.

To replace HTML which is tree-based I propose something scheme-like:

(doc (title TITLE) (text (ch CHAPTER (TXT

This is in my opinion a quite elegant linear representation.

However, I don't think that a tree-model is required for documents,
as for example Markdown or nroff demonstrate as counter-examples.

But in contrast to nroff I prefer the separation of content and formating.
 
 Kind regards,
 --Anselm

Regards,
Matthias-Christian



Re: [dwm] [OT] Personal Website and CSS

2009-02-19 Thread Matthias-Christian Ott
On Wed, Feb 18, 2009 at 04:59:06PM -0600, Kurt H Maier wrote:
 In my estimation, the web is a lost cause.  As time goes on, it's more
 and more a tool that is abused by idiots cramming too much broken
 functionality in them, and most browsers are just platforms from
 which to launch bad ideas.  The whole thing was never designed for
 fine-grained control of how a website was rendered, and you're asking
 for a lot of heartache by attempting to make it work that way.

Well, I realised that too, but somehow felt the need for communicating
these ideas to other people (most people will just believe in something,
if it's repeated often enough).

I don't want fine-grained control, but to make a website somewhat
typographically useable, you need to set the paddings and margins so
that they fit thogether with the text. Therefore you have to clear a
lot of the default stylesheet definitions. That seems insane to me.
 
 On my website[1], I use very basic html, and include a stylesheet
 basically to set colors I like and a maximum width for the main body
 of the text.  I also use CSS to move some of the navigation stuff off
 to the side, but other than that, it's up to the reader to configure
 his browser to make things presentable.

The more I think about this topic the more I think I will simply test my
stylesheet in Firefox, links, dillo and netsurf. I will actually write
an essay on the problems I had developing the site, although I think
this won't make the Internet better.
 
 1 - http://www.madleet.net/cgi-bin/blog.sh

$ curl http://madleet.net/blog.css 2 /dev/null | wc -l
24

Very minimalistic.
 
 # Kurt H Maier

Regards,
Matthias-Christian



Re: [dwm] [OT] Personal Website and CSS

2009-02-19 Thread Matthias-Christian Ott
On Thu, Feb 19, 2009 at 12:07:16AM +0100, hiro wrote:
  I think the only way is dropping HTML and CSS altogether and going
  with something new. I'd be very interested in contributing. I think
  the replacement should not only focus on presentation but equally on
  forming a base for less suckish applications which are highly network
  transparent.
 
  Kind regards,
  --Anselm
 
 
 
 Not sure if OP really wanted to do this, but such alternatives have
 always existed. Look at gopher for example.
 
 I would export 9p filetrees and mount them in acme. You can use text
 files and plumbing if you want hyperlinks.
 I very much enjoy reading 9fans that way.
 
 But I admit this not being beauty typesetting.
 
  browsers like Mozilla Firefox have terrible default typographic style
  and using text-mode browsers like links often seems to be only solution
  when reading longer texts.
 
 I don't really get this: Where can we find real typographic style in links?

There's actually none, but it's better to display the text in a fixed-font
uniform size than in misproportioned text with unsuitable spacing.
 
 Perhaps we need a combination of Troff's beauty and web browser's dynamics.

What do you mean by dynamic? AJAX? I suppose you mean hyperlinks.

Regards,
Matthias-Christian



Re: [dwm] [OT] Personal Website and CSS

2009-02-19 Thread Matthias-Christian Ott
On Thu, Feb 19, 2009 at 08:51:52AM +0100, Szabolcs Nagy wrote:
 On 2/18/09, Matthias-Christian Ott o...@mirix.org wrote:
  minimalism. What annoyed me then and now was CSS and its implementations
  in modern browsers.
 
 css cannot be implemented (..in a suckless way)
 
  there seems to be no agreed standard for a default CSS stylesheet merely a
  recommendation from the CSS standard [1] (which is incomplete) and a lot
  of people seem to be concerned about resetting the browser CSS defaults -
  even the W3C does so in their stylesheets [2]. Most people seems to have
  installed nearly all popular browsers, test with those and incorporate
  workarounds if necessary.
 
 don't try to fix the browser, you can't

I know.

 it leads to a chaos where each website has different versions for each
 browser, display media, resolution,..

On my 15.4 WXSGA+ display browsing some sites is really a pain, because
the use font sizes measured in pixel and limit their content to 500px
or so.
 
 there is no way to do nice in all browsers page (or pixel correct
 presentation)
 (flash is obviously not an option since it's not (and cannot be)
 supported by most browsers)

Flash is proprietary software and therefore not even worth thinking about.
 
 interactivity has the same issues (no way to do it properly)
 
  At the moment I'm just aware of The Anti-web Manifesto [3] that someone
  linked to on this mailing list. Although I mainly subscribe to it,
 
 http://port70.net/webless suggests a least common denominator
 imho this is the most sane approach currently (although limited in many ways)

Yes, but have you tried to read a long text (I tend to be verbose)
in Mozilla Firefox?
 
  browsers like Mozilla Firefox have terrible default typographic style
 
 the user is responsible for changing the default style (or using a sane 
 browser)

Theoretically I agree, but how many users do so? Additionally I don't
want to know what happens if you change your stylesheet and view other
CSS-styled websites (it will probably break the layout I suppose).

Regards,
Matthias-Christian



Re: [dwm] [OT] Personal Website and CSS

2009-02-19 Thread Matthias-Christian Ott
On Thu, Feb 19, 2009 at 02:19:24PM +, Anselm R Garbe wrote:
 2009/2/19 Matthias-Christian Ott o...@mirix.org:
  On Thu, Feb 19, 2009 at 12:07:16AM +0100, hiro wrote:
   I think the only way is dropping HTML and CSS altogether and going
   with something new. I'd be very interested in contributing. I think
   the replacement should not only focus on presentation but equally on
   forming a base for less suckish applications which are highly network
   transparent.
  
   Kind regards,
   --Anselm
 
  Not sure if OP really wanted to do this, but such alternatives have
  always existed. Look at gopher for example.
 
  I would export 9p filetrees and mount them in acme. You can use text
  files and plumbing if you want hyperlinks.
  I very much enjoy reading 9fans that way.
 
  But I admit this not being beauty typesetting.
 
   browsers like Mozilla Firefox have terrible default typographic style
   and using text-mode browsers like links often seems to be only solution
   when reading longer texts.
 
  I don't really get this: Where can we find real typographic style in links?
 
  There's actually none, but it's better to display the text in a fixed-font
  uniform size than in misproportioned text with unsuitable spacing.
 
  Perhaps we need a combination of Troff's beauty and web browser's dynamics.
 
  What do you mean by dynamic? AJAX? I suppose you mean hyperlinks.
 
 Well, here is what I realized during the st development and which
 emerged into some text (g)ui library which can be seen as graphical
 curses at some point and which I'm going to consider forming the base
 of replacing HTML+CSS and vt100 and curses and all that stuff (and
 which I'm afraid to publish in its current flaky and unfinished state
 still but I need to do so anyways sooner or later).

I'm eagerly awaiting libgt to write an E-Mail client or text editor.
 
 Apart from presenting information (which can be done in a
 terminal-like sense, and a browser is a terminal to some extend) which
 used to be HTML in the past, it is very obvious that there is the
 demand for so called web applications which run as hybrids remotely
 and locally and which are simply loaded (instead of physically
 installed) on every access time again and again... They can access
 local and remote resources in a kind of transparent way and provide
 services -- even if it's just about reading a bolg article.

Well, you could simply run a remote file server and let your local
applications use it (9p is quite suiteable for this). Usually you install
your software on your computer and don't load it everytime you use from
a remote server, so I don't see the need for web applications. Richard
Stallman summed it up quite good [1]. Additionally it's a performance
loose and I guess the carbon footprint of such web applications is
significantly higher.
 
 There are 3 layers in such an approach:
 
 - resource access
 - resource
 - scripting

What you propose is the following:

data
  filtering/
 manipulation rendering   displaying
/--^-\   /---^---\  /^\
+-+  ++  ++  +-+
| res | -- | server | -- | client | -- | X11 |
+-+  ++  ++  +-+
\--v--/ \-v-/
 remoteresource
resourceaccess

Basically it's a pipe where serveral intermediate data formats are used.

 The resource access should be done using a stateful protocol rather than HTTP.
 
 The resource itself isthe content (could be something that replaces
 HTML+CSS+JS and provide extensions such as map() for mapping contents
 rendered by server- or client-side code and extensions for scripting).

I think the server should only store the data and do no rendering at all.
 
 The scripting layer is also an extension with access to the server and
 client environment (not necessarily bound to the resource only). One
 can compare it to JS -- though I doubt the DOM-based approach of how
 web pages are scriptable nowadays is right.
 
 In the case of a terminal, the resource is a tty session, the resource
 access is the connection to it and the scripting are the commands send
 back and forth (which are not restricted to the resource itself, which
 could be a shell process, but which could be control sequences as well
 (server- and client environment access).
 
 So if you consider the modern Web as consisting of terminal servers
 providing content then we get closer to the idea. I think designing
 the HTML+CSS replacement must go hand in hand with the underlying
 protocol.

Why should server store interactive applications? We should design a
text description language (without different appearance for everyone)
and simply render it.

We already have network transparent user interfaces and file systems.

I would really like to throw away X11. So that you have a universal
hardware-implementable rendering language and system (buffer management
etc.) and an event layer

Re: [dwm] [OT] Personal Website and CSS

2009-02-19 Thread Matthias-Christian Ott
On Thu, Feb 19, 2009 at 11:56:43AM -0700, Jack Woehr wrote:
 Matthias-Christian Ott wrote:
 I would really like to throw away X11. So that you have a universal
 hardware-implementable rendering language and system (buffer management
 etc.) and an event layer on top of it. So if you want to browse a
 hyperlinked document you compile it to the rendering language and run
 an event manager, which handles things like scrolling, on top of it. So
 you have a data pipe (model), renderer/compiler (view) and event manager
 (controller).
   
 If you  are willing to accept Javascript as your universal rendering  
 language
 and the web browser as its implementation, GWT though it needs much more
 engineering over the next year or two is actually pretty good.

As mentioned in another E-Mail I want to have a graphics processor
(which can be also software implemented) which is a register machine
with a stack for contexts. Programms for it would look like this:

  mv x,y; move to (x;y)
  st %c,#11 ; set color to #11
  pt x,y; set point at (x;y)
  pt x,y
  rd; render
  st %b, 2  ; load buffer 0

So you have multiple drawable buffers that you can stack and map. It's
much like cairo or PostScript, but fully network transparent.

On top of this runs a programme that manages the screen (does input
redirection, talks to applications which want to run on screen) and a
window manager which arranges the windows.

Applications run now on any computer (since it's network transparent
via something like 9p) and communicate with the graphics processor and
the screen manager.

It's basically combining Plan 9 with X11. Except that X11 is not a big
monolithic system anymore.

So you can compile your nroff document to assembly language for the
graphics processor and simply display it. It's basically a simple version
of PostScript without scripting capabilities.

In MVC terms you could consider the application, which is itself
subdivided, to be the model, the screen manager to be the controller
and the graphics processor the view, if this helps understanding.

I don't know how well this would work, but when trying to design a
nroff replacement I thought about the graphics processor as a simple
replacement for PostScript and PDF and later added this idea about the
screen manager.

What I really like about it is that rendered documents (which used to
be PostScript or PDF) are now the same as ordinary applications except
that applications handle input and may modify their window contents.

Additionally this enables you simply pipe data into a compiler and render
it to a screen or a bitmap.

Regards,
Matthias-Christian



Re: [dwm] [OT] Personal Website and CSS

2009-02-19 Thread Matthias-Christian Ott
On Thu, Feb 19, 2009 at 01:05:36PM -0700, Jack Woehr wrote:
 Matthias-Christian Ott wrote:
 What I really like about it is that rendered documents (which used to
 be PostScript or PDF) are now the same as ordinary applications except
 that applications handle input and may modify their window contents.
   
 NeWS sort of worked that way, except its virtual machine was,
 of course, PostScript. NeWS got beat out by XWindows.

Not really, it used a PostScript dialect which included OOP, events,
arithmetic etc.

Regards,
Matthias-Christian



[OT] C Xlib (Re: [dwm] Making it a million and one)

2009-02-18 Thread Matthias-Christian Ott
On Wed, Feb 18, 2009 at 02:40:56PM -0500, Ammar James wrote:
 Just learn C.
 google KR.
 

I recommend C by Dissection and the ISO standard. You will also need
the Xlib Programming Manual (http://www.sbin.org/doc/Xlib/).

Regards,
Matthias-Christian



[dwm] [OT] Personal Website and CSS

2009-02-18 Thread Matthias-Christian Ott
Hi,
since several years I have been planed to launch a personal website. I
used to do quite aesthetical web design before I have subscribed to
minimalism. What annoyed me then and now was CSS and its implementations
in modern browsers.

When I tried to design a minimalist website (just some typographic
enhancements to make texts more read- and printable), I realised that
there seems to be no agreed standard for a default CSS stylesheet merely a
recommendation from the CSS standard [1] (which is incomplete) and a lot
of people seem to be concerned about resetting the browser CSS defaults -
even the W3C does so in their stylesheets [2]. Most people seems to have
installed nearly all popular browsers, test with those and incorporate
workarounds if necessary.

All in all this seems very absurd to me and I would like to know how
you approached this problem.

At the moment I'm just aware of The Anti-web Manifesto [3] that someone
linked to on this mailing list. Although I mainly subscribe to it,
browsers like Mozilla Firefox have terrible default typographic style
and using text-mode browsers like links often seems to be only solution
when reading longer texts.

Any ideas?

Regards,
Matthias-Christian

[1] http://www.w3.org/TR/CSS21/sample.html
[2] http://www.w3.org/StyleSheets/Core/Steely
[3] http://port70.net/webless/antiweb.html



Re: [dwm] Making it a million and one

2009-02-16 Thread Matthias-Christian Ott
On Mon, Feb 16, 2009 at 04:59:04PM -0500, I. Khider wrote:
 Hello Fellow DWM Users, 
 
 This question is probably asked a million times...but I would like to
 find a definitive manual on DWM. I want to know it better and do things
 like put the time on the top panel and put wallpaper in the background
 and make my terminal transparent. Basically, muck around with the
 settings of DWM. Where would I find instructions on that? Is there a
 definitive manual anywhere on-line?
 
 Learning about the 'float' feature more would also be nice. 
 
 Thanks and sorry for the rudimentary questions/requests. 
 
 -Ib-

$ man man
$ man dwm

If you don't consider this to be a manual, switch to another operating
system.


Regards,
Matthias-Christian



Re: [dwm] Re: [PATCH] fprintf where fputs is sufficiant

2009-02-15 Thread Matthias-Christian Ott
On Sun, Feb 15, 2009 at 07:43:47PM +0100, Szabolcs Nagy wrote:
 On 2/15/09, Marcin Cieslak sa...@system.pl wrote:
  Enno Gottox Boland got...@gmail.com wrote:
  -   fprintf(stderr, warning: no locale support\n);
  +   fputs(warning: no locale support\n, stderr);
 
  Depends on a code style one likes. To quote FreeBSD's style(9):
 
   Use printf(3), not fputs(3), puts(3), putchar(3), whatever; it is
  faster
   and usually cleaner, not to mention avoiding stupid bugs.
 
 yes, depends on who you ask, from dietlibc FAQ:
 
 Q: When linking binaries, I get warnings about stdio and printf all the
time.  What gives?
 A: Since the diet libc was written to make writing small programs
possible, it also tries to assist in the process of seeing causes of
bloat.  Premier causes for bloat are stdio and the printf family of
functions...

But in dietlibc puts() is a write() wrapper (so it does no buffering),
in glibc puts() is part of stdio and thus uses stdout.

Regards,
Matthias-Christian



[dwm] [PATCH] Ommit Border in Monocle Layout

2009-01-23 Thread Matthias-Christian Ott
Hi,
as discussed on the mailing list some days ago [1], here's my patch to
ommit borders in monocle layout.

Regards,
Matthias-Christian

[1] http://lists.suckless.org/dwm/0812/7211.html



[dwm] [PATCH] Save Floating Window Dimensions

2009-01-23 Thread Matthias-Christian Ott
Hi,
just the regular update of my patch to save floating window dimensions.

Regards,
Matthias-Christian
# HG changeset patch
# User Matthias-Christian Ott o...@mirix.org
# Date 1232051634 -3600
# Node ID 9aa8fdc1ea9b6c87d3b1055f61efeca59b078d91
# Parent  add6eb26ebaa4bd39278fe9ca7899d6fa95e3296
save dimensions of floating clients

diff --git a/dwm.c b/dwm.c
--- a/dwm.c
+++ b/dwm.c
@@ -83,6 +83,7 @@
 	char name[256];
 	float mina, maxa;
 	int x, y, w, h;
+	int sx, sy, sw, sh;
 	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
 	int bw, oldbw;
 	unsigned int tags;
@@ -890,6 +891,10 @@
 	XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
 	configure(c); /* propagates border_width, if size doesn't change */
 	updatesizehints(c);
+	c-sx = c-x;
+	c-sy = c-y;
+	c-sw = c-w;
+	c-sh = c-h;
 	XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
 	grabbuttons(c, False);
 	updatetitle(c);
@@ -1112,6 +1117,12 @@
 		c-y = wc.y = y;
 		c-w = wc.width = w;
 		c-h = wc.height = h;
+		if (!lt[sellt]-arrange || c-isfloating) {
+			c-sx = x;
+			c-sy = y;
+			c-sw = w;
+			c-sh = h;
+		}
 		wc.border_width = c-bw;
 		XConfigureWindow(dpy, c-win,
 CWX|CWY|CWWidth|CWHeight|CWBorderWidth, wc);
@@ -1347,7 +1358,9 @@
 	if(ISVISIBLE(c)) { /* show clients top down */
 		adjustborder(c, borderpx);
 		XMoveWindow(dpy, c-win, c-x, c-y);
-		if(!lt[sellt]-arrange || c-isfloating)
+		if(!lt[sellt]-arrange  !c-isfloating)
+			resize(c, c-sx, c-sy, c-sw, c-sh, True);
+		else if (c-isfloating)
 			resize(c, c-x, c-y, c-w, c-h, True);
 		showhide(c-snext);
 	}
@@ -1446,7 +1459,13 @@
 		return;
 	sel-isfloating = !sel-isfloating || sel-isfixed;
 	if(sel-isfloating)
-		resize(sel, sel-x, sel-y, sel-w, sel-h, True);
+		resize(sel, sel-sx, sel-sy, sel-sw, sel-sh, True);
+	else {
+		sel-sx = sel-x;
+		sel-sy = sel-y;
+		sel-sw = sel-w;
+		sel-sh = sel-h;
+	}
 	arrange();
 }
 


Re: [dwm] [PATCH] Ommit Border in Monocle Layout

2009-01-23 Thread Matthias-Christian Ott
Matthias-Christian Ott wrote:
 Hi,
 as discussed on the mailing list some days ago [1], here's my patch to
 ommit borders in monocle layout.
 
 Regards,
 Matthias-Christian
 
 [1] http://lists.suckless.org/dwm/0812/7211.html
 

Next time I should attach the patch.
# HG changeset patch
# User Matthias-Christian Ott o...@mirix.org
# Date 1232051874 -3600
# Node ID 01133f1c44f13290b6cc0364bb1edcff8303
# Parent  9aa8fdc1ea9b6c87d3b1055f61efeca59b078d91
ommit border in monocle layout

diff --git a/dwm.c b/dwm.c
--- a/dwm.c
+++ b/dwm.c
@@ -940,13 +940,11 @@
 
 void
 monocle(void) {
-	unsigned int n;
 	Client *c;
 
-	for(n = 0, c = nexttiled(clients); c  n  2; c = nexttiled(c-next), n++);
 	for(c = nexttiled(clients); c; c = nexttiled(c-next)) {
-		adjustborder(c, n == 1 ? 0 : borderpx);
-		resize(c, wx, wy, ww - 2 * c-bw, wh - 2 * c-bw, resizehints);
+		adjustborder(c, 0);
+		resize(c, wx, wy, ww, wh, resizehints);
 	}
 }
 


[dwm] Layers

2009-01-22 Thread Matthias-Christian Ott
Hi,
I can't remember if we talked about this some time ago. If so, I think
we didn't come to a satisifying consensus, so I want to revive the
discussion. But let me first of all introduce you to the problem.

Dwm has by default a floating and a tiled layer that can have a different
layout. Tiling or maximisation works fine for most clients (by the way,
is there are reason why windows are called clients in dwm jargon?), some
dialogs, popups or short-living windows require to be floating. Therefore
dwm keeps these windows on an upper layer.

While this makes sense for most applications, there are some (Gimp is
as famous example for this) that are build around this WIMP concept and
thus have to be floating in order to usable. But sometimes it makes sense
to quickly hide them to access information hidden by them (for example
I use the dictionary programme Ding when writing E-Mails in English).

A common approach would be to dedicate a tag to them and switch
via ALT+TAB back and forth. In my opinion this a bit cumbersome and
non-intuitive. I rather expect to rotate the two layers like I can do
with windows in monocle layout.

Regards,
Matthias-Christian



Re: [dwm] No Border Behaviour

2009-01-10 Thread Matthias-Christian Ott

Christian Garbs wrote:

On Thu, Jan 08, 2009 at 06:05:35PM -0500, voltaic wrote:


I agree with Matthias. The purpose of a border is to separate one
client from another. If there is only one client visible at a given
time (i.e. monocle) then borders in my opinion are a waste of space.
So borders should be set to 0 whenever the layout is monocle,
regardless of the number of clients tagged under the selected
tag(s).


This is an interesting point and I can relate to it.  If you follow
this through, for tiled clients only the inner borders are relevant
to separate it from another one.  You don't have to separate a client
from the window border or the status line (this might conflict with
highlighting windows, don't know as I don't use it).


No, it doesn't conflict with highlighting, because you could highlight 
the adjoining borders or introduce a new highlighting indicator.



Instead of tiling like this:

[] foo 11:25
.--..--.
|  ||  |
|  ||  |
|  |`--'
|  |.--.
|  ||  |
`--'`--'

this would be sufficient:

[] foo 11:25
   |
   |
   |
   |
   |
   |
   |


Maybe a separator to the status bar on top is also necessary:

[] foo 11:25

   |
   |
   |
   |
   |
   |
   |

But generally speaking I like the concept. Anyhow I'm afraid that it 
would conflict with X11's border concept, so you would have to draw the 
borders in an underlying window and move and resize it (as other window 
managers that use decoration do). In combination with the sufficient 
border concept this would blow up dwm a bit and would introduce some 
corner cases. I think this would be a reason for most users to reject 
this, even if it makes more sense.



It's also much more consistent with the tag layout string  |- :-)

dvtm already does this because in text mode a wasted line or column is
quite much.

Regards
Christian


Regards,
Matthias-Christian



Re: [dwm] No Border Behaviour

2009-01-09 Thread Matthias-Christian Ott

Anselm R Garbe wrote:

2009/1/8 Matthias-Christian Ott o...@mirix.org:

I think, this doesn't make much sense. My proposed conception of borderless
clients seems more reasonable and intuitive to me. If you take borders not
as decoration (as some window manager do), but instead as separating
entities, that are used to distinguish windows, it makes sense to omit the
borders if only one particular window is visible, because they aren't
serving any purpose. In others words: borders are superfluous in that case.


I think that is exactly how the current dwm implementation is supposed
to be -- I never said anything different to that (at least not that I
intended it).


OK, let me contrast your and my conception: In you opinion no border 
indicates, that there's just client in the tag, but I think the border 
should be omitted if there's just one client visible (of course there 
can be multiple in the tag).


In tiled layout we both mean the same, in monocle our conceptions are 
different, because you want the border to be an indicator of the number 
of clients in the tag. So the border functions in monocle not as a 
separator, but instead as an number indicator.



Kind regards,
--Anselm



Regards,
Matthias-Christian



Re: [dwm] No Border Behaviour

2009-01-09 Thread Matthias-Christian Ott

markus schnalke wrote:

[2009-01-08 18:05] voltaic volt...@gmail.com

I agree with Matthias. The purpose of a border is to separate one
client from another.


My view is: the (highlighted) border is to indicate the active client.
(Normal borders are only placeholders for the highlighted border.)


meillo


This could be a second purpose, but primarily borders separate by 
definition.
But for sure (as mentioned in my previous E-Mail) highlighting is an 
issue with a maximised window and floating windows on top of it.


Regards,
Matthias-Christian



Re: [dwm] No Border Behaviour

2009-01-09 Thread Matthias-Christian Ott

Szabolcs Nagy wrote:

On 1/9/09, voltaic volt...@gmail.com wrote:

I agree with Matthias. The purpose of a border is to separate one
client from another. If there is only one client visible at a given
time (i.e. monocle) then borders in my opinion are a waste of space.


what's the problem? that's how tip works

read carefully:


On Thu, Jan 8, 2009 at 10:15 AM, Anselm R Garbe garb...@gmail.com wrote:

2009/1/8 Matthias-Christian Ott o...@mirix.org:

borders if only one particular window is visible, because they aren't
serving any purpose. In others words: borders are superfluous in that
case.

I think that is exactly how the current dwm implementation is supposed
to be -- I never said anything different to that (at least not that I
intended it).


the only debatable question is the monocle+multiple window case, but
the current solution seems perfectly reasonable


Yes, that's the case I asked about.


you can write your own layout in config.h if different behaviour is needed


I actually planed to rewrite the dwm code itself, in case there's nobody 
  else who shares my opinion. But I would rather like to see this 
behaviour in dwm tip.


Regards,
Matthias-Christian



Re: [dwm] No Border Behaviour

2009-01-08 Thread Matthias-Christian Ott

Anselm R Garbe wrote:

Hi,


Hi,


2008/12/22 Matthias-Christian Ott o...@mirix.org:

Yesterday I updated my dwm tree to tip and noticed that the borders were
removed (1376). This applies only to clients in tiled layout, is there
a reason why this behaviour is not present in monocle?


It is present in monocle as well, if there is only 1 client. This
makes the new behavior also an indicator for the monocle layout if
there are more clients.


If no border indicates that there's just one client in the tag it makes
some sense, but I rather like borderless if there's only one client
visible. This seems more intuitive to me, because borders indicate a
separation which is only necessary when there is more than one client
visible.


Yes, that's how it is supposed to be.


I think, this doesn't make much sense. My proposed conception of 
borderless clients seems more reasonable and intuitive to me. If you 
take borders not as decoration (as some window manager do), but instead 
as separating entities, that are used to distinguish windows, it makes 
sense to omit the borders if only one particular window is visible, 
because they aren't serving any purpose. In others words: borders are 
superfluous in that case.


What do others think about this? Maybe I have just a different 
conception of it than everyone else. If so, I'll simply implement this 
for myself, otherwise I think dwm's behaviour should be altered.



Kind regards,
--Anselm



Regards,
Matthias-Christian



Re: [dwm] 25c3

2008-12-28 Thread Matthias-Christian Ott

markus schnalke schrieb:

[2008-12-28 13:01] Szabolcs Nagy nszabo...@gmail.com
  

On 12/14/08, Anselm R Garbe garb...@gmail.com wrote:


I plan a lightning talk on the 28/12 in the morning about st and the
secret project...
  

sooo.. what is the secret project? ;)
or is the talk scheduled later?
what's happened?



please also link the recording and slides (if used)


meillo
who's very curious :-)
  
I didn't attend to the congress, but as far as I understood it, Anselm 
missed the lightening talks [1] and didn't present the suckless project.


Sven Guckes scheduled him for tomorrow morning [2], but I think Anselm 
said, that he will leave Berlin tonight.


Regards,
Matthias-Christian

[1] 
http://thepiratebay.org/torrent/4605880/25c3-3048-Lightning_Talks_Day2.wmv
[2] 
http://events.ccc.de/congress/2008/wiki/Lightning_Talks#Talks_-_Day.233_-_Morning




[dwm] No Border Behaviour

2008-12-22 Thread Matthias-Christian Ott
Hi,
I have been busy for a while, so I couldn't follow any discussions or
development efforts.

Yesterday I updated my dwm tree to tip and noticed that the borders were
removed (1376). This applies only to clients in tiled layout, is there
a reason why this behaviour is not present in monocle?

If no border indicates that there's just one client in the tag it makes
some sense, but I rather like borderless if there's only one client
visible. This seems more intuitive to me, because borders indicate a
separation which is only necessary when there is more than one client
visible.

So if multiple windows are visible, I suggest to draw the borders
Otherwise I think they can be omitted, because they have no
purpose. Floating windows require of a permanent border.

Could someone please clarify dwm's non-intuitive behaviour?

Regards,
Matthias-Christian



[dwm] [Offtopic] Virtual Server Hosting

2008-09-12 Thread Matthias-Christian Ott
Hi,
I'm currently searching for a virtual server hosting provider. I tried
gandi.net (because suckless.org is hosted there), but as I got to know
afterwards they just provide outdated distributions and don't seem to
use hardware virtualisation. I'm a bit despaired, because my current
hosting contract expires soon, I need a good server as soon as possible.

I have established some criteria that have to be fulfilled (sorted by
priority):

  ! Ability to install custom operating systems via CD image (optionally
via virtual disk image)
  ! Hardware virtualisation (AMD-V or Intel VT), so I can install an
unmodified kernel and don't have to create own images
  +  64 MB RAM
  +  5 GB disk space
  + Unlimited traffic or cheap prices
  + Multiple IP addresses possible
  + Secondary DNS Service

Regards,
Matthias-Christian



Re: [dwm] [Offtopic] Virtual Server Hosting

2008-09-12 Thread Matthias-Christian Ott
Anselm R Garbe wrote:
 2008/9/12 Matthias-Christian Ott [EMAIL PROTECTED]:
  I'm currently searching for a virtual server hosting provider. I tried
  gandi.net (because suckless.org is hosted there), but as I got to know
 
 suckless.org isn't hosted at gandi.net, I use gandi.net only as registrar.
 
 code.suckless.org is hosted on some slicehost in California,
 www.suckless.org is hosted at Bytemark in the UK. Personally I'm using
 a small hoster in the UK as well called BitFolk. The old suckless.org
 server is hosted at Strato in Berlin, however I cancelled the contract
 and the server will only run until mid of October. So far only Uriels
 stuff is hosted on the old server (cat-v.org).

OK, thanks for the clarification.
 
 Kind regards,
 --Anselm

Regards,
Matthias-Chrisitian



[dwm] Patch: Save Floating for dwm-5.2

2008-09-10 Thread Matthias-Christian Ott
Hi,
just the usual save floating patch.

Regards,
Matthias-Christian
diff -r ef1026c88059 dwm.c
--- a/dwm.c	Tue Sep 09 20:47:01 2008 +0100
+++ b/dwm.c	Wed Sep 10 08:18:13 2008 +0200
@@ -85,6 +85,7 @@ struct Client {
 	char name[256];
 	float mina, maxa;
 	int x, y, w, h;
+	int sx, sy, sw, sh;
 	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
 	int bw, oldbw;
 	unsigned int tags;
@@ -883,6 +884,10 @@ manage(Window w, XWindowAttributes *wa) 
 	XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
 	configure(c); /* propagates border_width, if size doesn't change */
 	updatesizehints(c);
+	c-sx = c-x;
+	c-sy = c-y;
+	c-sw = c-w;
+	c-sh = c-h;
 	XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
 	grabbuttons(c, False);
 	updatetitle(c);
@@ -1096,6 +1101,12 @@ resize(Client *c, int x, int y, int w, i
 		c-y = wc.y = y;
 		c-w = wc.width = w;
 		c-h = wc.height = h;
+		if (!lt[sellt]-arrange || c-isfloating) {
+			c-sx = x;
+			c-sy = y;
+			c-sw = w;
+			c-sh = h;
+		}
 		wc.border_width = c-bw;
 		XConfigureWindow(dpy, c-win,
 CWX|CWY|CWWidth|CWHeight|CWBorderWidth, wc);
@@ -1374,7 +1385,9 @@ showhide(Client *c) {
 		return;
 	if(ISVISIBLE(c)) { /* show clients top down */
 		XMoveWindow(dpy, c-win, c-x, c-y);
-		if(!lt[sellt]-arrange || c-isfloating)
+		if(!lt[sellt]-arrange  !c-isfloating)
+			resize(c, c-sx, c-sy, c-sw, c-sh, True);
+		else if (c-isfloating)
 			resize(c, c-x, c-y, c-w, c-h, True);
 		showhide(c-snext);
 	}
@@ -1469,7 +1482,13 @@ togglefloating(const Arg *arg) {
 		return;
 	sel-isfloating = !sel-isfloating || sel-isfixed;
 	if(sel-isfloating)
-		resize(sel, sel-x, sel-y, sel-w, sel-h, True);
+		resize(sel, sel-sx, sel-sy, sel-sw, sel-sh, True);
+	else {
+		sel-sx = sel-x;
+		sel-sy = sel-y;
+		sel-sw = sel-w;
+		sel-sh = sel-h;
+	}
 	arrange();
 }
 


Re: [dwm] malloc'ed client in manage()

2008-09-07 Thread Matthias-Christian Ott
Nicolas Martyanoff wrote:
 On Sun, 7 Sep 2008 11:25:53 +0200
 Szabolcs Nagy [EMAIL PROTECTED] wrote:
 
  On 9/6/08, Filippo Erik Negroni [EMAIL PROTECTED] wrote:
   A preferable, safer and more portable way of achieving such
   initialisation is to use the compiler's static initialisation.
  
  is it because of null pointer might not be represented as zeros?
 I don't think so.
 
 KR, 2nd Ed. page 102:
 Pointers and integers are not interchangeable. Zero is the sole
 exception: the constant zero may be assigned to a pointer, and a
 pointer may be compared with the constant zero. The symbolic constant
 NULL is often used in place of zero, as a mnemonic to indicate that
 this is a special value for a pointer
 
 I think it's quite explicit: the NULL macro expands to 0.

Does anyone know whether there are architectures where NULL is not equal
to 0?

See ISO/IEC 9899:TC2 Section 7.17.3:

  The macros are NULL which expands to an implementation-defined null
   pointer constant and; ...

See ISO/IEC 9899:TC2 Section 6.3.2.3.3:
  An integer constant expression with the value 0, or such an
   expression cast to type void *, is called a null pointer constant.

Seems like a contradiction in the C99 standard (I have to admit that my
version is a Committee Draft).

See ISO/IEC 14882:1998 and ISO/IEC 14882:2003 Section 4.10:
  A null pointer constant is an integer constant expression (5.19)
   rvalue of integer type that evaluates to zero.

See ISO/IEC 14882:1998 and ISO/IEC 14882:2003 Section 18 Footnote 180:
  Possible definitions include 0 and 0L, but not (void *)0.

And this sounds like a conflict between C and C++.

But anyhow it seems that you can't do this reliably, because s isn't
used by memset as a pointer.

memset(s, 0, sizeof(s));

where s is a struct.

According to ISO/IEC 9899:TC2 Section 6.7.8.1 and Section 6.7.8.10 this
would be correct:

s = {0}; or s = 0;

Anyhow it's not working with gcc.

Regards,
Matthias-Christian



Re: [dwm] malloc'ed client in manage()

2008-09-07 Thread Matthias-Christian Ott
Szabolcs Nagy wrote:
 On 9/7/08, Matthias-Christian Ott [EMAIL PROTECTED] wrote:
  Nicolas Martyanoff wrote:
 
  Does anyone know whether there are architectures where NULL is not equal
  to 0?
 
 this question occasionally appears on comp.lang.c and there exists
 such beast, but i cannot find the reference now
 
 probably it's some old or otherwise esoteric architecture
 
  See ISO/IEC 9899:TC2 Section 7.17.3:
 
The macros are NULL which expands to an implementation-defined null
 pointer constant and; ...
 
  See ISO/IEC 9899:TC2 Section 6.3.2.3.3:
An integer constant expression with the value 0, or such an
 expression cast to type void *, is called a null pointer constant.
 
  Seems like a contradiction in the C99 standard (I have to admit that my
  version is a Committee Draft).
 
 there is no contradiction

OK, if think about the phrase implementation-defined null pointer
constant twice, it becomes clear that this means that NULL can be
defined in one of the following ways:

#define NULL(void *)0

or

#define NULL0

I overread null pointer constant and thought that they first mention
that NULL is implementation-defined and then state that NULL is 0 oder
(void *)0.
 
 '0' can simply mean 2 completely different things: null pointer in
 pointer context, or integer 0 otherwise
 
 so a _constant_ integer expression with value 0 automagically becomes
 a null pointer which may or may not be represented internally by all
 bits zero
 
 (but eg an integer 0 must be represented by all bits zero)
 
  See ISO/IEC 14882:1998 and ISO/IEC 14882:2003 Section 4.10:
A null pointer constant is an integer constant expression (5.19)
 rvalue of integer type that evaluates to zero.
 
  See ISO/IEC 14882:1998 and ISO/IEC 14882:2003 Section 18 Footnote 180:
Possible definitions include 0 and 0L, but not (void *)0.
 
  And this sounds like a conflict between C and C++.
 
 yes, c++ was developped with this design decision from the start
 
  But anyhow it seems that you can't do this reliably, because s isn't
  used by memset as a pointer.
 
  memset(s, 0, sizeof(s));
 
  where s is a struct.
 
 yes, that's the point: according to standard calloc is not ok, but
 default struct initialization is
 
 (but we can overlook this since X won't run such weird architecture)
 
I mean this whole NULL pointer thing scarses me. First they thought: OK,
NULL was always synonimous with 0, so let's say if someone assigns 0 to
a pointer lets make it a hardware NULL (which isn't 0 on some
architectures). But what follows is that all code that generalises the
pointer = 0 principle to variable = 0, cast to pointer to be the
same becomes invalid. That's so stupid.
In my code I'll assume that memset(s, 0, sizeof(s)); works for all
pointers.

  According to ISO/IEC 9899:TC2 Section 6.7.8.1 and Section 6.7.8.10 this
  would be correct:
 
  s = {0}; or s = 0;
 
  Anyhow it's not working with gcc.
 
 in c99 you initialize a struct to zero with:
 
 struct_t s = {};

But anyways I'm not sure whether static char *p is equal to char *p =
NULL.

Regards
Matthias-Christian 



Re: [dwm] Asustek EEE PC 1000 Atom 1GB 40G SSD Linux Black

2008-09-06 Thread Matthias-Christian Ott
David Tweed wrote:
 On Fri, Sep 5, 2008 at 3:25 PM, Matthias-Christian Ott [EMAIL PROTECTED] 
 wrote:
  Kurt H Maier wrote:
  I have a string of thinkpads.  The newest model I have is a T43, and
  after my wife brought home an X41 on loan from her employer I
  considered buying one.  Sure, you can get a used x-series for not much
  money, but I bought an Acer Aspire One[1] for $300 -- and it's under
  warranty, I don't have to worry about replacing the worn-out battery,
  and all the other things that come with a new computer instead of a
  used one.
 
  That's stupid! Even if the battery is nearly unusable, you can still buy
  a new one instead of buying a new computer (I also heard about people
  who build their own batteries ;)). Buying a new computer if the old one
  is not entirely broken just contributes to these huge e-waste dumps in
  Africa and Asia.
 
 FWIW, I still have my old laptop and occasionally use it, but a year
 ago I got tired of walking around with this heavy thing in my backpack
 all the time and bought a very cheap UMPC thing with a 7 in screen and
 support for a USB plug-in keyboard. The machine is much more useful to
 me because, being lighter, I no longer have to think about if I'm
 going to be walking too far to want to carry the laptop, the UMPC just
 automatically goes in my backpack. There are only two problems with
 the new machine: boot up time, because Linux suspend doesn't work, and
 because it's so small it can be difficult to use on a train/bus with
 bright sunlight outside (normal laptops being bigger tend to block out
 the sun better). It's an enivronmental trade-off: I'm buying new kit
 but then I don't do all the driving around other people do
 unthinkingly.
 
 The screen works acceptably in a tweaked dwm which automatically
 assigns a new tag to every opened window, and I can write papers and
 do programming on it (at least, providing it's not really sunny!)

That must be really painful. When I tried to touch type on an EEE PC
700 I often hit two keys at the same time (maybe just because I'm used
to an IBM Model M keyboard, but anyhow it seemed unfavourable). I'm
aware that some people managed to use the keyboard effectively [1].
 
  I meant this seriously. I didn't touch a EEE PC 1000, but for the EEE PC
  700 this is true. I haven't seen someone using this as his development
  computer or computer for longer works.
 
 I work on my 7in PC (primarily using dwm  emacs), although train 
 bus travel is sufficiently tiring that about 2 hours is all I can
 manage. (I also zonk out at about 2 hours reading fiction books whilst
 traveling.)
 
  Additionally I can't understand, why all people started to carry around
  laptops (what's the difference between laptop and notebook?) with
  themselves, except they are maybe professionals (programmers,
  scientists, ...) and travel a lot. I don't have to have a laptop to sit
  in an internet cafe during holidays.
  All the world seems to be busy (or at least pretend this) and therefore
  has to run around with mobile devices (mobile phones, laptops, ...) in
  order to do their important work. In my opinion these mobile devices
  are just modern today and people often just buy them and use them in the
  public for no reason, just to show who they are. It became some kind of
  status symbol.
 
 I've never understood why people who drive have laptops, other than to
 give client presentations, since they don't have the ability to use
 them whilst travelling. But on public transport and planes they can
 make sense if you've got work you can do in a relatively crowded
 environment. The other minor use is that, having been stranded once
 during a foreign trip -- the railway line the Eurostar trip home
 passed by exploding gas cylinders -- and had to book an emergency
 flight home via the web, I would have been really, REALLY nervous
 about trusting an internet cafe's computers with my credit card
 details.

I didn't say that portable computers aren't useful (I mentioned
programmers and scientists as an example), but the extents of that are
far too great.
I don't mean computers aren't useful, but a lot of work non-professionals
do with their computers could be more or less done with pen and paper
(even if it takes a little bit longer). You usually don't need check
your E-Mails every hour while you are travelling and in case you really
need this, you should ask yourself whether there's something wrong with
your job.
 
  If your at an airport, just look at the screens of these business
  men - nearly nobody of them does serious work (or at least I got the
  impression). You can also observe this at internet cafes or railway
  stations.
 
 When actually ON the train I've observed lots of people writing
 reports, etc. (Of course, most reports are pointless but then you can
 say that about lots of paid human activity...)

Yes, indeed ;).

[1] http://www.youtube.com/watch?v=qjZGbJhcRbY



Re: [dwm] Asustek EEE PC 1000 Atom 1GB 40G SSD Linux Black

2008-09-05 Thread Matthias-Christian Ott
Anselm R Garbe wrote:
 What do people think about such an EEE PC as low budget option to run
 dwm on? Any experiences already if the screen is big enough for daily
 work? I had an opportunity yesterday to try one, and I must admit I'm
 keen to order one. The keyboard and keys have surprisingly proper
 size.

The previous EEE PC models were unusable with dwm (well, pretty much
unusable with everything), except maybe monocle.
I don't have one (I think these mini-notebooks are just toys and wasted
money), but my 17 CRT runs at 1024x768. As far as I know the EEE PC
has a resolution of 1024x600, so it's compareable.
Working with 1024x768 makes tiling unusable (except maybe with multiple
horizontal masters and no stacking area (there were some patches for
this some time ago)) and you are forced to use tags as workspaces or use
monocle and floating.
So as far as I can tell, running dwm on everything 19 or 1600x1200 is
painful and does only have some smaller advantages (like code size,
keyboard usage, performance) over other WIMP window managers.
Therefore save our planet and don't buy these e-waste.
 
 Kind regards,
 --Anselm

Regards
Matthias-Christian



Re: [dwm] Asustek EEE PC 1000 Atom 1GB 40G SSD Linux Black

2008-09-05 Thread Matthias-Christian Ott
Kurt H Maier wrote:
 I have a string of thinkpads.  The newest model I have is a T43, and
 after my wife brought home an X41 on loan from her employer I
 considered buying one.  Sure, you can get a used x-series for not much
 money, but I bought an Acer Aspire One[1] for $300 -- and it's under
 warranty, I don't have to worry about replacing the worn-out battery,
 and all the other things that come with a new computer instead of a
 used one.

That's stupid! Even if the battery is nearly unusable, you can still buy
a new one instead of buying a new computer (I also heard about people
who build their own batteries ;)). Buying a new computer if the old one
is not entirely broken just contributes to these huge e-waste dumps in
Africa and Asia.
I bought my Computer a month before the Euro was introduced and it still
works and no components died. Old components are great. For example I
bought a Matrox Graphics G-450 a few month ago for 1€ at eBay and I'm
proud to have it working without proprietary Software, or take my IBM
Model M keyboard which was manufactured somewhen in the 1980s (It even
survived a chemical laboratory - well, I took some hours to clean it ;)).
The only argument that I accept against old components is that the
performance/power consumption ratio is lower.
 
 dwm works just fine on 1024x600 -- I don't understand the people who
 complain about screen size.  I use the same font I used on my 124 dpi
 T43[2] and I have no problems.

But tiling doesn't work effectively on these screens (at least on my
screen it doesn't).
 
 Anyway, it's (as usual) a matter of personal preference, but this
 machine is much smaller, lighter, and easier to carry around all day
 than an X41.  I can only assume that calling these machines toys is
 a deliberate troll.  Nobody's claiming that netbooks are desktop

I meant this seriously. I didn't touch a EEE PC 1000, but for the EEE PC
700 this is true. I haven't seen someone using this as his development
computer or computer for longer works.

 replacements, but not all of us want to lug a 19 laptop around
 everywhere we go.  A computer's a computer.

I didn't say that these netbooks are no computers or have bad
performance (I prefer an Intel Atom CPU to a Dual Core processor), I
just said, if the manufacturers would build exactly the same machines
with bigger displays, the computers would be a good choice - at least
currently they are in the majority of cases just toys.
Additionally I can't understand, why all people started to carry around
laptops (what's the difference between laptop and notebook?) with
themselves, except they are maybe professionals (programmers,
scientists, ...) and travel a lot. I don't have to have a laptop to sit
in an internet cafe during holidays.
All the world seems to be busy (or at least pretend this) and therefore
has to run around with mobile devices (mobile phones, laptops, ...) in
order to do their important work. In my opinion these mobile devices
are just modern today and people often just buy them and use them in the
public for no reason, just to show who they are. It became some kind of
status symbol.
If your at an airport, just look at the screens of these business
men - nearly nobody of them does serious work (or at least I got the
impression). You can also observe this at internet cafes or railway
stations.

This is why I decided that I won't buy a laptop and otherwise will buy a
used one.
 
 # Kurt H Maier

Regards,
Matthias-Christian



Re: [dwm] window move lag

2008-09-05 Thread Matthias-Christian Ott
Anselm R Garbe wrote:
 An easy fix is grabbing the X server until the mouse release. I did
 this once, but decided against it since your scenario is at least less
 frequent in my own use case ;)
 
 Another possibility would be to go the old wmi way of drawing an XORed
 border onto the screen. But I really prefer the way as it is in dwm.

I prefer it this way. What about dumping the window into a pixmap and
moving this pixmap around until the mouse is released again? This is a
good comprise I think.
 
 Kind regards,
 Anselm

Regards
Matthias-Christian

 2008/9/5 Mate Nagy [EMAIL PROTECTED]:
  Hulloh,
   let's say that I have a number of floating windows running complicated
  OpenGL applications. When I move them around (by mod+mouse1 drag),
  moving the window each step takes some time. This time is larger than
  the frequency at which dwm gets mousemotions, thus the movement lags
  behind the mouse.
   This is rather annoying :) (It also applies to resizing.)
   Would it be easily possible to skip superfluous mousemotions when
  they're received in one bunch?
   The lag effect is noticable for me when I run two concurrent floating
  glxgears instances (otherwise, the 'complicated application' is the
  FlightGear flight sim in my case).
 
  Regards,
   Mate
 



Re: [dwm] Asustek EEE PC 1000 Atom 1GB 40G SSD Linux Black

2008-09-05 Thread Matthias-Christian Ott
Kurt H Maier wrote:
  But tiling doesn't work effectively on these screens (at least on my
  screen it doesn't).
 
 I haven't had any problems.  I just use bottomstack.

OK, this may work somehow (Yes, I tried it). I prefer nmaster with no
stacking area (currently I'm running vanilla dwm). By the way is there
a reason why dwm has no nmaster by default (even 2wm has this)?
 
  All the world seems to be busy (or at least pretend this) and therefore
  has to run around with mobile devices (mobile phones, laptops, ...) in
  order to do their important work. In my opinion these mobile devices
  are just modern today and people often just buy them and use them in the
  public for no reason, just to show who they are. It became some kind of
  status symbol.
  If your at an airport, just look at the screens of these business
  men - nearly nobody of them does serious work (or at least I got the
  impression). You can also observe this at internet cafes or railway
  stations.
 
 I don't see how this relates to whether or not a netbook is a useful
 tool, or how it relates to whether dwm runs well on one.

I don't see this too. It was more likely some critical pseudo-philosophic
statement that relates to it in the broader sense. In the future just
ignore these verbose digressions I make.
In this particular sense I just changed the topic from Should I buy an
EEE PC 1000? to Is it necessary to have a portable computer?,
therefore it doesn't answer the initial question, but maybe can
contribute to it's answer.
 
 #Kurt H Maier

Regards,
Matthias-Christian



Re: [dwm] what about 'st'?

2008-09-05 Thread Matthias-Christian Ott
yy wrote:
 2008/9/5 Donald Chai [EMAIL PROTECTED]:
  I have found something quite useful when working with lot of terminals
  that is having different background colors depending on the task they
  are designed to be. But currently i just change the background color of
  vim and use this to differentiate them. another stuff would be like
  changing the background color of the terminal depending on the focus.
 
  I also like when my display looks like farmland when viewed from above. :)
 
  I see no terminal able to do this in a simple way.
 
 
 My display looked like a farmland some time ago. I just had key
 bindings in dwm to open xterms with a given background color in a
 given screen window.
 
 It looked like this:
 http://y-i-y-u-s.deviantart.com/art/dwm-4-4-1-65928966

What's that layout? 

Regards
Matthias-Christian 



[dwm] Patch: Layout Indicator Left

2008-09-02 Thread Matthias-Christian Ott
Hi,
the attached patch moves the layout indicator to the left of the tag bar.

Kind Regards,
Matthias-Christian
diff -r 3f66d2d2cd6e dwm.c
--- a/dwm.c	Mon Sep 01 22:18:50 2008 +0100
+++ b/dwm.c	Tue Sep 02 17:49:51 2008 +0200
@@ -514,6 +514,11 @@ drawbar(void) {
 	}
 
 	dc.x = 0;
+	if(blw  0) {
+		dc.w = blw;
+		drawtext(lt[sellt]-symbol, dc.norm, False);
+		dc.x += dc.w;
+	}
 	for(i = 0; i  LENGTH(tags); i++) {
 		dc.w = TEXTW(tags[i]);
 		col = tagset[seltags]  1  i ? dc.sel : dc.norm;
@@ -521,13 +526,7 @@ drawbar(void) {
 		drawsquare(sel  sel-tags  1  i, occ  1  i, urg  1  i, col);
 		dc.x += dc.w;
 	}
-	if(blw  0) {
-		dc.w = blw;
-		drawtext(lt[sellt]-symbol, dc.norm, False);
-		x = dc.x + dc.w;
-	}
-	else
-		x = dc.x;
+	x = dc.x;
 	dc.w = TEXTW(stext);
 	dc.x = ww - dc.w;
 	if(dc.x  x) {


Re: [dwm] Patch: Layout Indicator Left

2008-09-02 Thread Matthias-Christian Ott
This fixes clicking on the bar.

Kind Regards,
Matthias-Christian
diff -r eb1eb9811706 dwm.c
--- a/dwm.c	Tue Sep 02 18:47:01 2008 +0100
+++ b/dwm.c	Tue Sep 02 21:30:40 2008 +0200
@@ -310,7 +310,8 @@ buttonpress(XEvent *e) {
 
 	click = ClkRootWin;
 	if(ev-window == barwin) {
-		i = x = 0;
+		i = 0;
+		x = blw;
 		do x += TEXTW(tags[i]); while(ev-x = x  ++i  LENGTH(tags));
 		if(i  LENGTH(tags)) {
 			click = ClkTagBar;
@@ -514,6 +515,11 @@ drawbar(void) {
 	}
 
 	dc.x = 0;
+	if(blw  0) {
+		dc.w = blw;
+		drawtext(lt[sellt]-symbol, dc.norm, False);
+		dc.x += dc.w;
+	}
 	for(i = 0; i  LENGTH(tags); i++) {
 		dc.w = TEXTW(tags[i]);
 		col = tagset[seltags]  1  i ? dc.sel : dc.norm;
@@ -521,13 +527,7 @@ drawbar(void) {
 		drawsquare(sel  sel-tags  1  i, occ  1  i, urg  1  i, col);
 		dc.x += dc.w;
 	}
-	if(blw  0) {
-		dc.w = blw;
-		drawtext(lt[sellt]-symbol, dc.norm, False);
-		x = dc.x + dc.w;
-	}
-	else
-		x = dc.x;
+	x = dc.x;
 	dc.w = TEXTW(stext);
 	dc.x = ww - dc.w;
 	if(dc.x  x) {


Re: [dwm] dwm: request to discuss

2008-08-29 Thread Matthias-Christian Ott
Maxim Vuets wrote:
 2008/8/29, Donald Chai [EMAIL PROTECTED]:
 
  I think that mouse is not really important for dwm status bar.
  So we can neglect of such feedback.
  I can not agree we you that shared libraries and some ABI is so bad.
  But agree that it is too heavy for such program as dwm. It is useless
  here. On the other hand, extending via code patching is wierd.
  Especially when you need to apply more than one patch.
 
  You might enjoy reading this interview with Don Knuth:
  http://www.informit.com/articles/article.aspx?p=1193856
  Basically, re-editable code is better than reusable code (to him).
 
 Thanks a lot for the link, I'll look it a bit later.
 My 5 cents (: Knuth is a mathematician. All that theory is good, but
 it is not always applicable in practice. IIRC, Eric Raymond says
 that binary RPC is evil, threads are evil etc. But look: we are using
 Apache httpd with threads and mod_*.so, PAM... So every

You are using Apache? Shame on you ;). Seriously Apache is definitively
not suckless.

 technical approach is good and useful in some exact context of its
 usage. Threads are evil for dwm (: but is good for highload network
 server. And so on.

Hmmm, I think threads make it just easier to write software that does
several things concurrently. AFAIR Plan 9 has good examples were this
kind of concurrency is used in a nice way.

 Just for a note: yes, .so for dwm is evil. I've already said it.
 But unix-way IPC---looks not so bad, I think.

Do you mean pipes or sockets? Pipe are definitely suckless. But this
whole UNIX socket API sucks really.
 
  What version of dwm are you using?
 
 Tip.
 
  dwm has had two workspaces/desktops since I've been using it
  (admittedly not very long). Press MOD-Tab to switch between them.
 
 Hm, right. In fact it is just previous set of tags. Not actualy that I want
 to get. And does not work with more than two desktops.

Regards
Matthias-Christian



Re: [dwm] applyrules

2008-08-29 Thread Matthias-Christian Ott
Anselm R Garbe wrote:
 Hi Filippo,
 
 2008/8/27 Filippo Erik Negroni [EMAIL PROTECTED]:
  In applyrules(), the return value of XGetClassHint is not checked.
 
 Agreed.
 
  ch is also initialised to {0}, which, I believe, is reduntant if
  XGetClassHint is successful.
 
 Well, I think we should keep this and also the checks for res_class
 and res_name, since it is not mandatory to set both or any of these
 WM_CLASS properties. If seen some apps during the last 6 years of X
 work, which are broken in this way.
 
  The global static variable dc is initialised to {0}, which is redundant,
  being a static.
 
 Is this defined somewhere?

ISO/IEC 9899:TC2 page 126 (Section 6.7.8.8):
 - if it has a pointer type, is initialized to a null pointer;
 
 Kind regards,
 --Anselm

Regards
Matthias-Christian



Re: [dwm] dwm: request to discuss

2008-08-28 Thread Matthias-Christian Ott
Maxim Vuets wrote:
 2008/8/28, Matthias-Christian Ott [EMAIL PROTECTED]:
 
  I don't propose to get rid of tags, no! I propose to introduce
  workspaces in addition to tags. It will be just sets which keep
  current layout and selected tags. That's all!
 
  +1
 
  That makes sense to me, but where do you want to place the workspace
  list?
 
 It is not strongly neceserry. If status bar will be separate application,
 it is not care of dwm. If not---I see one nice place: before tags list.
 But not list and just a name of the current workspace.

If you want to seperate dwm and status bar you have to come up with a
practical protocol. Assumed that dwm still manages the tags and
status bar is just responsible for displaying the data, I propose (not
perfect, just to give you an idea):

:s ntag n was selected
:d ntag n was deselected
:a ntag n contains windows (litlle square)
:l llayout l selected
:t sset window title to s
:f  current window is floating

Anyhow sourcing out the status bar that will probably make dwm more
complex than the monolithic version. I really favour modularity, unix
philsophy and simplicty, but I think in this case there are good enough
reasons to break these rules, if you think in terms of LOC and
complexity.

  I want to use some layout scheme to one set of windows and
  another layout to another set. dwm cannot do it. awesome can
  (exactly for 2.x, don't know about 3.x). But it is broken---it tryies to
  use
  tags (yes, they are still tags) as workspaces. It remembers layout per
  tag.
 
  +1
 
  Another nice feature would be a workspace deck or tag deck. This way
  multiple tags or workspaces can be overlay each other on multiple
  layers. I don't if this really practically relevant.
 
 If I understand you correctly, I don't see practical usage of such deck.
 Your example?

I have to admit that ehe overlay makes just some sense with floating
windows, otherwise it's just circling through workspaces/tags.

Regards
Matthias-Christian 



Re: [dwm] savefloats isn't working in 5.1

2008-08-07 Thread Matthias-Christian Ott
RCarter wrote:
 This page: http://www.suckless.org/wiki/dwm/patches/save_floates.html
 says about the save_floats patch: Recently it became part of the main
 distribution of dwm
 
 I'm just switching to 5.1, and have never used this functionality before.
 I don't think its working.

I hope this works for you.

Regards
Matthias-Christian
changeset:   1317:fb2962745512
user:Matthias-Christian Ott [EMAIL PROTECTED]
date:Sun Jul 20 19:55:35 2008 +0200
summary: save floating dimensions

diff -r df74a88a2d44 -r fb2962745512 dwm.c
--- a/dwm.c	Sun Jul 20 19:16:33 2008 +0200
+++ b/dwm.c	Sun Jul 20 19:55:35 2008 +0200
@@ -85,6 +85,7 @@ struct Client {
 	char name[256];
 	float mina, maxa;
 	int x, y, w, h;
+	int sx, sy, sw, sh;
 	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
 	int bw, oldbw;
 	unsigned int tags;
@@ -274,7 +275,9 @@ arrange(void) {
 	for(c = clients; c; c = c-next)
 		if(ISVISIBLE(c)) {
 			XMoveWindow(dpy, c-win, c-x, c-y);
-			if(!lt[sellt]-arrange || c-isfloating)
+			if(!lt[sellt]-arrange  !c-isfloating)
+resize(c, c-sx, c-sy, c-sw, c-sh, True);
+			else if (c-isfloating)
 resize(c, c-x, c-y, c-w, c-h, True);
 		}
 		else {
@@ -912,6 +915,10 @@ manage(Window w, XWindowAttributes *wa) 
 	XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
 	configure(c); /* propagates border_width, if size doesn't change */
 	updatesizehints(c);
+	c-sx = c-x;
+	c-sy = c-y;
+	c-sw = c-w;
+	c-sh = c-h;
 	XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
 	grabbuttons(c, False);
 	updatetitle(c);
@@ -1117,6 +1124,12 @@ resize(Client *c, int x, int y, int w, i
 		c-y = wc.y = y;
 		c-w = wc.width = w;
 		c-h = wc.height = h;
+		if (!lt[sellt]-arrange || c-isfloating) {
+			c-sx = x;
+			c-sy = y;
+			c-sw = w;
+			c-sh = h;
+		}
 		wc.border_width = c-bw;
 		XConfigureWindow(dpy, c-win,
 CWX|CWY|CWWidth|CWHeight|CWBorderWidth, wc);
@@ -1480,7 +1493,13 @@ togglefloating(const Arg *arg) {
 		return;
 	sel-isfloating = !sel-isfloating || sel-isfixed;
 	if(sel-isfloating)
-		resize(sel, sel-x, sel-y, sel-w, sel-h, True);
+		resize(sel, sel-sx, sel-sy, sel-sw, sel-sh, True);
+	else {
+		sel-sx = sel-x;
+		sel-sy = sel-y;
+		sel-sw = sel-w;
+		sel-sh = sel-h;
+	}
 	arrange();
 }
 



Re: [dwm] Purpose of Monocle Layout

2008-08-03 Thread Matthias-Christian Ott
Ian Daniher [EMAIL PROTECTED] wrote:

 Hi All,
 I use Monocle it often on my 12 portable.

 BTW, a friend and I came up with the idea, that it would be useful to
 have some visual hint of how many windows you are actually viewing in
 monocle. Say, there are five windows with currently viewed tag and
 you're viewing the third window in the stack; then there could be an
 indicator like: [3/5] or [..*..]. What do you guys think about that?

+/- 0
I don't think it helps you a lot.

 I definitely think that an indicator of how many windows are on the tab
 would be helpful.

 Also, implementing the alt-tab to switch between the windows on that tab
 would seem to make sense.

+1
I would really like to see this in dwm soon.

 Not being a C coder, I can't offer assistance in the creation of a patch or
 in the addition of code, but I'd greatly appreciate the aforementioned
 functionality.

 Thanks!
 -- 
 Ian Daniher

Regards
Matthias-Christian



Re: [dwm] Purpose of Monocle Layout

2008-08-03 Thread Matthias-Christian Ott
Matthias-Christian Ott [EMAIL PROTECTED] wrote:

 Anselm R Garbe [EMAIL PROTECTED] wrote:

  2008/8/2 Ian Daniher [EMAIL PROTECTED]:
   BTW, a friend and I came up with the idea, that it would be useful to
   have some visual hint of how many windows you are actually viewing in
   monocle. Say, there are five windows with currently viewed tag and
   you're viewing the third window in the stack; then there could be an
   indicator like: [3/5] or [..*..]. What do you guys think about that?
 
  This idea is rather old and it was implemented once in some official
  version of dwm. However, because it is only interesting for 1
  particular layout, namely monocle, it has been removed again. AFAIR
  the solution to the problem was a change to the Layout struct, instead
  of defining a simple symbol string for the layout, I used some
  function pointer which returned the layout symbol string.
 
  When using this indicator for some time, I concluded that it wasn't
  obvious enough to be useful, especially because the information nth
  client of X clients doesn't give you much -- you rarely remember the
  client order anyways.
 
  Because of the fact that dwm is a dynamic window manager, my
  recommended solution is to switch to some appropriate layout before
  you focus the particular client you are looking for, and then
  switching to monocle again.
 
  So, the way I use monocle is usually only on a client basis or on very
  few clients -- there is the powerful tagging concept for grouping the
  clients you work on.
 
  With this in mind, this idea won't go mainstream again ;)
 
   Also, implementing the alt-tab to switch between the windows on that tab
   would seem to make sense.
 
  The philosophy behind dwm and all other less suckish projects I'm
  involved in follows the idea that there should be only 1 distinct
  operation to perform a certain function. If any feature of some
  software can only and always be performed in using 1 distinct
  operation (which never changes), then it is easier to remember and to
  use. Hence one indicator of bad software design is if there are plenty
  ways performing the same operation (e.g. having an icon to click on, a
  shortcut, a menu entry, a context menu entry, another shortcut, etc).
  This indication applies to vim unfortunately -- there is :wq and ZZ
  and what not for instance -- it basically performs the same
  operations, polluting your command space unnecessarily and making you
  think a lot which is the fastest way to perform a certain operation in
  a certain situation, that sucks).
 
  The only exception regarding the 1 distinct operation paradigm is to
  allow only 1 distinct different way in performing it, if there is a
  different input device, like the mouse.
 
  Having two key bindings for the same thing also makes the usage less
  consistent, because Mod1-Tab (in default setup) has a totally
  different meaning. So IMHO Mod1-j/Mod1-k are the navigation shortcuts
  in all layouts (at least in default setup).
 
  And if you are unhappy with this, feel free to change it in config.h.
 
  Kind regards,
  --Anselm
 :q!

Sorry just thought that I was in vi ;). Just wanted to add that I didn't
know about Mod1-j and Mod1-k in monocle. Thanks for the explaination -
now it makes sense to me.

Regards
Matthias-Christian
Regards
Matthias-Christian



Re: [dwm] debugger poll

2008-06-11 Thread Matthias-Christian Ott
markus schnalke [EMAIL PROTECTED] wrote:

 Ross Mohn [EMAIL PROTECTED] wrote:
  
  1. What debugger do you use for C programming?
  
  2. What debugger do you use for Curses C programming?

 printf()

 :-)

+1

But in my personal programmes I make frequent use of assert() for pre-
and (sometimes) post-conditions which is quite useful in combination
with gdb.
For curses programming you could use log files or so.

Regards
Matthias-Christian



Re: [dwm] An overlapped tiled layout

2008-06-08 Thread Matthias-Christian Ott
Monsieur Pinocchio [EMAIL PROTECTED] wrote:

 Hi,
I thought I would experiment with a new layout concept. I call it the
 overlapped tiled layout :) or in short tileo. I required some changes to
 restack() to make it work... though I hope this only makes restack()
 cleaner.
The basic concept it to overlap the windows in the stack so that
 1) they can have a size larger than (th / n)
 2) the windows before and after it in the stack are overlapped and stacked
 (as per X11 stacking) below the focused window in the stack area.
 The main benefit is to be able to increase the size of the focused window in
 the stack without moving them on another tag. The height of the windows in
 the stack is a constant value of th*0.8. The windows in the stack are
 overlapped like a deck of cards. The focused window is raised.
 I generally like using it in conjunction with the regular tilev() layout
 with shortcuts to switch quickly to either layout. It really helps if you
 have a large number of windows in the stack area.

 Here is the patch... I think the patch simplifies the restack() function so
 that should be useful to upstream in itself. Any comments are most welcome:

Do you have any screenshots?

Regards
Matthias-Christian



Re: [dwm] .zshrc alias dmenu

2008-05-31 Thread Matthias-Christian Ott
Jonny Gerold [EMAIL PROTECTED] wrote:

 Hello,
 I have aliases in my .zshrc file and was wondering how I could use these 
 with dmenu. Like: alias rest='sudo s2ram -f -a3' I would like to be able 
 to type rest into dmenu, and it to go to sleep...

This is not possible. Try this:

$ mkdir ~/exe
$ echo 'sudo s2rm-f -a3'  ~/exe/rest
$ chmod 0755 ~/exe/rest
$ export PATH=~/exe:$PATH

 Thanks, Jonny

Regards
Matthias-Christian



[dwm] Maximised Window + Empty Tag

2008-05-29 Thread Matthias-Christian Ott
Hi,
I don't know if I missed something, but if I toggle a window maximised
(which was previously monocle) and select an empty tag, the window still
appears. If it's not maximised everything works fine.

Any ideas?

Regards
Matthias-Christian



Re: [dwm] beta dwm-5.0

2008-05-29 Thread Matthias-Christian Ott
Arun G Nair [EMAIL PROTECTED] wrote:

 Has anyopne thought about splitting the title bar, atleast in monocle
 layout, so that it shows the title of each window open under a tag ?
 Something like the titlebar when multiple windows (tabbing) are opened
 in a frame in ion. Just a thought.

+1

I like it! You should consider this for floating layout too (at least
when a window is hidden).

 -Arun

Regards
Matthias-Christian



Re: [dwm] more consistent codestyle patch

2008-05-14 Thread Matthias-Christian Ott
Premysl Hruby [EMAIL PROTECTED] wrote:

 On (14/05/08 16:24), Kai Grossjohann wrote:
  To: dynamic window manager dwm@suckless.org
  From: Kai Grossjohann [EMAIL PROTECTED]
  Subject: Re: [dwm] more consistent codestyle patch
  User-Agent: Thunderbird 2.0.0.14 (X11/20080505)
  Reply-To: dynamic window manager dwm@suckless.org
  List-Id: dynamic window manager dwm.suckless.org
  
  Marc Andre Tanner wrote:
  [...] That is, use tabs for indention and spaces for further alignment:
  ---XGrabButton(dpy, AnyButton, AnyModifier, c-win, False,
  ---BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
 
  This way the user can set the tabwidth to whatever he likes and the code
  will still look decent.
 
  *drool*
 
  Is there a tool that does this?
 
  Kai
 
 

 indent(1) and there are other programs that this do.

I can confirm (I tried it) that indent doesn't supports some options
which would be necessary to imitate dwm style and therefore enable
automatic style testing.
So indent might be a useful tool if you use GNU style or KNF, but
otherwise it's simply useless.

Regards
Matthias-Christian



Re: [dwm] more consistent codestyle patch

2008-05-13 Thread Matthias-Christian Ott
Szabolcs Nagy [EMAIL PROTECTED] wrote:

 one more little patch
 please review

Looks good.

Regards
Matthias-Christian



Re: [dwm] dijkstra quote

2008-05-12 Thread Matthias-Christian Ott
Daniel Bainton [EMAIL PROTECTED] wrote:

 2008/5/12 Anselm R. Garbe [EMAIL PROTECTED]:
   I agree, but still the SLOC is a related indicator if the
   functionality has been implemented in a decent way at its level.
   If a file editor (vim) consists of 200.000 SLOC, something is
   wrong obviously.

 So, any volunteers to implement a suckless vim clone? :P

Well, there's the traditional vi [1], VIrus [2] or BusyBox vi [3]. But
none of them really sucks less. But wait for st before you rush to
implement a suckless clone.
By the way I prefer reinventing and improving instead of cloning.

 --
 Daniel

Gruß
Matthias-Christian

[1] http://ex-vi.sourceforge.net/
[2] http://www.rocklinux.net/people/ripclaw/projects/software/virus/
[3] http://busybox.net/



Re: [dwm] dijkstra quote

2008-05-07 Thread Matthias-Christian Ott
Szabolcs Nagy [EMAIL PROTECTED] wrote:

 a dijkstra quote [1] i've just stumbled upon and would like to share:

 The practice is pervaded by the reassuring illusion that programs are
 just devices like any others, the only difference admitted being that
 their manufacture might require a new type of craftsmen, viz.
 programmers. From there it is only a small step to measuring
 programmer productivity in terms of number of lines of code
 produced per month. This is a very costly measuring unit because it
 encourages the writing of insipid code, but today I am less interested
 in how foolish a unit it is from even a pure business point of view.
 My point today is that, if we wish to count lines of code, we should
 not regard them as lines produced but as lines spent: the current
 conventional wisdom is so foolish as to book that count on the wrong
 side of the ledger.


 [1]: http://www.cs.utexas.edu/~EWD/transcriptions/EWD10xx/EWD1036.html

+1

Great quote. I suggest to put it on Wikiquote.

Anyway I think this thought pattern/paradigm which arose from mass
production from the industrialisation on will persist or will be
become even worse (in whatever direction). That's a result from the
being/existence in the current mode of production - even if great
thinkers like Dijkstra complain about it.
So it's our duty stand against it ;). Therefore for example the suckless
project exists - very heroic, isn't it?

Regards
Matthias-Christian



Re: [dwm] snapping bugs with multiple screens

2008-05-05 Thread Matthias-Christian Ott
hiro [EMAIL PROTECTED] wrote:

 Polls are stupid.

There is this stupid idea called democracy (just in case you heard of
it) and I tried to establish just a tiny fraction of it here in the dwm
development process. Shame on me!

 All these recently added features seemed to me as if they are rather a
 matter of popularity, not sanity.

So go on. What's so insane? Go to LKML if you want to experience
dictatorship.

For me it the dwm development process seems to be kind of fair, Anselm
mainly tries improve dwm based on the needs (and patches) of the people
here on the mailing list unless they don't interfere with the
development philosophy.
So it's with the possibilities of the project (of course not everyone can
have access to the main repository, but we use mercurial and therefore
it's no problem you can maintain your own branch).
But due to the development philosophy of dwm you can't make everyone
happy and integrate every feature.

 Dwm got off course and needs some clear objectives again!

Well, it's your turn - list your critique here and I think it won't be
ignored.

Regards
Matthias-Christian



Re: [dwm] snapping bugs with multiple screens

2008-05-05 Thread Matthias-Christian Ott
hiro [EMAIL PROTECTED] wrote:

   There is this stupid idea called democracy (just in case you heard of
   it) and I tried to establish just a tiny fraction of it here in the dwm
   development process. Shame on me!

 At the beginning dwm was Anselm's baby, and he said it shall only fit
 his needs. He made this very clear and I fully respected this. Dwm
 never really fit my own needs, but it was still an interesting
 approach. And, like you said, Matthias, there is always the
 possibility of an own branch.

Well, dwm doesn't really fit my needs too (because I have a monitor
that's obviously too small), but it fits better than everything else I
tried.

   For me it the dwm development process seems to be kind of fair, Anselm
   mainly tries improve dwm based on the needs (and patches) of the people
   here on the mailing list unless they don't interfere with the
   development philosophy.

   But due to the development philosophy of dwm you can't make everyone
   happy and integrate every feature.

 Yes, what is the development philosophy? If i remember correctly it
 was all about being small, simple and elitist.

I mean with development philosophy mainly Anselm development philosophy,
because as you mentioned Anselm is the primary maintainer.

 But there are always compromises. So, there has to be a decision about
 what features to support.

Yes, of course. And this has to be discussed (with a certain framework
of course - you can't come along and expect someone to integrate cairo
or so). And this is why we have to make clear what exactly sucks less.
I mean the term itself suggest that we're not developing software on a
solid basis and have to make the best out of it.

 Recently there were all these changes with monocle and xinerama; And
 of course things get more difficult this way, so i would have
 respected i.e. not including such features at all.

Well, this depends on your viewpoint, more precisely what you consider
superfluous and what not. For some people xinerama and monocle may have
been a great improvement for a relatively small amount of source code.

 But at some point the decision was made about Xinerama support, and
 since then development seemed going forwards and backwards, aimlessly
 and probably startled from all these bad X dependencies.

Well, X11 is a monster and really sucks. All we do here is to tame it so
it doesn't eat us. We have to make the best out of it.
Certainly everyone agrees that X11 should be replaced, but this takes
time and needs people. And because we have none of these resources, we
have to stick to it.
I mean do you think GNU/Linux is the holy grail of operating systems?

The aim of dwm is to be simple, small and clear, but sometimes you have
to make trade-offs. And I think in this case multiple monitor support
was a relatively good trade-off.

 Dwm shouldn't focus so much on *how much* X features suck, but rather
 on doing one thing (whatever this is), and then of course, doing it
 good.

Exactly this is the problem: Everyone may have a different opinion of
the one thing and the intersection is of this opinions (supervised by
the maintainer) is the software.

I think that software and software development has to be planed by smart
people and realised by good programmers. But sadly this is not the case
in reality, so we have to use dwm and talk about X extensions.

My approach for this problem would be:
  1. Write the patch
  2. Count the lines of source code
  3. Compare the result to benefits of the patch and design principles
  4. Integrate it or drop it

Obviously you can't make everything a pipe line filter and can't
abstract everything very simply. And I think this (maybe due to the
design of X11) one of this cases where there has to be a monolithic
implementation. Due to this there has to some kind of comparison and
trade-off.
And in the end Anselm decides what goes in to the main repository.

Regards
Matthias-Christian



Re: [dwm] snapping bugs with multiple screens

2008-05-05 Thread Matthias-Christian Ott
Szabolcs Nagy [EMAIL PROTECTED] wrote:

 On 5/5/08, Matthias-Christian Ott [EMAIL PROTECTED] wrote:
  Let's do a poll!

 you meant technical discussion

 this is not fashion or politics

You don't do polls in fashion - normally it's unconsciously communicated
dictatorship.
Well and in politics (at leat in Germany) you don't do polls very often
(usually every four years).
[Just by the way.]

But I really meant a poll. Something like:

--

+1 

Great feature, I really need it, because of ... these 15 lines of source
code are acceptable for me.

Regards
XXX

--

It works usually that way on the mailing list, doesn't it?

Regards
Matthias-Christian



Re: [dwm] snapping bugs with multiple screens

2008-05-05 Thread Matthias-Christian Ott
hiro [EMAIL PROTECTED] wrote:

  Yes, of course. And this has to be discussed (with a certain framework
   of course - you can't come along and expect someone to integrate cairo
   or so). And this is why we have to make clear what exactly sucks less.
   I mean the term itself suggest that we're not developing software on a
   solid basis and have to make the best out of it.

 Yeah, well, we have this framework. We even used to have gods
 punishing people who suck too much.

So let the gods speak and rule.

Recently there were all these changes with monocle and xinerama; And
of course things get more difficult this way, so i would have
respected i.e. not including such features at all.
 
 
  Well, this depends on your viewpoint, more precisely what you consider
   superfluous and what not. For some people xinerama and monocle may have
   been a great improvement for a relatively small amount of source code.

 Yes, exactly, this is ultimately dependant on my viewpoint. And it has
 nothing to do with whatever it would be an improvement or not.
 At this point I have *not* said anything against the feature yet.

  Well, X11 is a monster and really sucks. All we do here is to tame it so
   it doesn't eat us. We have to make the best out of it.
   Certainly everyone agrees that X11 should be replaced, but this takes
   time and needs people. And because we have none of these resources, we
   have to stick to it.
   I mean do you think GNU/Linux is the holy grail of operating systems?

 I don't really care about X11 and my only real use of GNU is viewing
 multiple rickrolling videos at the same time, of course in tiled
 windows, non-overlapping.

But I care. I just use X11 because of firefox which seems to be required
due to society that forces us sometimes to use AJAX websites and similar
stuff ;).

   The aim of dwm is to be simple, small and clear, but sometimes you have
   to make trade-offs. And I think in this case multiple monitor support
   was a relatively good trade-off.

 And you are measuring the value of trade-offs in lines of codes. That
 does not in any way help objective decisions.

Well that's not the only criterion. Mainly I do it more intuitively.

 If there is a feature, which one decides to support, probably because
 of it's big value, one should not make any more trade-offs but fully
 support it.

Yes, this is why weed need XRandR support.

 This can of course be made in an other branch.

That's a problem of Free Software - forking and the resulting
fragmentation is god and evil in one person.

 The current state is, in my view a really bad compromise (Nichts
 Halbes und nichts Ganzes).

I agree.

  You don't do polls in fashion - normally it's unconsciously communicated
   dictatorship.

 Fashion is better described with democracy than dictatorship.

Questionable. But that's not the point of the discussion.

   Well and in politics (at leat in Germany) you don't do polls very often
   (usually every four years).
   [Just by the way.]

 The results of the polls are still bad, that's also no real point.

   It works usually that way on the mailing list, doesn't it?

 -9e99

You just have one vote ;).

 I don't think so. It's still a discussion you want.

I want commented votes (as previously illustrated by example).

Regards
Matthias-Christian



Re: [dwm] snapping bugs with multiple screens

2008-05-05 Thread Matthias-Christian Ott
Christoph Lohmann [EMAIL PROTECTED] wrote:

 Good evening.

Hi,

 Am Mon, 05 May 2008 20:35:38 +0200
 schrieb Matthias-Christian Ott [EMAIL PROTECTED]:

  I want commented votes (as previously illustrated by example).

 Things we need for establishing such a democratic system:
  
   1.) A voting register for classifying the voting population
   2.) A classification of topics for that population
   3.) A list of political incorrect words for that population
   4.) A common level of language experience the population
   understands

 After that we can start analyzing the population and use the gath-
 ered data to create a neutral poll at a date where we can assure
 that the democratic will of that population is expressed. I don't
 know if there are examples in the history of Free Software that
 forced voting has worked.

 The first task to start the system incubation is to vote for
 a committee that works on the constitution of dwm, which needs
 to be accepted by the registered population.

 Will you accept the position of the head of that committee?

Come on it's enough now. Do you remember how this pointless discussion
started:

| Polls are stupid.

I just wanted to involve the users a bit on this issue. And in fact this
statement is stupid and not polls.

| Let's do a poll!

So what's so offensive about this statement that it causes such a noise?
Why don't we just shut up, concentrate on the problem and perhaps
propose a solution, because I think the criticism on dwm's behaviour is
valid.

I just wanted to involve everyone to comment on the multihead behaviour
if he likes to. So we can have a system that working better than now,
because it seemed there are problems.

And that's that!

 Sincerely,

 Christoph Lohmann

Regards
Matthias-Christian



Re: [dwm] snapping bugs with multiple screens

2008-05-04 Thread Matthias-Christian Ott
John Li [EMAIL PROTECTED] wrote:

 I'm not sure if this qualifies as a bug, but I think it's
 unexpected/non-optimal behavior.

 Example setup:
 Laptop screen at 1024x768 with a separate LCD at 1280x1024 positioned on
 the left of the laptop. Here's a geom for that:

 /* geometries, s{x,y,w,h} and bh are already initualized [sic] here */
 /*  name bx  bybw  wx  wy  ww wh  mx  mymw  mhtx  ty  
   tw   th mox moy mow moh */
 DEFGEOM(desklap,  0,  0, 1280,  0, bh, sw, sh-bh,  0, bh, 1280, wh, 1280,  0, 
 1024, 768,  0, bh, mw, wh)

 I have the bar and master area confined to the first 1280 horizontal
 pixels: the separate LCD. The master area is 1280x(1024-bh) while the
 tile area is 1024x768. There are two unexpected behaviors related to
 snapping in the tile area:

 1) Snapping at the top doesn't snap to the top of the tile area, y=0; it
 snaps to y=bh.
 2) Snapping at the bottom doesn't snap to y=768; it snaps to y=1024.

 Since I've defined ty=0 and th=768, this seems incorrect. I don't know C
 very well, but it seems like dwm looks at only at the w? vars (and not
 the m? or t? vars) to determine when to snap. Changing those would
 result in wrong snapping behavior on either the master or tile areas,
 though.


 Another possible, vaguely related bug: there is no snapping on the
 master/tile split (also the physical divide between the monitors).
 Perhaps if mw is a constant, or doesn't include mfact, there could
 also be snapping here?


 I know dwm isn't particularly concerned with heavy use of floating
 windows, but I find them necessary at times (especially with higher
 resolution, multiple monitor setups) so it'd be nice to see snapping
 work in these situations.

I'm not that familiar with Xinerama, but the screen is always a
rectangular, so there is some dead space the window manager has to be
aware of [1]. Seems to me like dwm isn't.

But anyhow is there a reason why dwm still uses Xinerama instead of
XRandR. [1] states that it's deprecated in favor of XRandR.

 dwm is great software. Thanks!
 -john

Regards
Matthias-Christian

[1] http://en.wikipedia.org/w/index.php?title=Xineramaoldid=207577012



Re: [dwm] Compiling dwm

2008-04-29 Thread Matthias-Christian Ott
David J. Neu [EMAIL PROTECTED] wrote:

 All,

 I'm sure this has been addressed elsewhere, but I'm not finding the
 answer.

 I'm a long time dwm user on FreeBSD, but now have two Linux distros in
 my world.  It looks like the required header and/or lib files as
 referenced in config.mk aren't installed.

 Could someone tell me the packages to install on Ubuntu and on an OLPC
 XO laptop?

I suppose you have install the header files separately, because (as far
as I remember) dpkg and rpm based distributions make separate packages
out of them.

 Many thanks!

 Cheers,
 David

Regards
Matthias-Christian
VERSION = 5.0
PREFIX = /usr
MANPREFIX = ${PREFIX}/man
INCS = -I.
LIBS = -lX11
CFLAGS += $(INCS) -DVERSION=\$(VERSION)\ -fwhole-program
LDFLAGS += $(LIBS)


Re: [dwm] [OT] minimalistic bbs/forum

2008-04-11 Thread Matthias-Christian Ott
pancake [EMAIL PROTECTED] wrote:

  you don't like mailing lists? I can't see the use of a forum...
 
  --
  hiro

 I love mailings and i dislike forums, but is what my users reclaim...
 and i dont want to install a fucking buggy/bloated phpbb or drupal.

 the nice thing of php is that is very common to find servers with
 php support and apps are easy/fast to write.

 and...I don't want ruby burning my cpu :)

What about writing a telnet bbs, I suppose you can create such system
with 1000 lines of C code.
Maybe you can add support for html rendering as well, if you need
hyperlinks.

Or you could write something like diri in 500 LOC.

Regards
Matthias-Christian



Re: [dwm] togglemax substiute in 4.9?

2008-04-08 Thread Matthias-Christian Ott
yy [EMAIL PROTECTED] wrote:

 2008/4/8, Anselm R. Garbe [EMAIL PROTECTED]:
  On Tue, Apr 08, 2008 at 01:35:40PM +0200, yy wrote:
   2008/4/8, Anselm R. Garbe [EMAIL PROTECTED]:
Any complains?
   
  
   If we are coming back to reverse geometries per client, what's the
   point of resizing clients in focus changes? I think this will add
   unnecesary complexity. But again, I don't think my opinion is
   important.
 
  What if monocle is used to work on floating clients as well?
 
  I pretty much prefer the solution of only preserving the
  previous window geometry of a client window and not treating
  floating and managed geometries differently. If monocle works on
  all clients, this would lead to unrevertable maximised floating
  clients, which I dislike.
 
  On the other hand, preserving the geometry for each layout seems
  to be too memory-consuming, especially because the layout
  algorithms are heavily dynamic.
 

 I think I didn't explain myself very well. Let's try again...
 To restore all the clients to their previous position and size when
 you change to the floating layout you will need a per client reverse
 geometry where you store that data, I would call it floating
 geometry (e.g.: fx, fy, fw, fh), setted to the initial value by
 manage() like you suggested or by a mouse action. Then, when you
 change to floating layout, all the clients are resized to that value;
 when you change to tiled layout, floating clients are resized to that
 value and tiled clients are tiled; and when you select the monocle
 layout all the clients (or just the tiled ones, depending on the
 lt-isfloating value) are resized to mox, moy, mow, moh.

I vote for the floating geometry idea and prefer the interpretation that
monocle only maximises one client at the same time, so you have only 4
variables containing the previous position and size, because just one
client can be maximised at the same time. If you switch to another
client which is going to be maximised, the geometry of the previously
maximised client is restored and the values of the current client are
stored and can be restored, so it adds no runtime overhead and still
makes per layout storage possible.

Regards
Matthias-Christian



Re: [dwm] dmenu, slock patches; slock DPMS crash

2008-04-08 Thread Matthias-Christian Ott
Anselm R. Garbe [EMAIL PROTECTED] wrote:

 On Tue, Apr 08, 2008 at 08:29:02AM +0200, Jukka Salmi wrote:
  Peter Hartlich -- dwm (2008-04-08 00:22:13 +0200):
   Whoops, sorry then. I had checked SuS, heirloom toolchest, the autoconf
   portability manual and DJB's portability notes and none of them mentioned
   a missing -u option.
  
  http://www.suckless.org/pipermail/dwm/2007-February/002128.html

 I doubt that is a valid assumption still, so I'm fine with the
 sort -u.

It's POSIX conform [1], so I don't see the whole point of the
discussion.

Regards
Matthias-Christian

[1] http://www.opengroup.org/onlinepubs/009695399/utilities/sort.html



Re: [dwm] togglemax substiute in 4.9?

2008-04-08 Thread Matthias-Christian Ott
yy [EMAIL PROTECTED] wrote:

 Well, this is my proposal in patch form. I'm not sure about the
 convenience of setting fx and fy in tileresize, but you get the idea.

I posted a similar patch on 31st March, so it is wasted effort.

Regards
Matthias-Christian



Re: [dwm] dmenu, slock patches; slock DPMS crash

2008-04-08 Thread Matthias-Christian Ott
Sander van Dijk [EMAIL PROTECTED] wrote:

 On Tue, Apr 8, 2008 at 6:40 PM, Matthias-Christian Ott [EMAIL PROTECTED] 
 wrote:
   It's POSIX conform [1], so I don't see the whole point of the
   discussion.

 POSIX was created to make it easier to write portable apps. When one,
 knowingly, writes a non-portable app, and then says hey, but it's
 POSIX compliant, one is missing the point. POSIX is a means to an
 end, not an end in itself. Basically, the point of the discussion is
 the same as the point of POSIX itself: portability.

But as far as I know dwm/dmenu was written to run on POSIX compliant
operating systems. Even X11 was mainly written for POSIX compatible
operating systems. So if you port dwm/dmenu to Plan 9 or something
similar, it makes really sense to change the programme, but under the
current circumstances it is just meaningless and not constructive to
make such a quarrel about it. Just keep it simple and assume that the
system is POSIX compliant.
Additionally the Plan 9 tools require (as far as I remember) an underlying
POSIX layer.

Maybe one could a rc script as a Plan 9 like alternative, if a lot of
users request Plan 9 tools support.

 Greetings, Sander.

Regards
Matthias-Christian



Re: [dwm] [patches] Updated pertag, float-border-color, raiselower, tagall, maximize_vert_horz, gridmode, save_floats and moversize

2008-04-07 Thread Matthias-Christian Ott
Jan Christoph Ebersbach [EMAIL PROTECTED] wrote:

 Hi folks,

 I've updated the following patches to the early 5.0 version:
 [...]
 save_floats

Did you see the improved version of save_floats I posted some days ago
on the mailing list?

Regards
Matthias-Christian



Re: [dwm] Monocle question

2008-04-05 Thread Matthias-Christian Ott
Anselm R. Garbe [EMAIL PROTECTED] wrote:

 On Fri, Apr 04, 2008 at 11:40:32PM +0200, Matthias-Christian Ott wrote:
  Szabolcs Nagy [EMAIL PROTECTED] wrote:
  
   On 4/4/08, Matthias-Christian Ott [EMAIL PROTECTED] wrote:
In other words you would propose the attached patch.
  
   nice, i like it
   (except an unnecessary space)
  
  I noticed that two after sending the patch ;). Copy  Paste in VIM
  sucks sometimes.

 Thanks, I applied this patch to hg tip, I considered a similiar
 solution, but I delay this thought for now. It was about having
 a nextclient() function which works on lt-isfloating and which
 replaces nexttiled()...

There's something we overlooked (I noticed it already yesterday, but
thought someone will notice it). I attached a fixing patch.
Maybe you should add a hook to compile dwm before committing.

Regards
Matthias-Christian
diff -r f7a24c410801 dwm.c
--- a/dwm.c Sat Apr 05 19:53:25 2008 +0200
+++ b/dwm.c Sat Apr 05 19:54:11 2008 +0200
@@ -1076,7 +1076,7 @@
Client *c;
 
for(c = clients; c; c = c-next)
-   if((lt-isfloating || !c-floating)   isvisible(c))
+   if((lt-isfloating || !c-isfloating)   isvisible(c))
resize(c, mox, moy, mow - 2 * c-bw, moh - 2 * c-bw, 
RESIZEHINTS);
 }
 


Re: [dwm] Monocle question

2008-04-04 Thread Matthias-Christian Ott
 On Fri, Apr 04, 2008 at 01:05:51AM +0200, Dashing wrote:
  Hi
  
  I use monocle mode a lot, but I don't like how dialog boxes get 
  maximized.
  
  I noticed two versions for going through the clients exist:
  * for(c = clients; c; c = c-next)
  * for(c = nexttiled(clients); c; c = nexttiled(c-next))
  
  Why does monocle use the first and not the second?

 Well what about having monocle work like this:

 just only raise and display the focused client in the monocle
 area, and restore the previous dimensions everytime a new client
 is focused? But still working on all clients of course.

+1

Seems like the naturally expected behaviour. You should do this with
floating windows too (I have sent a patch to the mailing list some days
ago).

Regards
Matthias-Christian



Re: [dwm] Monocle question

2008-04-04 Thread Matthias-Christian Ott
Anselm R. Garbe [EMAIL PROTECTED] wrote:

 On Fri, Apr 04, 2008 at 01:05:51AM +0200, Dashing wrote:
  Hi
  
  I use monocle mode a lot, but I don't like how dialog boxes get 
  maximized.
  
  I noticed two versions for going through the clients exist:
  * for(c = clients; c; c = c-next)
  * for(c = nexttiled(clients); c; c = nexttiled(c-next))
  
  Why does monocle use the first and not the second?

 Well what about having monocle work like this:

 just only raise and display the focused client in the monocle
 area, and restore the previous dimensions everytime a new client
 is focused? But still working on all clients of course.

Sorry for the noise, but shouldn't monocle ignore
_NET_WM_WINDOW_TYPE_DIALOG windows?
It's very annoying, that dwm maximises firefox's save dialogs, because
it's not the expected behaviour.

Regards
Matthias-Christian



Re: [dwm] Monocle question

2008-04-04 Thread Matthias-Christian Ott
yy [EMAIL PROTECTED] wrote:

 After looking at the 4.9 release I have a suggestion which could
 satisfy most of the people, in dwm.c:1071 you could change the
 isvisible(c) condition to (lt-isfloating || !c-isfloating) 
 isvisible(c), this way if you want to just maximize tiled windows you
 just have to set the float value of monocle in config.h to False, else
 you will have the current behavior.

 What do you think?

In other words you would propose the attached patch.

Regards
Matthias-Christian
diff -r 176858b8a80f dwm.c
--- a/dwm.c Fri Apr 04 20:21:49 2008 +0200
+++ b/dwm.c Fri Apr 04 20:26:08 2008 +0200
@@ -1076,7 +1076,7 @@
Client *c;
 
for(c = clients; c; c = c-next)
-   if(isvisible(c))
+if((lt-isfloating || !c-floating)   isvisible(c))
resize(c, mox, moy, mow - 2 * c-bw, moh - 2 * c-bw, 
RESIZEHINTS);
 }
 


Re: [dwm] Monocle question

2008-04-04 Thread Matthias-Christian Ott
Szabolcs Nagy [EMAIL PROTECTED] wrote:

 On 4/4/08, Matthias-Christian Ott [EMAIL PROTECTED] wrote:
  In other words you would propose the attached patch.

 nice, i like it
 (except an unnecessary space)

I noticed that two after sending the patch ;). Copy  Paste in VIM
sucks sometimes.

Regards
Matthias-Christian



Re: [dwm] ii best practices

2008-04-02 Thread Matthias-Christian Ott
pancake [EMAIL PROTECTED] wrote:

 i think scrollz already have this.

But scrollz is an ununix irc client.

Regards
Matthias-Christian



Re: [dwm] ntile layout for dwm hg tip

2008-04-02 Thread Matthias-Christian Ott
Nibble [EMAIL PROTECTED] wrote:

 Hi there,

  And I can say that for xinerama we will probably need to adapt it to
  support also vertical tiling. Using horitzontal it's mostly a waste of
  space on big screens.

 Yes, I think you are right. Furthermore, horizontal tiling (Anselm's 
 notation) 
 could be useful for some other geoms (eg bottom).

  I would like to see something like vntile and hntile or just a toggle for
  it. What do you think about this?

 It is a good idea. In the patch there are now four layouts called:
   -|=, ntilevv
   -||, ntilevh
   ||=, ntilehv
   |||, ntilehh
 to fit all the cases: 2 small screens, 2 big screens, 1 small and/or 1 big 
 screen. People can safely remove from the patch those ones they don't 
 need.

You could simplify the code by introducing to two global variables that
indicate whether the master or tiled area is horizontal.
So switching to |= would simply set tileh = True and leave masterh
unchanged and switchting to -|= would set tileh = True and masterh = True.
So you could simple toggle the behaviour (e.g. MOD-v - masterh = False,
MOD-Shift-v - tileh = False) and don't need four layouts.

Anyway I think some kind of nmaster patch should go into dwm hg tip.

Regards
Matthias-Christian



  1   2   >