
Some of you may be thinking I'm just rewriting Ion3 in Haskell... my screen shots could even lead you to think I'm *not* using xmonad at all...;) This is just because I've been using it for quite some time and I came to love some of its features. And so I wrote the prompt and I contributed in improving David's tabbed layout (well, I also contributed in breaking it, when I added an amazingly inefficient way of managing fonts). The last thing from Ion3 I was really missing was the floating layout. *That* floating layout (and *not* our floating layer). I wanted it because I need it in some places of my desktop. Since no one was going to write it in the near future I decided to do it myself. I thought it could also be an opportunity to refactor a bit Tabbed and clean up its code, which was quite ugly (I wrote it and so I know!): it was the first or the second layout ported to the new class system. There was a problem: the ugly part in tabbed is the decoration windows management stuff, which requires a state to keep tract of created windows, the font structure (loading fonts is very resource consuming, I was told), and so on. If I were to write the floating layout I should replicate all that code, debug both versions, maintain both versions, etc. I thought it wouldn't be manageable. Then I had the idea of applying the same design pattern we have been using somewhere: generalize a computation and fine tune it with a type: our event handler uses a type of the LayoutClass to ask him to perform some specific tasks needed for a specific layout (handleMessage); Operations.windows uses a type of the LayoutClass to perform some specific layout related tasks (doLayout); the ModifiedLayout instance is fine tuned (or controlled, or driven, I just don't know the word that should be the more appropriate here) by a type of the LayoutModifier class - even xmobar has been conceived this way (a plugin is just a type member of the Runnable class, if I remember the class's name right)... This is how I conceived Decoration and the DecorationStyle class. Now, it seems to me some are complaining because Decoration is broken. And the prove Decoration is broken is given by the fact that the tabbed layout they are using is not what they expect. And since that tabbed layout is not what they expect, they think that tabbed layout breaks other part of the system (smartBorders, for instance). I would like to point out that the working of Decoration and the tabbed layout *may* be unrelated. Decoration is similar to the old tabbed layout, but just because I used the old tabbed layout to design the abstract computation to be performed for decorating windows. But Decoration *doesn't" enforce *any* idea of a layout. It is just an abstract way of creating decoration windows, and that abstract way is made concrete by a type of the DecorationStyle class. Only after that, there is the problem of the specific behavior of a tabbed layout. I would like you to admit, as I do, that there *may* be different ideas of what a tabbed layout is. Many of you think that a tabbed layout is a focused window and a set of tabs representing non visible windows belonging to that workspace. While I think this is a legitimate vision of a tabbed layout, I would like to point out that it is totally inconsistent, since it would require the focused window *not* to have a tab. Instead, tabs represent both unfocused windows *and* the focused one, and you need to use colors to avoid confusion. Since I come from the humanities, I have a totally different perspective: a tabbed layout is like an index-book (if you get what I mean - I'm using an Itaian/English dictionary here...;) or an address book, if this is giving you a better idea. Now, I understand that your idea of a tabbed layout is more convenient, since it makes it easier to code other part of the system, such a smartBorders (I know that if I put it this way you may have the feeling that I'm thinking your idea of a tabbed layout is an ugly hack to quickly code smartBorders, and the rest. And you may even be right...;-). The problem is that you are enforcing it in the wrong place. By enforcing it in Decoration you are making it impossible for me, or for others, to have the tabbed layout we want. That is to say, you decided your tabbed layout is the *right* one and that no other kind of tabbed layout *should* ever exist. That could be fine, but by doing so your are making it impossible the existence of a floating layout too. Just the idea of enforcing a given idea in Decoration is going to break decoration. I really didn't need to read David's code to know he was breaking my floating layout. His comment was enough. And indeed, I didn't read it. I just grabbed a clean source, built it, fired up Xnest and took the screenshot: http://gorgias.mine.nu/xmonadShots/droundyPatch.png (well, I was hoping for some of David's miracles, but I knew that was highly improbable in that situation, and given that comment). Now, in order to have a tabbed layout that is working smoothly with other parts of the system - your idea of a tabbed layout - we need to use a layout modifier. And I understand you think this is wrong. And since you think this is wrong, you think I must fix my code. What I'm trying to say is that, the problem is not the code, but the idea behind it. We have two conflicting ideas that are mutually incompatible. I see 3 possible solutions: 1. I change my mind; 2. you change your mind; 3. everyone changes her mind and we find a 3rd idea the is better then mine and yours. 1. and 3. are feasible for me. But I need to be convinced. 2 is out of my reach. Obviously there may be other solutions too I'm not aware of. Andrea ps: at the present time the repository is enforcing your idea with my code. This is why the repository is currently broken and, as far as my knowledge goes, there's no way to fix it.

On Feb 6, 2008 5:50 PM, Andrea Rossato
Some of you may be thinking I'm just rewriting Ion3 in Haskell... my screen shots could even lead you to think I'm *not* using xmonad at all...;)
Sorry to be a little off-topic, but if we're bringing back Ion's features, let's please talk about the idea of having empty panes, ones that don't have clients. For some reason, xmonad seems obsessed with the dwmish idea of resizing everything every time a new application is stopped or started. I find this disconcerting, and it's troublesome for all the remote ncurses applications that have to resize.

