
Resources: - Original thread/ANN: http://thread.gmane.org/gmane.comp.lang.haskell.xmonad/7458/ - Jan Vorberger's OP: http://article.gmane.org/gmane.comp.lang.haskell.xmonad/7458
"I'm planning to decide on a somewhat fixed configuration of XMonad, probably in combination with Gnome as a DE, and then trying to make this functionality available via mouse commands that - hopefully - will be easy to pick up.<br> I also want to completely rework the whole floating layer thing, as it seems to me to be a fairly foreing [sic] concept for a newcomer and it's awkward to use. My current idea is to instead use a floating layout algorithm, that could work similiar [sic] to a conventional window manager. It could even be set as the default layout algorithm. That way, the WM could almost be a 'drop-in' replacement for - let's say Metacity - greeting the user with the familiar concept of manipulating windows and then leading him to the tiling paradigm once he switches the layout."
Jan later [wrote](http://article.gmane.org/gmane.comp.lang.haskell.xmonad/7495) that
"@Don: I will definitely try to contribute back changes and improvements, if I can. Once I start implementing I will also make my repository available for others to try out. Thx for offering assistance, I might come back to that later."
But given that Bluetile has been done a while, I guess we'll just have to content ourselves with the repos. - A PDF presentation of some sort is available at http://parsys.informatik.uni-oldenburg.de/theses/docs/bluetile_zwischenvortr... - Google Translate link, may or may not work: http://translate.google.com/translate?hl=en&sl=de&u=http://parsys.informatik.uni-oldenburg.de/theses/docs/bluetile_zwischenvortrag.pdf The actual code seems to be broken up into 4 packages; everything is BSD3 so no concerns about reuse: - bluetilutils: http://hackage.haskell.org/package/bluetileutils (Darcs repo: http://tuvok.home.dyndns.org/bluetile-repos/bluetileutils down?) A package of 3 Gtk2hs executables: i. bluetiledock ii. bluetilemockwin iii. bluetilegreet - xmonad-bluetilebranch: http://hackage.haskell.org/package/xmonad-bluetilebranch (I have no local repo for this, although it was presumably at http://tuvok.home.dyndns.org/bluetile-repos/xmonad-bluetilebranch ) - xmonad-contrib-bluetilebranch: http://hackage.haskell.org/package/xmonad-contrib-bluetilebranch (same comment for repo) - bluetile: http://hackage.haskell.org/package/bluetile (repo: http://tuvok.home.dyndns.org/bluetile-repos/bluetile ) Now, looking at the code (bearing in mind I am only reading and haven't compiled/run anything yet): # bluetileutils ## bluetiledock This creates a minimalistic strut app. It supports 14 buttons/commands: - switch to workspaces 0-9 - 4 commands to switch to floating/tiled1/tiled2/fullscreen (presumably tiled1 and tiled2 = 2 windows each on 1/2 screen split horizontal & vertical) Interesting is how bluetiledock achieves this functionality, how it makes xmonad actually do something - it seems to be using a X-based method of IPC, in which a integer is stored in an X atom and xmonad then grabs it and does something with it: ~~~~{.haskell} sendCommandX :: Int -> IO () sendCommandX com = do d <- X.openDisplay "" rw <- X.rootWindow d $ X.defaultScreen d a <- X.internAtom d "XMONAD_COMMAND" False X.allocaXEvent $ \e -> do XE.setEventType e X.clientMessage XE.setClientMessageEvent e rw a 32 (fromIntegral com) XE.currentTime X.sendEvent d rw False X.structureNotifyMask e X.sync d False ~~~~ ## bluetilegreet A splashscreen/help; checks for empty file ~/.bluetilegreet and if it exists, makes it and runs. It then basically displays the XML contents of bluetilegreet.glade, which run something like: ~~~~{.xml} <property name="label" translatable="yes">Quickstart: Open a few windows and notice that you are currently in the traditional layout mode, known from most other window managers. To start tiling, switch to another layout in one of these ways:</property> <property name="wrap">True</property> </widget> </child> <child> <widget class="GtkLabel" id="label3"> <property name="visible">True</property> <property name="label" translatable="yes">* Using the dock on the left (buttons A, S, D or F), * pressing the middle mouse button while holding down the Windows key or * using the keyboard shortcuts Win+A, Win+S, Win+D or Win+F .</property> </widget> <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> </packing> </child> <child> <widget class="GtkLabel" id="label4"> <property name="visible">True</property> <property name="label" translatable="yes">You should be fine exploring the tiling paradigm with your mouse alone, but to get the most out of it you might want to look at the keyboard shortcuts at some point. They are documented on Bluetile's website.</property> <property name="wrap">True</property> ~~~~ It might be a good idea to have something similar for XMonad; it's not like it really matters if we dump an empty hidden file in ~/.xmonad ## bluetilemockwin No idea. It creates some sort of widget with the RGB color specified as 3 ints. Grep doesn't seem to show up any use in the main bluetile repo. ~~~~{.haskell} main :: IO () main = do args <- getArgs progName <- getProgName if length args /= 3 then putStrLn $ "Usage: " ++ progName ++ " 0 0 65535" else let r = read $ args !! 0 g = read $ args !! 1 b = read $ args !! 2 in showMockWin (Color r g b) showMockWin :: Color -> IO () showMockWin c = do initGUI window <- windowNew onDestroy window mainQuit widgetModifyBg window StateNormal c widgetShowAll window mainGUI ~~~~ # xmonad-contrib-bluetilebranch Without a repo, it's hard to know exactly what's changed. But by my count, this XMC fork adds the following modules: - XMonad.Actions.BluetileCommands defines `[(String, X ())]`, which seem to support the 14 commands used by the dock, and 4 others (quit, quit-and-start-metacity, increase master, decrease master) - XMonad.Actions.WindowMenu much as it sounds, supporting the following commands: ~~~~{.haskell} actions = [ ("Cancel menu", return ()) , ("Close" , kill) , ("Maximize" , sendMessage $ maximizeRestore w) , ("Minimize" , sendMessage $ MinimizeWin w) ] ++ [ ("Move to workspace " ++ tag, windows $ W.shift tag) | tag <- tags ] ~~~~ - XMonad.Hooks.BluetileDock - XMonad.Hooks.CustomRestart adequately summarized by a snippet ~~~~{.haskell} a <- io $ internAtom d "XMONAD_CUSTOM_RESTART" False when (mt == a) $ do restart prog True ~~~~ - XMonad.Hooks.EventHook Old code? Seems to've been removed in darcs XMC - XMonad.Hooks.RestoreMinimized - XMonad.Hooks.WorkspaceByPos No idea. What I did notice is that it looks like it could use the Maybe monad! ~~~{.haskell} needsMoving :: Window -> X (Maybe WorkspaceId) needsMoving w = withDisplay $ \d -> do -- only relocate windows with non-zero position wa <- io $ getWindowAttributes d w if ((wa_x wa) == 0) && ((wa_y wa) == 0) then return Nothing else do ws <- gets windowset sc <- fromMaybe (W.current ws) <$> pointScreen (fi $ wa_x wa) (fi $ wa_y wa) maybeWkspc <- screenWorkspace (W.screen sc) case maybeWkspc of Nothing -> return Nothing Just wkspc -> do let currentWksp = W.currentTag ws if currentWksp == wkspc then return Nothing else return (Just wkspc) ~~~~ - XMonad.Layout.BorderResize - XMonad.Layout.DecorationUtils Support for the BorderResize? - XMonad.Layout.DraggingVisualizer - XMonad.Layout.MouseResizableTile - XMonad.Layout.NoFrillsDecoration - XMonad.Layout.PositionStoreFloat - XMonad.Layout.ThreeColumnsMiddle just an alias for ThreeColumns - XMonad.Layout.WindowSwitcherDecoration looks like a module to use a mouse to 'drag' a window onto another and swap their positions # bluetile About what you would expect - importing most of the above, running the dock and the greeter. So to conclude this whirlwind tour: I see a lot of valuable stuff. The greeter is something that could definitely be in core (although I think the gtk2hs dep is untenable, so I expect a better idea would be to run an xmessage prompt with a list of keybindings). The dock is a nice alternative to the ridiculously baroque setups for xmobar and dzen - those may be really nice and customizable, but they are absolutely unsuitable for beginners, and even setting up a Gnome panel is a bit much for non-intermediate or advanced XMonaders. And the string atom stuff has already been done by Stumpwm/Ratpoison, and I asked for this in the past - XMonad should be scriptable from the outside. -- gwern

