Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In xmonad she standard behaviour of windows is that they are tiled. One can change this, if one uses for example xprop | grep WM_CLASS and puts something like this:

myManageHook = composeAll
    [ className =? "MPlayer"        --> doFloat
    , className =? "Gimp"           --> doFloat]

Then the windows of those programs float and have a "natural size" (as they would appear e.g. in gnome).

Now my question is the following: Is it possible to do this "on the fly"?

I can click and drag it with the mod-button1 held down and then resize it manually. However, it should resize automatically to it's "natural size". What can I change in my xmonad.hs to achieve this?

Another possibility (which would be sufficient for me) would be to have some "starter script", lets call it xms: If I type xms foo the program foo is started floated and its windows have "natural size".

share|improve this question
1  
I'm not sure I understand your question: the matching in XMonad is done on the window class name, or window name or any other attribute in the X11 properties of the window... none of which depend on the application being started from the command-line or any other launcher. Can you please elaborate a bit on what you're trying to accomplish? What program would you like to start from the command-line and how would you like XMonad to handle it? –  Riccardo Murri Jun 19 '11 at 20:20
    
You could just send all apps that you want to have float to a floating workspace... Otherwise, unless the apps you are referring to are all run in a term, there doesn't seem to be any straightforward way to accomplish what you are after. –  jasonwryan Jun 20 '11 at 6:56
    
@jasonwryan: Thanks. What must I add to my xmonad.hs that I have a floating workspace? –  student Jun 21 '11 at 9:12

1 Answer 1

For a floating workspace:

import XMonad.Layout.PerWorkspace
 -- then in layoutHook:
onWorkspace "float" simplestFloat

From droog's xmonad.hs

There is also more information on the wiki: http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Layout-SimplestFloat.html

share|improve this answer
    
I don't see how to apply this to my xmonad.hs, perhaps you may have a look at my xmonad.hs and point out how to add this: pastebin.com/GSR9F2pq –  student Jun 21 '11 at 10:56
    
I don't know any Haskell, but you need to add something like this: pastebin.com/Akqk6gLb –  jasonwryan Jun 22 '11 at 8:05
    
@jasonwryan: Then I get the following error message: pastebin.com/xFDFA0NT –  student Jun 22 '11 at 8:44
    
Like I said: I don't know any Haskell - that was just meant as an indication of how you could implement it... –  jasonwryan Jun 22 '11 at 9:06
    
@jasonwryan: Thanks again. Your indication sounds good. Perhaps there is someone out there with good haskell knowledge who sees what's wrong... –  student Jun 22 '11 at 9:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.