On Wed, Feb 06, 2008 at 06:39:33PM +0800, brian wrote:
On Feb 6, 2008 5:50 PM, Andrea Rossato
wrote: Some of you may be thinking I'm just rewriting Ion3 in Haskell... my screen shots could even lead you to think I'm *not* using xmonad at all...;)
Sorry to be a little off-topic, but if we're bringing back Ion's features, let's please talk about the idea ...
There's a problem with that "we"...;) It is just me... Since I used to like some features I coded those features for xmonad, which does not aim to be a Ion3 replacement (or at least I'm not aware of that). And I implemented those features according to the idea I had of the meaning and the working of those features. This is, I think, the problem we are facing at the present time. Andrea ps: regarding the specific feature you were talking about: I didn't know it existed (or perhaps I just didn't get what you need). ;-)

On Wed, Feb 06, 2008 at 12:30:02PM +0100, Andrea Rossato wrote:
And I implemented those features according to the idea I had of the meaning and the working of those features. This is, I think, the problem we are facing at the present time.
A side note: I've never read the Ion3 source code, unless for the small subsystem related to the prompt history (I proposed a small patch that has been refused, to make the history size configurable). (C is a highly obscure programming language, here, and I wouldn't probably be able to write a working and compilable "Hello World" example) Andrea

brianchina60221:
On Feb 6, 2008 5:50 PM, Andrea Rossato
wrote: Some of you may be thinking I'm just rewriting Ion3 in Haskell... my screen shots could even lead you to think I'm *not* using xmonad at all...;)
Sorry to be a little off-topic, but if we're bringing back Ion's features, let's please talk about the idea of having empty panes, ones that don't have clients. For some reason, xmonad seems obsessed with the dwmish idea of resizing everything every time a new application is stopped or started. I find this disconcerting, and it's troublesome for all the remote ncurses applications that have to resize.
I think that would be a relatively easy extension to write, fwiw. -- Don

On 06/02/2008, Don Stewart
brianchina60221:
On Feb 6, 2008 5:50 PM, Andrea Rossato
wrote: Some of you may be thinking I'm just rewriting Ion3 in Haskell... my screen shots could even lead you to think I'm *not* using xmonad at all...;)
Sorry to be a little off-topic, but if we're bringing back Ion's features, let's please talk about the idea of having empty panes, ones that don't have clients. For some reason, xmonad seems obsessed with the dwmish idea of resizing everything every time a new application is stopped or started. I find this disconcerting, and it's troublesome for all the remote ncurses applications that have to resize.
I think that would be a relatively easy extension to write, fwiw.
How easy? i've been wanting something like this for ages now. i like the 'tiled' layout but hate the fact that when i close clients, or float them, that the rest of the tiled windows resize as a result. What i also note is the simplefloat layout modifier does this -- i.e., i float clients and nothing else is recomputed in the tiled layout -- but i do not know how to take that component and add it for the tiled layout -- is there a transform for it? Empty pane or something? i dont mind trying to write this extension, but i would need heavy pointers as to where to look. :) David.

On Fri, Feb 08, 2008 at 09:24:57AM +0000, David Chanters wrote:
How easy? i've been wanting something like this for ages now. i like the 'tiled' layout but hate the fact that when i close clients, or float them, that the rest of the tiled windows resize as a result.
I think this is a tricky issue, since you want the flexibility of a tiling layout (a layout that will recalculate each window's size every time the workspace must be refreshed), but, below a certain amount of windows, the windows' geometry should be fixed. If that is right (that is to say, if I get your problem correctly) you could just do that, starting from something like Tall (in the xmonad library, XMonad/Layout.hs): you check the number of windows in the stack (you can check it against a parameter of your layout type, so it can be configured by the layout user) and then you give to each window its rectangle accordingly, applying a fixed structure for the first, let's say 3, windows, and the tiling algorithm if the windows are more.
What i also note is the simplefloat layout modifier does this -- i.e., i float clients and nothing else is recomputed in the tiled layout -- but i do not know how to take that component and add it for the tiled layout -- is there a transform for it? Empty pane or something?
SimpleFloat is doing that because there's the WindowArranger layer right *above* the layout: the layout is going to give the window is rectangle the first time. The WindowArranger will take that rectangle and store it in its state component. After that, the WindowArranger will ignore any rectangle produced by the underlying layout (because it has the ArrangeAll bit - a Bool - set to True, otherwise it will ignore the underlying layout only *after* the user changed the window's geometry).
i dont mind trying to write this extension, but i would need heavy pointers as to where to look. :)
As I said, if my understanding of your problem is correct - and what I proposed a viable solution - I would start from something like Tall, or like Accordion (this one is in the contrib library). I hope this helps. Cheers, Andrea