2009/8/25
The greeter is something that could definitely be in core (although I think the gtk2hs dep is untenable, so I expect a better idea would be to run an xmessage prompt with a list of keybindings). The dock is a nice alternative to the ridiculously baroque setups for xmobar and dzen - those may be really nice and customizable, but they are absolutely unsuitable for beginners, and even setting up a Gnome panel is a bit much for non-intermediate or advanced XMonaders.
In the Fedora package, we load a default xterm in the default config that displays the man page. This may also be an option. -Yaakov

On Tue, Aug 25, 2009 at 05:17:00AM -0400, gwern0@gmail.com wrote:
Interesting is how bluetiledock achieves this functionality, how it makes xmonad actually do something - it seems to be using a X-based method of IPC, in which a integer is stored in an X atom and xmonad then grabs it and does something with it:
It sounds like the already existing X.H.ServerMode, which has a horribly inflexible API, since it always uses a fixed list of commands, that can not be changed conveniently. I'll submit a patch later, so that one could use that module instead and avoid code duplication.
- XMonad.Hooks.EventHook Old code? Seems to've been removed in darcs XMC
Yes, it has been replaced by handleEventHook in core. Using that instead should be a trivial change.
And the string atom stuff has already been done by Stumpwm/Ratpoison, and I asked for this in the past - XMonad should be scriptable from the outside.
FWIW: I got a half-ready solution about this in xmonad-extras, which allows sending Haskell expressions via socket, but perhaps a language-agnostic IPC facility might also be a good thing(a lot more work though, if it should be general and flexible): http://code.haskell.org/xmonad-extras/documentation/XMonad-Hooks-EvalServer....

