You are not logged in.

#1 2009-09-14 04:05:25

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Does anyone have a sane floating workspace in Xmonad?

I'm playing around with Xmonad trying to get a sane floating workspace and so far it's not working out so well. Basically I want this workspace to behave like other stacking WM do. The layout that I thought might work is Simplest Float, but it's doing a few things that I don't like:

1) To raise a window I need to hold the mod key and mouse click. I'd like to simply click to raise.
2) If there are more than one instance of a program running, raising one instance raises them all.
3) Switching focus between windows with the keyboard doesn't work with new windows unless it's been raised with the mouse once.

Surely I must have missed something somewhere. What's everyone else doing for a floating workspace? And no, switching to awesome isn't an option right now.

--EDIT--

4) New windows open under all other windows. No bueno.

Offline

#2 2009-09-14 19:29:16

rizzix
Member
Registered: 2005-10-22
Posts: 55

Re: Does anyone have a sane floating workspace in Xmonad?

skottish wrote:

1) To raise a window I need to hold the mod key and mouse click. I'd like to simply click to raise.

I think this should do it.

 ((0, button3), (\w -> focus w >> mouseResizeWindow w))

Essentially replace the modMask with 0.

Last edited by rizzix (2009-09-14 19:38:44)

Offline

#3 2009-09-25 18:17:17

heleos
Member
From: Maine, USA
Registered: 2007-04-24
Posts: 678

Re: Does anyone have a sane floating workspace in Xmonad?

I am having very similar issues, and it's almost making me want to switch from xmonad. Sure xmonad is a tiling window manager, but I enjoy having at least a few of the workspaces floating. Does your window raise when you mod+left click or mod+middle click? Also, I'm sure it's a problem with you also, but I don't really like the way xmonad handles the floating layer. When I go to rename a file in thunar, the rename prompt comes up under the thunar window, and I have to physically move the window out of the way and bring it up to the top. It happens will all popups, and gets fairly annoying. Hopefully you will get these issues solved for all of us tongue

Offline

#4 2009-09-25 18:21:24

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Does anyone have a sane floating workspace in Xmonad?

This eventually drove me away from XMonad...the lack of a decent floating layout.

This is just the way SimplestFloat works, and there is currently no better floating layout to my knowledge...

Last edited by moljac024 (2009-09-25 18:24:20)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#5 2009-09-25 20:02:24

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Does anyone have a sane floating workspace in Xmonad?

personally, i only ever need to float a handful of windows and M-j/k or M-click to focus them is fine with me.  i do this with trivial managehooks and just let them float over whatever layout i'm in at the time.

therefore, i'm not sure what SimplestFloat does and doesn't do exactly, but there has been much talk on the xmonad ML about how 'bad' the floating layouts are and solutions are being hashed out.  just an FYI to check back (or try -darcs) to see how it goes.

the ML and #xmonad are good places for you to air these grievances so they get fixed rather than just driving people back to dwm.

@heleos, make sure your managehook doesn't have some sort of doIgnore on windows of whatever type that Thunar dialog is.  by default, all newly created windows should get focus (floating or not), so perhaps you're unknowingly overriding this.  then again, it could just be a bug smile.

manageHooks are extremely extensible and suit my floating needs all by themselves, no  special layout required.

Offline

#6 2009-09-25 20:25:59

heleos
Member
From: Maine, USA
Registered: 2007-04-24
Posts: 678

Re: Does anyone have a sane floating workspace in Xmonad?

I will double check when I get back into linux, but I don't think I added any ignores to my manageHooks. The window gets focus, but it does not raise. Also, not to hijack the thread, but is there a way to add multiple binds to my mouse1 button? When I press it in combination with my modmask, I would like to be able to move it, and also raise it to the top (basically combine the bind of mouse 1 and mouse 2)

If there is a talk about improving the floating layer of Xmonad, I may just have to stick around and wait it out, It's a great WM smile

edit: found my problem, it was in my managehook tongue I had a doF (W.swapDown) because I like to keep my master window when I open a new one... Guess I'll have to live without that :\

It would be nice to see the xmonad people take a note from awesome. I always liked the way they did their floating layer. I was just sick of having the syntax change every update tongue

Last edited by heleos (2009-09-25 20:36:21)

Offline

#7 2009-09-25 20:48:08

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: Does anyone have a sane floating workspace in Xmonad?

