Re: [dwm] Re: [PATCH] dofloat removed - saves ~400loc

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Mon, 5 Feb 2007 11:29:24 +0100

On Sat, Feb 03, 2007 at 06:27:16PM +0100, Enno Gottox Boland wrote:
> Hmm... I'm too stupid to use sloccount... It saves 34 lines of code...
> >I played a little bit with the source code of dwm. Finally I removed
> >the whole dofloat/dotile bloat and replaced it by a version which only
> >uses c->isfloat. It saves about 400 lines without removing any
> >functionality.

s/400/35/

Well, I read your patch somedays ago and thought about it.
Actually it does not change the major semantics of dwm, to an
end-user it might feel the same. But to me it is conceptually
more hackish compared with the arrange() concept. You replace
void (*arrange)(void) with Bool dofloat, and you need to add
Client->deffloat, to reuse Client->isfloat supporting the same
semantics as before. But this change makes addon patches like
dogrid() more painful...

I'm not sure what others think about it. I already realized that
I rarely use the togglemode() concept, but sometimes it's very
handy, much more handy than toggling a single client (like in
wmii) floating. E.g. when starting Gimp without having
predefined rules.

So all in all, it is cleaner to me, to implement different
algorithms of window arrangement in different functions, than
modifying the behavior of the arrangement algorithm through
window-based flags...

Regards,

-- 
 Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361
Received on Mon Feb 05 2007 - 11:29:24 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:35:50 UTC