gwern0:
So to conclude this whirlwind tour: I see a lot of valuable stuff.
The greeter is something that could definitely be in core (although I think the gtk2hs dep is untenable, so I expect a better idea would be to run an xmessage prompt with a list of keybindings). The dock is a nice alternative to the ridiculously baroque setups for xmobar and dzen - those may be really nice and customizable, but they are absolutely unsuitable for beginners, and even setting up a Gnome panel is a bit much for non-intermediate or advanced XMonaders.
Ok. So a good contrib module.
And the string atom stuff has already been done by Stumpwm/Ratpoison, and I asked for this in the past - XMonad should be scriptable from the outside.
Anyone interested in contacting the developer, and seeing how far they want to proceed with the patch imports? -- Don

On Tue, Aug 25, 2009 at 1:01 PM, Don Stewart
gwern0:
So to conclude this whirlwind tour: I see a lot of valuable stuff.
The greeter is something that could definitely be in core (although I think the gtk2hs dep is untenable, so I expect a better idea would be to run an xmessage prompt with a list of keybindings). The dock is a nice alternative to the ridiculously baroque setups for xmobar and dzen - those may be really nice and customizable, but they are absolutely unsuitable for beginners, and even setting up a Gnome panel is a bit much for non-intermediate or advanced XMonaders.
Ok. So a good contrib module.
No, not a good contrib module at all. If the idea is to help beginners, then putting it in contrib makes it useless. It'd be like writing a Haskell guide for beginners, except the first 10 chapters assume you know GADTs and System F - something to help beginners must be by default and not optional. If it was optional, it will either go unused or will be used by users savvy enough to know about it, track it down, and enable it, users who likely don't need it. Even spinning off an 'xmonad-newbie' is suboptimal, since again, a user savvy enough to know they don't want 'xmonad' but some obscure fork or variant (even generously assuming it gets packaged up and as widely available as the original) is a user who doesn't much need it. -- gwern