heleos wrote:

I
It would be nice to see the xmonad people take a note from awesome. I always liked the way they did their floating layer.

Apart from awesome not keeping floating windows on top...


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#8 2009-09-25 21:02:57

heleos
Member
From: Maine, USA
Registered: 2007-04-24
Posts: 678

Re: Does anyone have a sane floating workspace in Xmonad?

Rasi wrote:

Apart from awesome not keeping floating windows on top...

Guess I never ran into that problem, I usually don't mix floating apps with tiled layouts.


Apart from that!

Offline

#9 2009-09-26 01:38:25

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Does anyone have a sane floating workspace in Xmonad?

Simple(st)Float has support for all of XMonad.Hooks.Place disabled. So, there's no easy way to open windows under the pointer and stuff like that.  Essentially, building what I want isn't going to happen any time soon. I'm pretty much done with XMonad for the time being.

My quest for the perfect WM isn't that far off though, but that's a subject for another thread (that will be coming soon).

Offline

#10 2009-09-26 01:59:18

heleos
Member
From: Maine, USA
Registered: 2007-04-24
Posts: 678

Re: Does anyone have a sane floating workspace in Xmonad?

Coming from a user who seems to be looking for about the same in a WM as I am, I will be looking forward to that new thread smile

Offline

#11 2009-09-26 02:07:51

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: Does anyone have a sane floating workspace in Xmonad?

Everyone seems to agree that XMonad's floating support is weak. I can't say I have ever noticed it. I tend to prefer console apps and don't need many floating apps. Those apps that function best in a floating environment such as Sonata, feh, Gimp, mplayer etc I handle using manage hooks and just float them on one of my tiled layouts. I normally only have one or two floating apps active at any one time. Gimp is an exception of course. I always dedicate a workspace to it. At the moment I just float it's windows using manage hooks though I want to look at the IM layout for handling the Gimp.

Offline

#12 2009-09-26 02:25:38

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Does anyone have a sane floating workspace in Xmonad?

mikesd wrote:

At the moment I just float it's windows using manage hooks though I want to look at the IM layout for handling the Gimp.

withIM is hands down my favorite contrib layout.

you'll want to have a look at this for that.  it involves withIM $ RelectHoriz $ withIM to put a toolbar on each side.  pretty sweet, i used it for a bit when i wanted gajim (gchat) on one side and pidgin (aim) on the other.   my tip? you can do withIM (1/10) (Role "whatever") (Tall ||| Wide ||| ... ) to cycle the 9/10ths main portion through a list of layouts too.  oh, you could probably do withIM $ withIM to put two toolbars side by side on one side...

/me is off to tinker in ~/.xmonad/xmonad.hs...

Offline

#13 2009-10-11 19:03:08

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Does anyone have a sane floating workspace in Xmonad?

It turns out that there is a way to do it. So far I'm pretty much in the middle of getting this right, and I could use some help from the community. Don't mind the copy and paste formatting.

In any tiling layout, you can use XMonad.Hooks.Place and XMonad.Hooks.FloatNext. Set the manageHook to:

placeHook myPlacement <+> floatNextHook <+> manageHook defaultConfig

With:

myPlacement                = inBounds (underMouse (0.5,0.5))

This will open all new windows with the center at the mouse pointer, unless the window is near an edge and it will accommodate for that.

Currently I'm using a key binding to start this:

, ((modMask,                  xK_r     ), toggleFloatAllNew)

What I need to do next is get the click-to-raise functionality to work, and to figure out how to a have one workspace with all of this being automatic instead of modMask + r. The rest of the missing components I'll bring up as the thread continues.

--EDIT AGAIN--

The code for raising windows posted above does work despite what I said before, but it traps all other X events. For example, if I use (0, button1) to do anything, I can no longer use it for anything else. I'll search around and see if there's a way to pass X events anyway.

Offline

#14 2009-10-11 19:32:22

piffey
Member
From: Sioux Falls, SD
Registered: 2009-10-07
Posts: 54

Re: Does anyone have a sane floating workspace in Xmonad?

If you take a look at brisbin's Xmonad.hs you'll see a lot of good stuff setup for auto-floating certain programs like IM or Gimp and what not. I just have all apps that require floating to work best to a certain workspace. Take a peek at his ManageHook in this config file for some ways to do that. I know I'm going to float my IMs, Gimp, Xine, and Wine so I always just toss them onto my float space and have them 'doFloat' right when they come up. No need to Mod-Click again then.

