can one create layouts with fixed height or width for windows

New to XMonad, and loving it. Apologies if this has already come up and been answered, but I haven't been able to find anything through the usual suspects. Editing code in terminals would be the main reason I want this, but there are a couple of other apps that look better with their windows a fixed size. Is it possible, either through layouts or some other means to enforce that the maximum width a certain window can have? I don't mind if there is a little wasted space on the screen, I really don't like violating the 80th column, however. Pointers and/or suggestions would be welcome. -mdg -- Our problems are mostly behind us, now all we have to do is fight the solutions.

* Mark Goldman
New to XMonad, and loving it. Apologies if this has already come up and been answered, but I haven't been able to find anything through the usual suspects.
Editing code in terminals would be the main reason I want this, but there are a couple of other apps that look better with their windows a fixed size.
Is it possible, either through layouts or some other means to enforce that the maximum width a certain window can have? I don't mind if there is a little wasted space on the screen, I really don't like violating the 80th column, however.
Pointers and/or suggestions would be welcome.
I think it's not hard to write, but you should elaborate on how such layout should place windows. Currently I don't see convenient solution. And, by the way, it's better to enforce 80 columns by the means of your editor. E.g. in vim :set tw=80. -- Roman I. Cheplyaka (aka Feuerbach @ IRC)

I think it's not hard to write, but you should elaborate on how such layout should place windows. Currently I don't see convenient solution. I don't have any concrete ideas of how to place the windows at the moment. I was looking to see if others had done something similar first. Off-hand, taking the 2-column layout. If the window is the widest in the column set the column width to that window's maximum. If the window is not the widest, set the window to it's maximum width and just waste the horizontal space. Spare space would go to the second column.
Obviously, there is a ton of room for experimentation, which I am willing to do. I just haven't been able to find much in the documentation that would suggest how to do this. If anyone could give me an example, or a pointer to documentation that would help, I'd appreciate it.
And, by the way, it's better to enforce 80 columns by the means of your editor. E.g. in vim :set tw=80. As far as editing files, agreed. However, some programs I use would make this difficult. Also, I have some graphical widgets that really look ugly when stretched.
-mdg -- Our problems are mostly behind us, now all we have to do is fight the solutions.

On Thu, Feb 28, 2008 at 12:14:43PM -0500, Mark Goldman wrote:
Also, I have some graphical widgets that really look ugly when stretched.
LayoutHints can help with that. http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutHints.html Maybe you could get LayoutHints to solve your problem with text editors, too, setting an X property on the editor window or something.

LayoutHints can help with that. http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-LayoutHints.html
Maybe you could get LayoutHints to solve your problem with text editors, too, setting an X property on the editor window or something. I've googled around for a while now and cannot figure out how to set things like the minimum and maximum size hints for a window. Does such a utility exist?
-mdg -- Our problems are mostly behind us, now all we have to do is fight the solutions.

On Feb 28, 2008, at 13:43 , Mark Goldman wrote:
LayoutHints can help with that. http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout- LayoutHints.html
Maybe you could get LayoutHints to solve your problem with text editors, too, setting an X property on the editor window or something. I've googled around for a while now and cannot figure out how to set things like the minimum and maximum size hints for a window. Does such a utility exist?
Not in general, and I would expect applications to behave really badly if something altered its sizehints without its knowledge or consent. (Heck, how many applications misbehave when a window manager ignores their size hints and tells them so, as permitted by ICCCM?) MIT has a tool "nawm" which *might* be able to do this kind of thing; I have had difficulty tracking it down though. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

On Thu, Feb 28, 2008 at 1:47 PM, Brandon S. Allbery KF8NH
On Feb 28, 2008, at 13:43 , Mark Goldman wrote:
LayoutHints can help with that. http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout- LayoutHints.html
Maybe you could get LayoutHints to solve your problem with text editors, too, setting an X property on the editor window or something. I've googled around for a while now and cannot figure out how to set things like the minimum and maximum size hints for a window. Does such a utility exist?
Not in general, and I would expect applications to behave really badly if something altered its sizehints without its knowledge or consent. (Heck, how many applications misbehave when a window manager ignores their size hints and tells them so, as permitted by ICCCM?)
MIT has a tool "nawm" which *might* be able to do this kind of thing; I have had difficulty tracking it down though.
A related question, are these properties settable via xrdb and my .Xresources file? -mdg -- Our problems are mostly behind us, now all we have to do is fight the solutions.

On Feb 28, 2008, at 14:03 , Mark Goldman wrote:
A related question, are these properties settable via xrdb and my .Xresources file?
Usually there is a geometry resource to specify a fixed size; there are no standard X11 toolkit options for minimum / maximum size or resize cell size. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

On Thu, Feb 28, 2008 at 2:46 PM, Brandon S. Allbery KF8NH
On Feb 28, 2008, at 14:03 , Mark Goldman wrote:
A related question, are these properties settable via xrdb and my .Xresources file?
Usually there is a geometry resource to specify a fixed size; there are no standard X11 toolkit options for minimum / maximum size or resize cell size.
I guess that brings me back to where I started. Is there any way to tell a layout that a particular window should be rendered with particular dimensions when programs aren't necessarily going to supply appropriate hints for max-size etc? -mdg -- Our problems are mostly behind us, now all we have to do is fight the solutions.

bitshifter:
New to XMonad, and loving it. Apologies if this has already come up and been answered, but I haven't been able to find anything through the usual suspects.
Editing code in terminals would be the main reason I want this, but there are a couple of other apps that look better with their windows a fixed size.
Is it possible, either through layouts or some other means to enforce that the maximum width a certain window can have? I don't mind if there is a little wasted space on the screen, I really don't like violating the 80th column, however.
Pointers and/or suggestions would be welcome.
This is perhaps the most frequently asked-for extension, along with a popup/scratchpad terminal. Having a layout that would respect the 80 character limit seems like something people want. Anyone interested in working out how to do this?

Mark Goldman wrote:
New to XMonad, and loving it. Apologies if this has already come up and been answered, but I haven't been able to find anything through the usual suspects.
Editing code in terminals would be the main reason I want this, but there are a couple of other apps that look better with their windows a fixed size.
Is it possible, either through layouts or some other means to enforce that the maximum width a certain window can have? I don't mind if there is a little wasted space on the screen, I really don't like violating the 80th column, however.
Pointers and/or suggestions would be welcome.
-mdg
As a quick and dirty solution, there's a contrib module called XMonad.Hooks.ManageHelpers. It contains a ManageHook called doRectFloat. You could use it to specify a size and position, and the window would launch with that size, floating. If you didn't resize it, its size wouldn't change and the app should run smoothly. This isn't as good as a size-enforced tiled layout, but it's an immediate solution. Braden Shepherdson shepheb
participants (6)
-
Braden Shepherdson
-
Brandon S. Allbery KF8NH
-
Don Stewart
-
lithis
-
Mark Goldman
-
Roman Cheplyaka