gwern0:
On Tue, Aug 25, 2009 at 1:01 PM, Don Stewart
wrote: gwern0:
So to conclude this whirlwind tour: I see a lot of valuable stuff.
The greeter is something that could definitely be in core (although I think the gtk2hs dep is untenable, so I expect a better idea would be to run an xmessage prompt with a list of keybindings). The dock is a nice alternative to the ridiculously baroque setups for xmobar and dzen - those may be really nice and customizable, but they are absolutely unsuitable for beginners, and even setting up a Gnome panel is a bit much for non-intermediate or advanced XMonaders.
Ok. So a good contrib module.
No, not a good contrib module at all. If the idea is to help beginners, then putting it in contrib makes it useless.
It'd be like writing a Haskell guide for beginners, except the first 10 chapters assume you know GADTs and System F - something to help beginners must be by default and not optional. If it was optional, it will either go unused or will be used by users savvy enough to know about it, track it down, and enable it, users who likely don't need it.
xmobar and dzen aren't in core. why should greeter be in core? its the xmonad microkernel -- you don't go bloating it without reason. i'm all in favour of easier user experiences. -- Don

Don Stewart wrote:
gwern0:
On Tue, Aug 25, 2009 at 1:01 PM, Don Stewart
wrote: gwern0:
So to conclude this whirlwind tour: I see a lot of valuable stuff.
The greeter is something that could definitely be in core (although I think the gtk2hs dep is untenable, so I expect a better idea would be to run an xmessage prompt with a list of keybindings). The dock is a nice alternative to the ridiculously baroque setups for xmobar and dzen - those may be really nice and customizable, but they are absolutely unsuitable for beginners, and even setting up a Gnome panel is a bit much for non-intermediate or advanced XMonaders.
Ok. So a good contrib module.
No, not a good contrib module at all. If the idea is to help beginners, then putting it in contrib makes it useless.
It'd be like writing a Haskell guide for beginners, except the first 10 chapters assume you know GADTs and System F - something to help beginners must be by default and not optional. If it was optional, it will either go unused or will be used by users savvy enough to know about it, track it down, and enable it, users who likely don't need it.
xmobar and dzen aren't in core. why should greeter be in core? its the xmonad microkernel -- you don't go bloating it without reason.
i'm all in favour of easier user experiences.
-- Don
I agree, please don't mess up the Xmonad-Core. I like Xmonad because its so different to any other WM.. simple, clean, elegant, customizable, and did I mention clean? Thomas

Hi,
2009/8/26 Thomas Friedrich
I agree, please don't mess up the Xmonad-Core. I like Xmonad because its so different to any other WM.. simple, clean, elegant, customizable, and did I mention clean?
Same here. I really think that telling people about tiling is a good idea, and having a more "beginner friendly" branch like bluetile is also a good thing. I'm not sure how to put it without sounding rude or arrogant, but I like xmonad because of the reasons Thomas stated above, which, for me, includes (or rather means) the absence of "beginner friendly" features.
From my point of view there are many window managers that deal with "beginner friendly" features. Extending xmonads default configuration in this way would mean that it's "just another WM". It all comes down to packaging anyway. There are some cool configurations in the Wiki, why not create a package xmonad-gnome or xmonad-kde for example? I've to disagree with Gwern here: A normal user who doesn't know about xmonad probably doesn't want it. So in case someone selects xmonad as his window manager of choice, there should at least be some basic knowledge of xmonad and the way it deals with windows.
Christian