Edit: Heh. Didn't notice he'd already posted.

Last edited by piffey (2009-10-11 19:35:35)

Offline

#15 2009-10-11 19:41:37

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Does anyone have a sane floating workspace in Xmonad?

piffey wrote:

If you take a look at brisbin's Xmonad.hs you'll see a lot of good stuff setup for auto-floating certain programs like IM or Gimp and what not. I just have all apps that require floating to work best to a certain workspace. Take a peek at his ManageHook in this config file for some ways to do that. I know I'm going to float my IMs, Gimp, Xine, and Wine so I always just toss them onto my float space and have them 'doFloat' right when they come up.

Edit: Heh. Didn't notice he'd already posted.

Thanks for the response and welcome to the forums.

What I'm after is one dedicated floating workspace for when I'm not doing serious work. The idea behind this is when I'm just reading through the forums, updating software, and generally dinking around, I don't want to look at stuff half screen or full screen or have the WM manage much for me. As well, when I'm being that lazy, I may just want to work with the mouse.

For anyone that's interested in this thread, the tiling end is going to be even more convoluted. There are no Xmonad layouts that do what I want it do by default, so that thread will be interesting. But, first things first.

Offline

#16 2009-10-11 20:15:00

droog
Member
Registered: 2004-11-18
Posts: 877

Re: Does anyone have a sane floating workspace in Xmonad?

skottish wrote:

What I'm after is one dedicated floating workspace for when I'm not doing serious work. The idea behind this is when I'm just reading through the forums, updating software, and generally dinking around, I don't want to look at stuff half screen or full screen or have the WM manage much for me. As well, when I'm being that lazy, I may just want to work with the mouse.

I do the same thing with a dedicated float workspace.

import XMonad.Layout.PerWorkspace

then have in my layoutHook
onWorkspace "float" simplestFloat

full config is here but its pretty basic still.

Last edited by droog (2009-10-11 20:16:51)

Offline

#17 2009-10-11 20:31:47

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Does anyone have a sane floating workspace in Xmonad?

droog, your github output looks great with the colors. I don't remember seeing any that were that readable before.

Is simplestFloat working out for you? Some of things about it that I mentioned in the OP were show stoppers. With this last set up, I'm getting close to being able to replace openbox in the way that I use it.

Offline

#18 2009-10-11 21:25:26

piffey
Member
From: Sioux Falls, SD
Registered: 2009-10-07
Posts: 54

Re: Does anyone have a sane floating workspace in Xmonad?

skottish wrote:
piffey wrote:

If you take a look at brisbin's Xmonad.hs you'll see a lot of good stuff setup for auto-floating certain programs like IM or Gimp and what not. I just have all apps that require floating to work best to a certain workspace. Take a peek at his ManageHook in this config file for some ways to do that. I know I'm going to float my IMs, Gimp, Xine, and Wine so I always just toss them onto my float space and have them 'doFloat' right when they come up.

Edit: Heh. Didn't notice he'd already posted.

Thanks for the response and welcome to the forums.

What I'm after is one dedicated floating workspace for when I'm not doing serious work. The idea behind this is when I'm just reading through the forums, updating software, and generally dinking around, I don't want to look at stuff half screen or full screen or have the WM manage much for me. As well, when I'm being that lazy, I may just want to work with the mouse.

For anyone that's interested in this thread, the tiling end is going to be even more convoluted. There are no Xmonad layouts that do what I want it do by default, so that thread will be interesting. But, first things first.

I like this idea of having a 'lazy workspace' for when you don't really want to be dedicated to working on anything since the whole point of a tiling window manager is to help you concentrate. This is my third day on xmonad and fourth on arch -- but I'll look around and see what I can do because this sounds like something I'd be interested in adding to my own config. I think what droog is doing with PerWorkspace might be the best solution yet. Also look into the DecorationMadness Layout and the FloatNext that provide some stuff for working with floats -- might advance the simplestFloat layout a bit. I'll dork around some more and get back to you. I'm really interested in getting this to work as well.

Thanks for the intro to the forums too. Glad to be here. Love the community.

Offline

Board footer

Powered by FluxBB