On Fri, Feb 08, 2008 at 11:18:12AM +0100, Andrea Rossato wrote:
I think this is a tricky issue, since you want the flexibility of a tiling layout (a layout that will recalculate each window's size every time the workspace must be refreshed), but, below a certain amount of windows, the windows' geometry should be fixed.
Let me add that if you do not need the flexibility of a tiling layout you could just use the approach of SimpleFloat: you can use "windowArrangeAll", above a layout like SimpleFloat. That would be far simpler: put the first window there, the second there, etc.: that is to say, get the number of windows and decide where to place the focused one - the last one to be created. Andrea ps: as you may understand in ion3 I used to use only the floating and the tabbed layouts... I didn't appreciate it for is tiling capability, if you want. ;)

On 08/02/2008, Andrea Rossato
As I said, if my understanding of your problem is correct - and what I proposed a viable solution - I would start from something like Tall, or like Accordion (this one is in the contrib library).
Hi Andrea. yes, youve understood what i am asking, and although you've laid it out on a plate for me, its beyond my current skills - i tried and got nowhere, so i shall hopefully defer this to someone more able. :) thanks though, David

On Wed, Feb 06, 2008 at 10:50:03AM +0100, Andrea Rossato wrote:
That could be fine, but by doing so your are making it impossible the existence of a floating layout too. Just the idea of enforcing a given idea in Decoration is going to break decoration. I really didn't need to read David's code to know he was breaking my floating layout. His comment was enough.
And indeed, I didn't read it. I just grabbed a clean source, built it, fired up Xnest and took the screenshot:
http://gorgias.mine.nu/xmonadShots/droundyPatch.png
(well, I was hoping for some of David's miracles, but I knew that was highly improbable in that situation, and given that comment).
I'm still confused. What is it in my changes that you think could cause this? I never touched the stacking order (so far as I know), so I don't see how I could have had this effect. If I had some idea what you suppose I did wrong, that would really help. I'm afraid I haven't time, though, to run and learn your windowArranger code. -- David Roundy Department of Physics Oregon State University

On Wed, Feb 06, 2008 at 03:47:59PM -0500, David Roundy wrote:
I'm still confused. What is it in my changes that you think could cause this? I never touched the stacking order (so far as I know), so I don't see how I could have had this effect.
If I had some idea what you suppose I did wrong, that would really help. I'm afraid I haven't time, though, to run and learn your windowArranger code.
If I get it right, in insert_dwr you are dropping windows whose rectangle is the same of previous windows' rectangles. In my simple floating layout two xterm will have the same rectangle (better, the second one will have the same rectangle of the first one), and so the second one will be dropped. If I get it right (sorry if I keep repeating this, but your code is rather concise and I may be getting it wrongly), you are supposing two windows must not have the same rectangle. And if they do, the second one must be removed. This is not working with my simple floating layout (and, I believe, is a wrong assumption). Andrea

On Wed, Feb 06, 2008 at 10:51:01PM +0100, Andrea Rossato wrote:
On Wed, Feb 06, 2008 at 03:47:59PM -0500, David Roundy wrote:
I'm still confused. What is it in my changes that you think could cause this? I never touched the stacking order (so far as I know), so I don't see how I could have had this effect.
If I had some idea what you suppose I did wrong, that would really help. I'm afraid I haven't time, though, to run and learn your windowArranger code.
If I get it right, in insert_dwr you are dropping windows whose rectangle is the same of previous windows' rectangles.
In my simple floating layout two xterm will have the same rectangle (better, the second one will have the same rectangle of the first one), and so the second one will be dropped.
If I get it right (sorry if I keep repeating this, but your code is rather concise and I may be getting it wrongly), you are supposing two windows must not have the same rectangle. And if they do, the second one must be removed.
This is not working with my simple floating layout (and, I believe, is a wrong assumption).
That's correct, but I don't understand why it would break anything, since the second window with the same rectangle is hidden by the first (except in the case where the first uses the shape extension or you're using some sort of true transparency effect that I'm not familiar with). -- David Roundy Department of Physics Oregon State University

On Wed, Feb 06, 2008 at 04:58:52PM -0500, David Roundy wrote:
That's correct, but I don't understand why it would break anything, since the second window with the same rectangle is hidden by the first (except in the case where the first uses the shape extension or you're using some sort of true transparency effect that I'm not familiar with).
Now that I (think I) get it, I agree with you that your change should be safe, and I think that you could be right in indicating a relation with the WindowArranger code. I need to investigate a bit further. I need some time to think about it. I'm confused too. Andrea

On Wed, Feb 06, 2008 at 11:11:57PM +0100, Andrea Rossato wrote:
On Wed, Feb 06, 2008 at 04:58:52PM -0500, David Roundy wrote:
That's correct, but I don't understand why it would break anything, since the second window with the same rectangle is hidden by the first (except in the case where the first uses the shape extension or you're using some sort of true transparency effect that I'm not familiar with).
Now that I (think I) get it, I agree with you that your change should be safe, and I think that you could be right in indicating a relation with the WindowArranger code. I need to investigate a bit further. I need some time to think about it. I'm confused too.
Incidentally, I believe there's a bug in my change to Decoration that removes overlapping windows, in that it doesn't seem to remove *all* the overlapping windows, but instead leaves two overlapping windows. I haven't had time to look at it, but it's pretty annoying on my laptop, because the result is that whenever doLayout is called, I get a flashing effect, as one of my non-focussed windows is moved to the top. :( -- David Roundy Department of Physics Oregon State University

On Wed, Feb 06, 2008 at 04:58:52PM -0500, David Roundy wrote:
If I had some idea what you suppose I did wrong, that would really help. I'm afraid I haven't time, though, to run and learn your windowArranger code.
the separation between the WindowArranger and Decoration is just wrong, I think, and, if we are going to keep this code, the first should be removed. We should keep track of resized and moved windows in the Decoration state (which would make it easier to write the mouse interface for moving and resizing windows - the code is in DragPane and the core...;). If you solved the problem with that line of code, as I hope, things could be getting exiting... Andrea

On Wed, Feb 06, 2008 at 11:20:02PM +0100, Andrea Rossato wrote:
If you solved the problem with that line of code, as I hope, things could be getting exiting...
I think that your fix is actually working and the problem was the fact that my source code was not as clean as I thought - some of the mess I left and did not have time to clean: my local configuration was interfering with your fixes because of the use of some experimental modifiers. Sorry for wasting your time. This makes me even more embarrassed. As I said I didn't have the possibility to study the solution - and I didn't understand the problem was not even there (add that I didn't receive any feedback regarding the fact that was I was reporting was not reproducible). On the other hand I felt the urgency to help fix it. If my understanding is correct, what I wrote, the repository is broken, is simply factual untrue. Am I right? Does that mean the new decoration framework is properly working for everyone? Sorry if I ask, but I now have the feeling I was the only one worried for something did not even existed. Wasn't that clear from my messages? Andrea

On Wed, Feb 06, 2008 at 10:50:03AM +0100, Andrea Rossato wrote:
(well, I was hoping for some of David's miracles, but I knew that was highly improbable in that situation, and given that comment).
and so it was there and I just couldn't see it... what a shame (below a few words to explain, if you are curious). in order to apologize for the confusion this thread originated I've just pushed a few patches to add a very low priority, useless, but still nice (well, this is just my opinion) feature: a prompt that will let you dynamically apply a theme to your current workspace decorations (tabbed, floating, whatever). A Theme Selector, sort of. The choice will be gone if you quit your Xsession. Still it could be useful. Moreover, I'm going to make a call for theme contributions, and I hope this prompt will help collecting nice themes (I see so many nice screen shots...;). Andrea ps: I know it's hard to believe, but I misunderstood both the meaning of "stacked" and of "tabbed", in your comment, David. Moreover, Spencer (I think) suggested something like this - and I agreed that could solve the problem - , but I replied it was not possible, or just too complex, because it didn't occur to me that in order to find out if two windows are perfectly ... stacked, you just have to check if the share the same ... rectangle, whereas I thought you should... wait and look at the monitor! (Then add that I think this is the first time I'm watching an accumulating list like that - which is quite a cool thing I've never thought about!)

On Thu, Feb 07, 2008 at 07:47:19PM +0100, Andrea Rossato wrote:
ps: I know it's hard to believe, but I misunderstood both the meaning of "stacked" and of "tabbed", in your comment, David. Moreover, Spencer (I think) suggested something like this - and I agreed that could solve the problem - , but I replied it was not possible, or just too complex, because it didn't occur to me that in order to find out if two windows are perfectly ... stacked, you just have to check if the share the same ... rectangle, whereas I thought you should... wait and look at the monitor!
Ah, that makes sense. I'm glad this is cleared up! Misunderstandings over language is very easy to make... one of the advantages of being able to talk in Haskell... but even that's hard to understand when you encounter unfamiliar idioms or functions! (see below)
(Then add that I think this is the first time I'm watching an accumulating list like that - which is quite a cool thing I've never thought about!)
Thanks! -- David Roundy Department of Physics Oregon State University
participants (5)
-
Andrea Rossato
-
brian
-
David Chanters
-
David Roundy
-
Don Stewart