I figured I'd jump in here to give a "beginner"'s perspective. I'm a non-programmer type who has been using Linux and Emacs for years for one reason -- a need to have some control of the process as well as the content when I write. For this reason I moved recently to tiling WMs. I tried wmii for a bit -- but hit bugs I wasn't able to solve easily. I tried a few others but was daunted by a user base downright hostile to non-programmers. Awesome worked well for me, but was poorly documented. Finally I found Xmonad -- which I love -- and I'm not turning back. It's fast, I can configure it pretty easily by looking through configurations on the Wiki and cutting and pasting, and most of all, it has a friendly following of smart folks who seem willing to help amateurs such as myself. That being said, I would have been thrilled had there been a version that might have helped me get up and running more easily. It took me almost a week to get a really good usable version going (I had most of my trouble getting xmobar to work well.) A fairly simple out-of-the-box version with good documentation that would have allowed a begiiner to delve more deeply gradually would have been heaven. In short, as a beginner, my ideal version of xmonad would be an out-of-the-box version with great *educationally oriented* documentation. I hope this is useful. d. On Wed, 26 Aug 2009, Christian Walther wrote:
Hi,
2009/8/26 Thomas Friedrich
: [...] I agree, please don't mess up the Xmonad-Core. I like Xmonad because its so different to any other WM.. simple, clean, elegant, customizable, and did I mention clean?
Same here. I really think that telling people about tiling is a good idea, and having a more "beginner friendly" branch like bluetile is also a good thing. I'm not sure how to put it without sounding rude or arrogant, but I like xmonad because of the reasons Thomas stated above, which, for me, includes (or rather means) the absence of "beginner friendly" features.
From my point of view there are many window managers that deal with "beginner friendly" features. Extending xmonads default configuration in this way would mean that it's "just another WM". It all comes down to packaging anyway. There are some cool configurations in the Wiki, why not create a package xmonad-gnome or xmonad-kde for example? I've to disagree with Gwern here: A normal user who doesn't know about xmonad probably doesn't want it. So in case someone selects xmonad as his window manager of choice, there should at least be some basic knowledge of xmonad and the way it deals with windows.
Christian _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
-- Daniel Goldin 213.926.1960

On Tue, Aug 25, 2009 at 9:19 PM, Don Stewart
xmobar and dzen aren't in core. why should greeter be in core?
They could be a bad idea to put in XMonad for dozens of reasons: they aren't maintained, they do way too much, they're hundreds or thousands of lines, they bring in further dependencies, they aren't as well-coded or well-tested or well-documented as they could be, etc. A greeter could be as short as 3 (non-golfed) obviously correct lines: 1 line to do the 'if (not fileExists) $ spawn xmessage ++ helpMsg; a 2nd line to touch the file; and a 3rd line to define helpMsg. What the helpMsg would be is something worth discussing. I'd like something like the Ratpoison help that briefly covers the mod key issue ('all XMonad commands are keystrokes which start by holding the modifier key; the default modifier key is mod1Mask, usually your Alt or Meta key') and then lists all the default keybindings, but this might be hard to do in a non-copypaste fashion (it should be easy to call show on the list of keys, yes, but how does one do Show on the X() functions those keys correspond to?). But maybe a shorter help might work - perhaps a hyperlink to the docs like http://haskell.org/haskellwiki/Xmonad/Config_archive/Template_xmonad.hs ?
its the xmonad microkernel -- you don't go bloating it without reason.
i'm all in favour of easier user experiences.
-- Don
I think giving first-time users crucial information is not bloating the microkernel 'without reason'; I don't see how keeping the kernel static or shrinking it even more could lead to an easier user experience. -- gwern

* On Friday, August 28 2009, Gwern Branwen wrote:
I'd like something like the Ratpoison help that briefly covers the mod key issue ('all XMonad commands are keystrokes which start by holding the modifier key; the default modifier key is mod1Mask, usually your Alt or Meta key') and then lists all the default keybindings, but this might be hard to do in a non-copypaste fashion (it should be easy to call show on the list of keys, yes, but how does one do Show on the X() functions those keys correspond to?).
There is a typeclass-based approach, implemented in XMonad.Util.NamedActions (darcs contrib), which may be worth consideration. -- Adam

On Fri, Aug 28, 2009 at 10:09 AM, Adam Vogt
There is a typeclass-based approach, implemented in XMonad.Util.NamedActions (darcs contrib), which may be worth consideration.
That's interesting. I see that the guts of it, defaultKeysDescr, take the copying approach, though, and don't reuse the original Config. But after all, if you're willing to copy, then a much easier approach is possible - have a Config which is [((Keymask,KeySym), String, X())]... -- gwern

* On Friday, August 28 2009, Gwern Branwen wrote:
That's interesting. I see that the guts of it, defaultKeysDescr, take the copying approach, though, and don't reuse the original Config. But after all, if you're willing to copy, then a much easier approach is possible - have a Config which is [((Keymask,KeySym), String, X())]...
That could work too, and would probably be better, given the type errors you can get with the NamedActions module (ie. add an instance for xyz, or ambigous type variables). I guess you could support expanding submaps as putting their descriptions on different lines in the String... but would that generalize to nested submaps? -- Adam

Hi! (Sorry to be replying to an old thread, but I am catching up.) On Fri, Aug 28, 2009 at 01:01:11AM -0400, Gwern Branwen wrote:
A greeter could be as short as 3 (non-golfed) obviously correct lines: 1 line to do the 'if (not fileExists) $ spawn xmessage ++ helpMsg; a 2nd line to touch the file; and a 3rd line to define helpMsg. What the helpMsg would be is something worth discussing.
I really do agree. XMonad is now in a variety of distributions and can be installed by clueless users in a click-or-two. Later one, when they happen to break their GNOME session, it sounds like a good idea to give at least an idea on what is going on when XMonad finally shows up from distant memories. For this use case, I think the message should at least document how to quit. It was 13 years ago (damn.), but the very first time I started "vi" on a Slackware, Ctrl+C did not quit, and I had no other clue so I just pushed the reboot button. After the next boot, I had the same experience with "emacs". A few reboots later, eventually, someone told me a little bit more on how to edit, quit and save… but the software itself could probably have helped me as well. When started without any parameters "vim" displays not so much (9 lines of text), but among others: type :q<Enter> to exit type :help<Enter> or <F1> for on-line help But maybe it is a change that I should look forward to see added to the Debian package instead… Cheers, -- Jérémy Bobbio .''`. lunar@debian.org : :Ⓐ : # apt-get install anarchism `. `'` `-

Hi! On Tue, Aug 25, 2009 at 05:17:00AM -0400, gwern0@gmail.com wrote:
Jan later [wrote](http://article.gmane.org/gmane.comp.lang.haskell.xmonad/7495) that
"@Don: I will definitely try to contribute back changes and improvements, if I can. Once I start implementing I will also make my repository available for others to try out. Thx for offering assistance, I might come back to that later."
But given that Bluetile has been done a while, I guess we'll just have to content ourselves with the repos.
I'm here, I'm here! :-) And the statement about trying to contribute changes back is still true. The Bluetile project isn't done yet. The code is (as far as the school project is concerned), but the accompanying paper isn't, so that's why I didn't have time to submit patches yet. But thanks anyway for having a look at my code! That's a pretty good overview. I'll comment on a few things:
- A PDF presentation of some sort is available at http://parsys.informatik.uni-oldenburg.de/theses/docs/bluetile_zwischenvortr... - Google Translate link, may or may not work: http://translate.google.com/translate?hl=en&sl=de&u=http://parsys.informatik.uni-oldenburg.de/theses/docs/bluetile_zwischenvortrag.pdf
That presentation was at the beginning of my project, describing what I was planning to do.
The actual code seems to be broken up into 4 packages; everything is BSD3 so no concerns about reuse:
- bluetilutils: http://hackage.haskell.org/package/bluetileutils (Darcs repo: http://tuvok.home.dyndns.org/bluetile-repos/bluetileutils down?) A package of 3 Gtk2hs executables: i. bluetiledock ii. bluetilemockwin iii. bluetilegreet - xmonad-bluetilebranch: http://hackage.haskell.org/package/xmonad-bluetilebranch (I have no local repo for this, although it was presumably at http://tuvok.home.dyndns.org/bluetile-repos/xmonad-bluetilebranch ) - xmonad-contrib-bluetilebranch: http://hackage.haskell.org/package/xmonad-contrib-bluetilebranch (same comment for repo) - bluetile: http://hackage.haskell.org/package/bluetile (repo: http://tuvok.home.dyndns.org/bluetile-repos/bluetile )
All the repositories can now be found at http://code.haskell.org/bluetile/ .
Now, looking at the code (bearing in mind I am only reading and haven't compiled/run anything yet):
# bluetileutils ## bluetiledock
This creates a minimalistic strut app. It supports 14 buttons/commands:
- switch to workspaces 0-9 - 4 commands to switch to floating/tiled1/tiled2/fullscreen (presumably tiled1 and tiled2 = 2 windows each on 1/2 screen split horizontal & vertical)
Interesting is how bluetiledock achieves this functionality, how it makes xmonad actually do something - it seems to be using a X-based method of IPC, in which a integer is stored in an X atom and xmonad then grabs it and does something with it:
As Daniel pointed out, this is based on the ServerMode code in contrib.
## bluetilemockwin
No idea. It creates some sort of widget with the RGB color specified as 3 ints. Grep doesn't seem to show up any use in the main bluetile repo.
This is used by the greeter as part of the quickstart tutorial. It let's you open two windows - one red, one blue - and gives you some instructions how to tile. I find using these windows, the effects of the different tiling algorithms can be seen nicely.
# xmonad-contrib-bluetilebranch
Without a repo, it's hard to know exactly what's changed. But by my count, this XMC fork adds the following modules:
It has been a while since I merged new patches from XMC back into my repo. So by now, there are probably some conflicts. I will try to look into this in the next days.
- XMonad.Hooks.WorkspaceByPos No idea. What I did notice is that it looks like it could use the Maybe monad!
WorkspaceByPos is only useful in dual-head setups. If you open a new window it looks at the position where it wants to go and moves it to the correct workspace - as opposed to just assigning it to the active workspace. That's also very helpful when starting up in a dual-head setup. If you already have windows open and then start Bluetile, they are correctly assigned to the two visible workspaces, instead of all being moved onto one workspace.
- XMonad.Layout.BorderResize - XMonad.Layout.DecorationUtils Support for the BorderResize?
I had to move some code from X.L.Decoration to DecorationUtils because of a circular dependency I was running in. My decoration uses WindowMenu, which uses GridSelect, which in turn imported stuff from Decoration. I moved that stuff out into DecorationUtil, so that GridSelect can only import DecorationUtil. However, the whole Decoration stuff is probably the one thing, which will be fairly hard to merge. I hacked it quite a bit to make it work better in a dual-head setup. It's also fairly Bluetile-specific right now. So maybe it's better if I copy it over into a new module and leave the old decoration as it is, for people that use it in the current form. Or maybe it can be made more modular, so that it supports both the old version as well as the Bluetile-specific stuff.
- XMonad.Layout.WindowSwitcherDecoration looks like a module to use a mouse to 'drag' a window onto another and swap their positions
That's correct.
So to conclude this whirlwind tour: I see a lot of valuable stuff.
Glad to hear that! :-) Regards! Jan

On Tue, Aug 25, 2009 at 7:09 PM, Jan
Vornberger
- XMonad.Hooks.WorkspaceByPos No idea. What I did notice is that it looks like it could use the Maybe monad!
WorkspaceByPos is only useful in dual-head setups. If you open a new window it looks at the position where it wants to go and moves it to the correct workspace - as opposed to just assigning it to the active workspace. That's also very helpful when starting up in a dual-head setup. If you already have windows open and then start Bluetile, they are correctly assigned to the two visible workspaces, instead of all being moved onto one workspace.
Hm. The one it 'wants to go' to? You mean some apps detect that there are multiple physical screens and choose to go to #2 instead of #1, or something? (What apps do this, and why?)
- XMonad.Layout.WindowSwitcherDecoration looks like a module to use a mouse to 'drag' a window onto another and swap their positions
That's correct.
Cool. I could actually use that one since I don't always remember what the exact right command is to move stuff around. -- gwern

Gwern Branwen
WorkspaceByPos is only useful in dual-head setups. If you open a new window it looks at the position where it wants to go and moves it to the correct workspace - as opposed to just assigning it to the active workspace. That's also very helpful when starting up in a dual-head setup. If you already have windows open and then start Bluetile, they are correctly assigned to the two visible workspaces, instead of all being moved onto one workspace.
Hm. The one it 'wants to go' to? You mean some apps detect that there are multiple physical screens and choose to go to #2 instead of #1, or something? (What apps do this, and why?)
I assume this means that if there are already windows on two monitors, they'll stay on the monitors they're on.

Quoting Gwern Branwen
On Tue, Aug 25, 2009 at 7:09 PM, Jan Vornberger
wrote: - XMonad.Hooks.WorkspaceByPos No idea. What I did notice is that it looks like it could use the Maybe monad!
WorkspaceByPos is only useful in dual-head setups. If you open a new window it looks at the position where it wants to go and moves it to the correct workspace - as opposed to just assigning it to the active workspace. That's also very helpful when starting up in a dual-head setup. If you already have windows open and then start Bluetile, they are correctly assigned to the two visible workspaces, instead of all being moved onto one workspace.
Hm. The one it 'wants to go' to? You mean some apps detect that there are multiple physical screens and choose to go to #2 instead of #1, or something? (What apps do this, and why?)
When an X window appears, it has a chance to request a particular geometry (size and shape on the screen). There are lots of good reasons for this to happen. Some apps have a "-geometry" argument on the command line, some detect the shape of the screen and try to show up in the center of the screen (or the center of one of the screens, if their developers are Xinerama-savvy), some request the same geometry as when they were closed the last time, and so on. I assume WorkspaceByPos detects which screen an app "wants to go to" by where the requested geometry would put it. With these use cases in mind, it seems useful, and perhaps even a nice feature. ~d

On Fri, Aug 28, 2009 at 01:29:40AM -0400, wagnerdm@seas.upenn.edu wrote:
When an X window appears, it has a chance to request a particular geometry (size and shape on the screen). There are lots of good reasons for this to happen. Some apps have a "-geometry" argument on the command line, some detect the shape of the screen and try to show up in the center of the screen (or the center of one of the screens, if their developers are Xinerama-savvy), some request the same geometry as when they were closed the last time, and so on. I assume WorkspaceByPos detects which screen an app "wants to go to" by where the requested geometry would put it.
That's absolutely correct and a much better explanation than my "where it wants to go to". :-)
With these use cases in mind, it seems useful, and perhaps even a nice feature.
I'm not entirely happy about WorkspaceByPos in its current version: The way which WorkspaceByPos detects windows that do not have a requested geometry is by checking for the request for position 0,0. This seems to work fine, but I wonder if there is another, more 'proper' way to figure this out. Right now, it doesn't play very well with other ManageHooks that shift windows to other workspaces. Obviously there is a conflict - should WorkspaceByPos decide where it goes, or some rule that shifts the window based on its className for example. I thought it's just a matter of where WorkspaceByPos appears in the list of ManageHooks, but it still seemed to cancel out shift operations no matter where i put it. I haven't looked into it much, though. Regards, Jan

2009/8/28 Jan Vornberger
On Fri, Aug 28, 2009 at 01:29:40AM -0400, wagnerdm@seas.upenn.edu wrote:
When an X window appears, it has a chance to request a particular geometry (size and shape on the screen). There are lots of good reasons for this to happen. Some apps have a "-geometry" argument on the command line, some detect the shape of the screen and try to show up in the center of the screen (or the center of one of the screens, if their developers are Xinerama-savvy), some request the same geometry as when they were closed the last time, and so on. I assume WorkspaceByPos detects which screen an app "wants to go to" by where the requested geometry would put it.
That's absolutely correct and a much better explanation than my "where it wants to go to". :-)
With these use cases in mind, it seems useful, and perhaps even a nice feature.
I'm not entirely happy about WorkspaceByPos in its current version:
The way which WorkspaceByPos detects windows that do not have a requested geometry is by checking for the request for position 0,0. This seems to work fine, but I wonder if there is another, more 'proper' way to figure this out.
You should be looking at the Gravity of the window to determine this, if not already doing so. -- Thomas Adam
participants (14)
-
Adam Vogt
-
Christian Walther
-
Daniel Goldin
-
Daniel Schoepe
-
Don Stewart
-
Gwern Branwen
-
gwern0@gmail.com
-
Jan Vornberger
-
Jérémy Bobbio
-
mail@justinbogner.com
-
Thomas Adam
-
Thomas Friedrich
-
wagnerdm@seas.upenn.edu
-
Yaakov Nemoy