From mailing_list at istitutocolli.org Mon Oct 1 02:07:02 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Mon Oct 1 02:10:35 2007 Subject: [Xmonad] New module, XMonadContrib.ResizableTile In-Reply-To: <20071001000521.7339b71f@carbon.sygneca.com> References: <20070928.212611.1641944195.matsuyama@ariel-networks.com> <20071001000521.7339b71f@carbon.sygneca.com> Message-ID: <20071001060701.GH3482@laptop.nowhere.net> On Mon, Oct 01, 2007 at 12:05:21AM +0100, Jamie Webb wrote: > On 2007-09-28 21:26:11 MATSUYAMA Tomohiro wrote: > > > > Hi. > > > > I have hacked a default tile layout a little to be allow us to > > change a width/height of window. > > This looks like a very useful layout! Unfortunately for me it causes > xmonad to crash when switching to a blank workspace. This happens just > by adding this layout to my config; I don't even seem to have to switch > to it. > > I find this particularly confusing since my small understanding of the > xmonad code gave the impression that layouts aren't even invoked for > blank workspaces. > > Anyone have any ideas? I didn't try and I read it very quickly. My idea is that: Nothing -> error "" is wrong and should be replaced by a: Nothing -> return Nothing As I said I didn't test it. Hope this helps. Andrea From codesite-noreply at google.com Mon Oct 1 03:43:06 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Mon Oct 1 03:42:07 2007 Subject: [Xmonad] Issue 49 in xmonad: XMonad sometimes stops responding to alt key Message-ID: <00163600cf97043b6996559a638f0e65@google.com> Issue 49: XMonad sometimes stops responding to alt key http://code.google.com/p/xmonad/issues/detail?id=49 Comment #2 by david.maciver: Yet more updates: It happens even with alt-q rebound elsewhere, so it's not restarting xmonad that causes the issue. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From matsuyama3 at ariel-networks.com Mon Oct 1 05:37:53 2007 From: matsuyama3 at ariel-networks.com (matsuyama3@ariel-networks.com) Date: Mon Oct 1 05:35:36 2007 Subject: [Xmonad] darcs patch: XMonadContrib.ResizableTile in darcs patch. Message-ID: <20071001093628.0F13E948009@ns.ariel-networks.com> Mon Oct 1 18:14:11 JST 2007 matsuyama3@ariel-networks.com * XMonadContrib.ResizableTile in darcs patch. I have fixed error "" to return Nothing. Thanks Andrea. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 59583 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071001/a71b3828/attachment-0001.bin From mailing_list at istitutocolli.org Mon Oct 1 06:27:55 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Mon Oct 1 06:27:08 2007 Subject: [Xmonad] darcs patch: Tabbed: updated usage information Message-ID: <200710011027.l91ARtkN031267@laptop.nowhere.net> I forgot to update usage information of Tabbed after reintroducing the Shrinker configuration option. Andrea Mon Oct 1 10:22:19 CEST 2007 Andrea Rossato * Tabbed: updated usage information -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 56342 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071001/67b26bc9/attachment-0001.bin From mailing_list at istitutocolli.org Mon Oct 1 06:26:07 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Mon Oct 1 06:27:10 2007 Subject: [Xmonad] darcs patch: XMonadContrib.ResizableTile in darcs patch. In-Reply-To: <20071001093628.0F13E948009@ns.ariel-networks.com> References: <20071001093628.0F13E948009@ns.ariel-networks.com> Message-ID: <20071001102607.GA31153@laptop.nowhere.net> On Mon, Oct 01, 2007 at 06:37:53PM +0900, matsuyama3@ariel-networks.com wrote: > Mon Oct 1 18:14:11 JST 2007 matsuyama3@ariel-networks.com > * XMonadContrib.ResizableTile in darcs patch. > > I have fixed error "" to return Nothing. Thanks Andrea. You are welcome! Many thanks for sharing your code: this is the first module using the new class API! Andrea From mail at christian-thiemann.de Mon Oct 1 08:28:25 2007 From: mail at christian-thiemann.de (Christian Thiemann) Date: Mon Oct 1 08:27:26 2007 Subject: [Xmonad] MATLAB and Xmonad Message-ID: <4700E7E9.8010508@christian-thiemann.de> Hi guys, I switched to Xmonad recently, after looking into wmii and dwm, and I am quite happy with it :) However, I tried starting up MATLAB today and it displays a huge gray screen. I thought it crashed during startup but when I clicked on where the menu bar should be, the menus actually open and are displayed properly. But everything else just doesn't draw in the MATLAB window. Does anybody has an idea what the problem might be (and/or give me hints how to provide some more useful information)? It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm and MATLAB works fine there. And Xnest with wmii and MATLAB works as well. Thanks in advance, Christian From stefanor at cox.net Mon Oct 1 10:04:15 2007 From: stefanor at cox.net (Stefan O'Rear) Date: Mon Oct 1 10:03:16 2007 Subject: [Xmonad] MATLAB and Xmonad In-Reply-To: <4700E7E9.8010508@christian-thiemann.de> References: <4700E7E9.8010508@christian-thiemann.de> Message-ID: <20071001140414.GA3037@localhost.localdomain> On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote: > Hi guys, > > I switched to Xmonad recently, after looking into wmii and dwm, and I am > quite happy with it :) > > However, I tried starting up MATLAB today and it displays a huge gray > screen. I thought it crashed during startup but when I clicked on where > the menu bar should be, the menus actually open and are displayed properly. > But everything else just doesn't draw in the MATLAB window. Does anybody > has an idea what the problem might be (and/or give me hints how to provide > some more useful information)? > > It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm > and MATLAB works fine there. And Xnest with wmii and MATLAB works as well. Is the MATLAB gui written in Java? There is a known bug in the Java windowing code which prevents it from working correctly with non-reparenting window managers like xmonad. Fortunately, there is a workaround in the Java code which makes things work again, as long as the current window manager it Compiz or Looking Glass 3D. One of the contrib modules (XMonadContrib.SetWMName) fiddles the X-property settings so that xmonad pretends to be LG3d; the author claims that this makes Java programs work correctly. Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://www.haskell.org/pipermail/xmonad/attachments/20071001/c01ea9d6/attachment.bin From sjanssen at cse.unl.edu Mon Oct 1 11:11:57 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Mon Oct 1 11:11:02 2007 Subject: [Xmonad] darcs patch: XMonadContrib.ResizableTile in darcs patch. In-Reply-To: <20071001093628.0F13E948009@ns.ariel-networks.com> References: <20071001093628.0F13E948009@ns.ariel-networks.com> Message-ID: <200710011011.57554.sjanssen@cse.unl.edu> On Monday 01 October 2007 04:37:53 matsuyama3@ariel-networks.com wrote: > Mon Oct 1 18:14:11 JST 2007 matsuyama3@ariel-networks.com > * XMonadContrib.ResizableTile in darcs patch. > > I have fixed error "" to return Nothing. Thanks Andrea. Applied. From sjanssen at cse.unl.edu Mon Oct 1 11:12:23 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Mon Oct 1 11:11:28 2007 Subject: [Xmonad] darcs patch: Tabbed: updated usage information In-Reply-To: <200710011027.l91ARtkN031267@laptop.nowhere.net> References: <200710011027.l91ARtkN031267@laptop.nowhere.net> Message-ID: <200710011012.23375.sjanssen@cse.unl.edu> On Monday 01 October 2007 05:27:55 Andrea Rossato wrote: > I forgot to update usage information of Tabbed after reintroducing the > Shrinker configuration option. > > Andrea > > Mon Oct 1 10:22:19 CEST 2007 Andrea Rossato > * Tabbed: updated usage information Applied. From allbery at ece.cmu.edu Mon Oct 1 11:37:18 2007 From: allbery at ece.cmu.edu (Brandon S. Allbery KF8NH) Date: Mon Oct 1 11:36:21 2007 Subject: [Xmonad] MATLAB and Xmonad In-Reply-To: <20071001140414.GA3037@localhost.localdomain> References: <4700E7E9.8010508@christian-thiemann.de> <20071001140414.GA3037@localhost.localdomain> Message-ID: <6693F77C-9127-4632-83BF-E1B075A72453@ece.cmu.edu> On Oct 1, 2007, at 10:04 , Stefan O'Rear wrote: > On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote: >> It looks like it's a problem with Xmonad. I fired up an Xnest >> with fvwm >> and MATLAB works fine there. And Xnest with wmii and MATLAB works >> as well. > > Is the MATLAB gui written in Java? There is a known bug in the Java > windowing code which prevents it from working correctly with > non-reparenting window managers like xmonad. Yes, the Matlab GUI is Java. Another known workaround that often (but not always, for unknown reasons) works is export AWT_TOOLKIT=MToolkit before starting Java programs. -- 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 From sjanssen at cse.unl.edu Mon Oct 1 12:29:51 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Mon Oct 1 12:29:59 2007 Subject: [Xmonad] darcs patch: set border color more judiciously, so layouts can cust... In-Reply-To: References: Message-ID: <200710011129.51533.sjanssen@cse.unl.edu> On Saturday 29 September 2007 06:48:06 David Roundy wrote: > This does much less resetting of border colors, but in my testing > does enough. The result is that WindowNavigation can display which > neighboring windows can be navigated to by giving them blue (or other) > borders, which seems a bit handy. > > David > > Fri Sep 28 19:53:46 EDT 2007 David Roundy > * set border color more judiciously, so layouts can customize this. Applied. From mail at christian-thiemann.de Mon Oct 1 13:26:46 2007 From: mail at christian-thiemann.de (Christian Thiemann) Date: Mon Oct 1 13:25:46 2007 Subject: [Xmonad] MATLAB and Xmonad In-Reply-To: <6693F77C-9127-4632-83BF-E1B075A72453@ece.cmu.edu> References: <4700E7E9.8010508@christian-thiemann.de> <20071001140414.GA3037@localhost.localdomain> <6693F77C-9127-4632-83BF-E1B075A72453@ece.cmu.edu> Message-ID: <47012DD6.8030707@christian-thiemann.de> Brandon S. Allbery KF8NH wrote: > > On Oct 1, 2007, at 10:04 , Stefan O'Rear wrote: > >> On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote: >>> It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm >>> and MATLAB works fine there. And Xnest with wmii and MATLAB works as >>> well. >> >> Is the MATLAB gui written in Java? There is a known bug in the Java >> windowing code which prevents it from working correctly with >> non-reparenting window managers like xmonad. > > Yes, the Matlab GUI is Java. > > Another known workaround that often (but not always, for unknown > reasons) works is > > export AWT_TOOLKIT=MToolkit > > before starting Java programs. > Ok, great. That worked for me. Thanks. From dons at galois.com Mon Oct 1 17:22:34 2007 From: dons at galois.com (Don Stewart) Date: Mon Oct 1 17:21:59 2007 Subject: [Xmonad] MATLAB and Xmonad In-Reply-To: <47012DD6.8030707@christian-thiemann.de> References: <4700E7E9.8010508@christian-thiemann.de> <20071001140414.GA3037@localhost.localdomain> <6693F77C-9127-4632-83BF-E1B075A72453@ece.cmu.edu> <47012DD6.8030707@christian-thiemann.de> Message-ID: <20071001212234.GD20464@scytale.galois.com> mail: > Brandon S. Allbery KF8NH wrote: > > > >On Oct 1, 2007, at 10:04 , Stefan O'Rear wrote: > > > >>On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote: > >>>It looks like it's a problem with Xmonad. I fired up an Xnest with fvwm > >>>and MATLAB works fine there. And Xnest with wmii and MATLAB works as > >>>well. > >> > >>Is the MATLAB gui written in Java? There is a known bug in the Java > >>windowing code which prevents it from working correctly with > >>non-reparenting window managers like xmonad. > > > >Yes, the Matlab GUI is Java. > > > >Another known workaround that often (but not always, for unknown > >reasons) works is > > > > export AWT_TOOLKIT=MToolkit > > > >before starting Java programs. > > > > Ok, great. That worked for me. Thanks. > _______________________________________________ could someone summarise this issue generically, with the fix details, for the xmonad.org/faq.html page please? -- Don From j at jwebb.sygneca.com Mon Oct 1 20:19:25 2007 From: j at jwebb.sygneca.com (j@jwebb.sygneca.com) Date: Mon Oct 1 20:18:28 2007 Subject: [Xmonad] darcs patch: Fix infinite loop in ResizableTile serialization Message-ID: <20071002001925.8758410071@carbon.sygneca.com> Tue Oct 2 01:12:54 BST 2007 Jamie Webb * Fix infinite loop in ResizableTile serialization -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 56957 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/03e3f475/attachment-0001.bin From j at jwebb.sygneca.com Mon Oct 1 21:45:12 2007 From: j at jwebb.sygneca.com (Jamie Webb) Date: Mon Oct 1 21:44:15 2007 Subject: [Xmonad] darcs patch: An alternative mosaic layout implementation Message-ID: <20071002014512.F297C10071@carbon.sygneca.com> This is a new layout which is very similar to David's Mosaic, but produces different tilings. The algorithm is simpler, but I think it gives more useful results. It divides the space in a more balanced way, in particular trying to avoid very narrow windows. Cheers /J Tue Oct 2 02:17:16 BST 2007 Jamie Webb * An alternative mosaic layout implementation -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 61381 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/f5ce52a4/attachment-0001.bin From mailing_list at istitutocolli.org Tue Oct 2 02:39:44 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Tue Oct 2 02:48:39 2007 Subject: [Xmonad] darcs patch: XUtils: added releaseFont (and 1 more) Message-ID: <200710020639.l926diMw007344@laptop.nowhere.net> hi, some more code cleanup. andrea Tue Oct 2 08:26:40 CEST 2007 Andrea Rossato * XUtils: added releaseFont Tue Oct 2 08:27:09 CEST 2007 Andrea Rossato * Make Tabbed use XUtils.releaseFont -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 58574 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/cd327c4a/attachment-0001.bin From ivan.tarasov at gmail.com Tue Oct 2 03:32:34 2007 From: ivan.tarasov at gmail.com (Ivan Tarasov) Date: Tue Oct 2 03:31:32 2007 Subject: [Xmonad] MATLAB and Xmonad In-Reply-To: <20071001212234.GD20464@scytale.galois.com> References: <4700E7E9.8010508@christian-thiemann.de> <20071001140414.GA3037@localhost.localdomain> <6693F77C-9127-4632-83BF-E1B075A72453@ece.cmu.edu> <47012DD6.8030707@christian-thiemann.de> <20071001212234.GD20464@scytale.galois.com> Message-ID: I'm the author of SetWMName and I can summarise the issue, however I already tried to do this in the comment in the beginning of the SetWMName.hs. If it is not enough, please advice on how to improve the summary. If it is possible, you should use the SetWMName instead of setting AWT_TOOLKIT=MToolkit, because MToolkit (Motif, actually) is an old engine for AWT and it doesn't support all the features needed to make the Java GUI programs work (some programs work, some do not). Setting WM name is quite a dirty hack, but it is the only way to work around the problem till, maybe, JDK7 (and there are no guarantees we'd have anything fixed there). Ivan On 10/2/07, Don Stewart wrote: > > mail: > > Brandon S. Allbery KF8NH wrote: > > > > > >On Oct 1, 2007, at 10:04 , Stefan O'Rear wrote: > > > > > >>On Mon, Oct 01, 2007 at 02:28:25PM +0200, Christian Thiemann wrote: > > >>>It looks like it's a problem with Xmonad. I fired up an Xnest with > fvwm > > >>>and MATLAB works fine there. And Xnest with wmii and MATLAB works as > > >>>well. > > >> > > >>Is the MATLAB gui written in Java? There is a known bug in the Java > > >>windowing code which prevents it from working correctly with > > >>non-reparenting window managers like xmonad. > > > > > >Yes, the Matlab GUI is Java. > > > > > >Another known workaround that often (but not always, for unknown > > >reasons) works is > > > > > > export AWT_TOOLKIT=MToolkit > > > > > >before starting Java programs. > > > > > > > Ok, great. That worked for me. Thanks. > > _______________________________________________ > > could someone summarise this issue generically, with the fix details, > for the xmonad.org/faq.html page please? > > -- Don > _______________________________________________ > Xmonad mailing list > Xmonad@haskell.org > http://www.haskell.org/mailman/listinfo/xmonad > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/xmonad/attachments/20071002/9dc21e40/attachment.htm From droundy at darcs.net Tue Oct 2 10:28:06 2007 From: droundy at darcs.net (David Roundy) Date: Tue Oct 2 10:27:23 2007 Subject: [Xmonad] darcs patch: An alternative mosaic layout implementation In-Reply-To: <20071002014512.F297C10071@carbon.sygneca.com> References: <20071002014512.F297C10071@carbon.sygneca.com> Message-ID: <20071002142806.GH4225@darcs.net> On Tue, Oct 02, 2007 at 02:45:12AM +0100, Jamie Webb wrote: > This is a new layout which is very similar to David's Mosaic, but produces > different tilings. The algorithm is simpler, but I think it gives more useful > results. It divides the space in a more balanced way, in particular trying > to avoid very narrow windows. This looks pretty nice, although it is less flexible. The algorithms that Mosaic uses need to be totally rewritten, but I like the ideas behind them (which is to write down a "goodness" function and then minimize it). The trouble is that discrete minimization is hard... but the real reason that Mosaic has languished is that Combo works better for me. Dynamical tiling just has trouble competing with static tiling intelligently laid out. Particularly when the dynamical tiling is constrained to display all windows--very often there *is* no useful way to display all windows. So if I get around to working on Mosaic again, I'll probably work on finding a way of mingling it with something like Tabbed, so that it can ensure that every visible window is usefully visible (e.g. no xterms less than 80 chars wide or two chars tall, and no emacsen less than 80 chars wide or two dozen chars tall). This will also have the benefit of both making the algorithm faster (fewer windows displayed means exponentially fewer possible tilings) and as a result simpler (e.g. we may be able to try exhaustive search of tilings, provided window areas are kept fixed). The trouble is figuring out which window to hide when the user clicks on one of the tabs. Plus, I don't have much time for xmonad hacking. -- David Roundy Department of Physics Oregon State University From droundy at darcs.net Tue Oct 2 12:41:21 2007 From: droundy at darcs.net (David Roundy) Date: Tue Oct 2 12:40:31 2007 Subject: [Xmonad] darcs patch: some renaming of classes and data types. Message-ID: Hi all, This is a change dons suggested on IRC. David Sat Sep 29 15:13:20 EDT 2007 David Roundy * some renaming of classes and data types. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 9477 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/6c91cbbd/attachment.bin From droundy at darcs.net Tue Oct 2 12:41:26 2007 From: droundy at darcs.net (David Roundy) Date: Tue Oct 2 12:40:37 2007 Subject: [Xmonad] darcs patch: some renaming of classes and data types. Message-ID: Sat Sep 29 15:12:38 EDT 2007 David Roundy * some renaming of classes and data types. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 57773 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/fd73bbaa/attachment-0001.bin From droundy at darcs.net Tue Oct 2 12:48:08 2007 From: droundy at darcs.net (David Roundy) Date: Tue Oct 2 12:47:17 2007 Subject: [Xmonad] darcs patch: some renaming of classes and data types. (and 1 more) Message-ID: Here I fix up Spiral. David Sat Sep 29 15:12:38 EDT 2007 David Roundy * some renaming of classes and data types. Tue Oct 2 12:47:35 EDT 2007 David Roundy * make Spiral work with new layout class. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 61055 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/46bf0f40/attachment-0001.bin From kuser at gmx.de Tue Oct 2 15:06:52 2007 From: kuser at gmx.de (Karsten Schoelzel) Date: Tue Oct 2 15:05:46 2007 Subject: [Xmonad] darcs patch: Add XPropManage, a manageHook using XPro... (and 1 more) Message-ID: <1191352012.0@asus> Tue Oct 2 21:02:31 CEST 2007 Karsten Schoelzel * Add XPropManage, a manageHook using XProperties Tue Oct 2 21:05:26 CEST 2007 Karsten Schoelzel * TagWindows Functions to work with window tags, including a XPrompt interface. These are stored in the window property "_XMONAD_TAGS" Adding also functions shiftHere and shiftToScreen (move to another module?). -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 67884 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/a8c4ec92/attachment-0001.bin From sjanssen at cse.unl.edu Tue Oct 2 14:42:58 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Tue Oct 2 15:29:09 2007 Subject: [Xmonad] darcs patch: Fix infinite loop in ResizableTile serialization In-Reply-To: <20071002001925.8758410071@carbon.sygneca.com> References: <20071002001925.8758410071@carbon.sygneca.com> Message-ID: <200710021342.58619.sjanssen@cse.unl.edu> On Monday 01 October 2007 19:19:25 j@jwebb.sygneca.com wrote: > Tue Oct 2 01:12:54 BST 2007 Jamie Webb > * Fix infinite loop in ResizableTile serialization Applied, thanks. From sjanssen at cse.unl.edu Tue Oct 2 14:44:40 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Tue Oct 2 15:29:10 2007 Subject: [Xmonad] darcs patch: An alternative mosaic layout implementation In-Reply-To: <20071002014512.F297C10071@carbon.sygneca.com> References: <20071002014512.F297C10071@carbon.sygneca.com> Message-ID: <200710021344.40253.sjanssen@cse.unl.edu> On Monday 01 October 2007 20:45:12 Jamie Webb wrote: > This is a new layout which is very similar to David's Mosaic, but produces > different tilings. The algorithm is simpler, but I think it gives more > useful results. It divides the space in a more balanced way, in particular > trying to avoid very narrow windows. > > Cheers > > /J > > Tue Oct 2 02:17:16 BST 2007 Jamie Webb > * An alternative mosaic layout implementation Applied. From droundy at darcs.net Tue Oct 2 16:42:52 2007 From: droundy at darcs.net (David Roundy) Date: Tue Oct 2 16:42:00 2007 Subject: [Xmonad] darcs patch: clean up Config a bit. Message-ID: Tue Oct 2 16:36:36 EDT 2007 David Roundy * clean up Config a bit. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 10237 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/755001ed/attachment.bin From sjanssen at cse.unl.edu Tue Oct 2 16:55:26 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Tue Oct 2 16:57:00 2007 Subject: [Xmonad] darcs patch: some renaming of classes and data types. In-Reply-To: References: Message-ID: <200710021555.26667.sjanssen@cse.unl.edu> On Tuesday 02 October 2007 11:41:21 David Roundy wrote: > Hi all, > > This is a change dons suggested on IRC. > > David > > Sat Sep 29 15:13:20 EDT 2007 David Roundy > * some renaming of classes and data types. Applied. From sjanssen at cse.unl.edu Tue Oct 2 16:55:40 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Tue Oct 2 16:57:08 2007 Subject: [Xmonad] darcs patch: some renaming of classes and data types. In-Reply-To: References: Message-ID: <200710021555.40605.sjanssen@cse.unl.edu> On Tuesday 02 October 2007 11:41:26 David Roundy wrote: > Sat Sep 29 15:12:38 EDT 2007 David Roundy > * some renaming of classes and data types. Applied. From sjanssen at cse.unl.edu Tue Oct 2 16:56:44 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Tue Oct 2 16:58:13 2007 Subject: [Xmonad] darcs patch: some renaming of classes and data types. (and 1 more) In-Reply-To: References: Message-ID: <200710021556.44898.sjanssen@cse.unl.edu> On Tuesday 02 October 2007 11:48:08 David Roundy wrote: > Here I fix up Spiral. > > David > > Sat Sep 29 15:12:38 EDT 2007 David Roundy > * some renaming of classes and data types. > > Tue Oct 2 12:47:35 EDT 2007 David Roundy > * make Spiral work with new layout class. Applied. From sjanssen at cse.unl.edu Tue Oct 2 17:12:53 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Tue Oct 2 17:14:21 2007 Subject: [Xmonad] darcs patch: Add XPropManage, a manageHook using XPro... (and 1 more) In-Reply-To: <1191352012.0@asus> References: <1191352012.0@asus> Message-ID: <200710021612.53166.sjanssen@cse.unl.edu> On Tuesday 02 October 2007 14:06:52 Karsten Schoelzel wrote: > Tue Oct 2 21:02:31 CEST 2007 Karsten Schoelzel > * Add XPropManage, a manageHook using XProperties > > Tue Oct 2 21:05:26 CEST 2007 Karsten Schoelzel > * TagWindows > > Functions to work with window tags, including a XPrompt interface. > These are stored in the window property "_XMONAD_TAGS" > > Adding also functions shiftHere and shiftToScreen (move to another > module?). Applied. From sjanssen at cse.unl.edu Tue Oct 2 17:13:28 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Tue Oct 2 17:14:57 2007 Subject: [Xmonad] darcs patch: clean up Config a bit. In-Reply-To: References: Message-ID: <200710021613.28716.sjanssen@cse.unl.edu> On Tuesday 02 October 2007 15:42:52 David Roundy wrote: > Tue Oct 2 16:36:36 EDT 2007 David Roundy > * clean up Config a bit. Applied. From codesite-noreply at google.com Tue Oct 2 18:04:07 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:03:03 2007 Subject: [Xmonad] Issue 38 in xmonad: Make inserting new windows configurable to left or right of current window Message-ID: <00163600cf97043b89bb6559d423904b@google.com> Issue 38: Make inserting new windows configurable to left or right of current window http://code.google.com/p/xmonad/issues/detail?id=38 Comment #2 by SpencerJanssen: Possible now with manageHooks, something like: manageHook w _ = return W.swapDown -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:05:58 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:04:53 2007 Subject: [Xmonad] Issue 17 in xmonad: User-definable X monad state type Message-ID: <00163600d6b3043b89c20b2f042366a5@google.com> Issue 17: User-definable X monad state type http://code.google.com/p/xmonad/issues/detail?id=17 Comment #7 by SpencerJanssen: Not going to happen for 0.4. Additionally, I don't think there is much demand. We've got a nice system for stateful layouts, which seems to be enough in practice. Issue attribute updates: Labels: -Priority-Medium -Milestone-Release0.4 Priority-Low -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:08:08 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:07:03 2007 Subject: [Xmonad] Issue 4 in xmonad: Separate focus for tiled and floating layers Message-ID: <00c09ffb50dd043b89c9c20b532382db@google.com> Issue 4: Separate focus for tiled and floating layers http://code.google.com/p/xmonad/issues/detail?id=4 Comment #7 by SpencerJanssen: This isn't going to be done for 0.4. Issue attribute updates: Labels: -Milestone-Release0.4 -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:10:59 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:09:54 2007 Subject: [Xmonad] Issue 39 in xmonad: Printing to file from Thunderbird puts critical part of window off-screen Message-ID: <00163600d6b3043b89d3eedb162386f3@google.com> Issue 39: Printing to file from Thunderbird puts critical part of window off-screen http://code.google.com/p/xmonad/issues/detail?id=39 Comment #1 by SpencerJanssen: Floating windows no longer appear offscreen in the head. Issue attribute updates: Status: Fixed -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:12:08 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:11:03 2007 Subject: [Xmonad] Issue 12 in xmonad: Support _NET_WM_STRUT property for status bar programs Message-ID: <00163600d519043b89d81758e72395a8@google.com> Issue 12: Support _NET_WM_STRUT property for status bar programs http://code.google.com/p/xmonad/issues/detail?id=12 Comment #7 by SpencerJanssen: Not 0.4, but we're getting closer and closer. manageHooks opens the way for this to be done in a contributed extension. Issue attribute updates: Labels: -Milestone-Release0.4 -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:14:59 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:13:53 2007 Subject: [Xmonad] Issue 21 in xmonad: StackSet.hs does not compile with Hugs or Yhc Message-ID: <00163600d1b5043b89e241b7c123c8dd@google.com> Issue 21: StackSet.hs does not compile with Hugs or Yhc http://code.google.com/p/xmonad/issues/detail?id=21 Comment #6 by SpencerJanssen: Yhc has too many bugs to keep up with StackSet development. WontFix this bug until Yhc's pattern guards support is better. Issue attribute updates: Status: WontFix -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:16:09 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:15:05 2007 Subject: [Xmonad] Issue 32 in xmonad: gnome-panel take focus when autohide Message-ID: <00163600d6b3043b89e67471f723a878@google.com> Issue 32: gnome-panel take focus when autohide http://code.google.com/p/xmonad/issues/detail?id=32 Comment #3 by SpencerJanssen: I can't reproduce this, the floating code has been changed significantly since July so it may have been fixed. Please re-open this bug if it is still an issue. Issue attribute updates: Status: Fixed -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:20:10 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:19:06 2007 Subject: [Xmonad] Issue 38 in xmonad: Make inserting new windows configurable to left or right of current window Message-ID: <00c09ffb51ed043b89f4d01f4b23f112@google.com> Issue 38: Make inserting new windows configurable to left or right of current window http://code.google.com/p/xmonad/issues/detail?id=38 Comment #3 by SpencerJanssen: Marking fixed. Issue attribute updates: Status: Fixed -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:24:11 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:23:06 2007 Subject: [Xmonad] Issue 48 in xmonad: Changing the set of workspace IDs causes unexpected behavior upon restarting Message-ID: <00163600d6b3043b8a0326f7d423dbd9@google.com> Issue 48: Changing the set of workspace IDs causes unexpected behavior upon restarting http://code.google.com/p/xmonad/issues/detail?id=48 Comment #1 by SpencerJanssen: Fixed in the head. Issue attribute updates: Status: Fixed -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:28:00 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:26:56 2007 Subject: [Xmonad] Issue 41 in xmonad: Border Color is set after Layout is evaluated making custom border coloration schemes impossible. Message-ID: <00c09ffb4bcf043b8a10d1a8fd241386@google.com> Issue 41: Border Color is set after Layout is evaluated making custom border coloration schemes impossible. http://code.google.com/p/xmonad/issues/detail?id=41 Comment #2 by SpencerJanssen: (No comment was entered for this change.) Issue attribute updates: Status: Fixed -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:28:11 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:27:07 2007 Subject: [Xmonad] Issue 42 in xmonad: NoBorders and Xinerama Message-ID: <00163600cf97043b8a117d9d13242959@google.com> Issue 42: NoBorders and Xinerama http://code.google.com/p/xmonad/issues/detail?id=42 Comment #3 by SpencerJanssen: Fixed in the head. Issue attribute updates: Status: Fixed -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:32:12 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:31:07 2007 Subject: [Xmonad] Issue 11 in xmonad: ui idea: user-specified filters to 'manage' Message-ID: <00163600d6b3043b8a1fd04060240b68@google.com> Issue 11: ui idea: user-specified filters to 'manage' http://code.google.com/p/xmonad/issues/detail?id=11 Comment #5 by SpencerJanssen: Done in the head. Issue attribute updates: Status: Fixed -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Tue Oct 2 18:36:12 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Tue Oct 2 18:35:07 2007 Subject: [Xmonad] Issue 41 in xmonad: Border Color is set after Layout is evaluated making custom border coloration schemes impossible. Message-ID: <00c09ffb50dd043b8a2e225306243411@google.com> Issue 41: Border Color is set after Layout is evaluated making custom border coloration schemes impossible. http://code.google.com/p/xmonad/issues/detail?id=41 Comment #1 by SpencerJanssen: Fixed in the head. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From j at jwebb.sygneca.com Tue Oct 2 21:12:36 2007 From: j at jwebb.sygneca.com (Jamie Webb) Date: Tue Oct 2 21:11:36 2007 Subject: [Xmonad] darcs patch: Layout -> LayoutClass for ResizableTile and MosaicAlt Message-ID: <20071003011237.2AD9C1099B@carbon.sygneca.com> Wed Oct 3 02:08:49 BST 2007 Jamie Webb * Layout -> LayoutClass for ResizableTile and MosaicAlt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 56889 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071003/cacf54bf/attachment-0001.bin From j at jwebb.sygneca.com Tue Oct 2 21:21:01 2007 From: j at jwebb.sygneca.com (Jamie Webb) Date: Tue Oct 2 21:19:59 2007 Subject: [Xmonad] darcs patch: Make extra WindowNavigation borders configurable Message-ID: <20071003012101.6AD081099B@carbon.sygneca.com> Personally I find the new highlighting feature more distracting than useful, so this patch adds a parameter to enable/disable it. /J Wed Oct 3 02:07:46 BST 2007 Jamie Webb * Make extra WindowNavigation borders configurable -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 58870 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071003/edd2a1e8/attachment-0001.bin From andrew at swclan.homelinux.org Tue Oct 2 23:22:00 2007 From: andrew at swclan.homelinux.org (Andrew Sackville-West) Date: Tue Oct 2 23:21:14 2007 Subject: [Xmonad] workspace/xinerama confusion Message-ID: <20071003032200.GG7195@localhost.localdomain> Hi list, I am new to xmonad, but am immediately liking it (coming from wmii). I am running debian sid with xmonad 0.3. My dual-head setup is running xinerama but it doesn't seem to behave the way I would expect from the manpage and online stuff. Specifically, when I create a series of windows, xmonad treats the two screens as one very wide screen. So, for example, the first xterm is two screens/monitors wide. The second one causes the screens to split down the middle with one xterm on each screen (monitor that is). The third xterm ends up on the right hand monitor which is split in half to accomodate both xterms. I can navigate between all the windows with mod-k/j, switch windows into the master window with mod-return etc. But this all happens across the two monitors. When I switch to workspace 2 (mod-2) I get a blank screen (as there are no wondows there). switch back with mod-1, mod-shift-2 a window, mod-2 and there it is, two monitors wide. This doesn't seem to jive with what I've read -- that each screen should have its own control and be assigned a different workspace. I suspect I have not configured X properly so here is the likely pertinent portion: Section "ServerLayout" Identifier "X.org Configured" Screen 0 "Screen0" 0 0 Screen 1 "Screen1" RightOf "Screen0" InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" Option "Xinerama" "true" EndSection I will happily provide more detail if needed. What am I missing here? thanks A -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/085b62c0/attachment.bin From me at twifkak.com Tue Oct 2 23:25:08 2007 From: me at twifkak.com (Devin Mullins) Date: Tue Oct 2 23:24:03 2007 Subject: [Xmonad] darcs patch: SwapWorkspaces for XMonadContrib Message-ID: <20071003032508.GA15739@twifkak.com> Ermm.... having personal problems with my Postfix/ISP setup, so I'm hand sending this. Hopefully it's no prob. sometime today me * SwapWorkspaces, so you can move the workspaces around without having to rewire the number keys on your keyboard. -------------- next part -------------- A non-text attachment was scrubbed... Name: darcs.patch Type: text/x-darcs-patch Size: 58910 bytes Desc: not available Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/160be457/darcs-0001.bin From stefanor at cox.net Tue Oct 2 23:27:39 2007 From: stefanor at cox.net (Stefan O'Rear) Date: Tue Oct 2 23:26:38 2007 Subject: [Xmonad] workspace/xinerama confusion In-Reply-To: <20071003032200.GG7195@localhost.localdomain> References: <20071003032200.GG7195@localhost.localdomain> Message-ID: <20071003032739.GA4250@localhost.localdomain> On Tue, Oct 02, 2007 at 08:22:00PM -0700, Andrew Sackville-West wrote: > Specifically, when I create a series of windows, xmonad treats the two > screens as one very wide screen. So, for example, the first xterm is ... > What am I missing here? Probably, your system doesn't have the Xinerama development files installed, so X11-extras built without support. Install them, and do a clean rebuild of X11-extras and xmonad (in that order); you should see a configure message from X11-extras stating that Xinerama headers were found, if not, ask again... sjanssen: This is a frequently asked question, can we have it added to the FAQ? Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/dfbf0bf2/attachment.bin From andrew at swclan.homelinux.org Tue Oct 2 23:46:00 2007 From: andrew at swclan.homelinux.org (Andrew Sackville-West) Date: Tue Oct 2 23:45:00 2007 Subject: [Xmonad] workspace/xinerama confusion In-Reply-To: <20071003032739.GA4250@localhost.localdomain> References: <20071003032200.GG7195@localhost.localdomain> <20071003032739.GA4250@localhost.localdomain> Message-ID: <20071003034600.GH7195@localhost.localdomain> On Tue, Oct 02, 2007 at 08:27:39PM -0700, Stefan O'Rear wrote: > On Tue, Oct 02, 2007 at 08:22:00PM -0700, Andrew Sackville-West wrote: > > Specifically, when I create a series of windows, xmonad treats the two > > screens as one very wide screen. So, for example, the first xterm is > ... > > What am I missing here? > > Probably, your system doesn't have the Xinerama development files > installed, so X11-extras built without support. Install them, and do a > clean rebuild of X11-extras and xmonad (in that order); you should see a > configure message from X11-extras stating that Xinerama headers were > found, if not, ask again... ah ha! like this then: ... checking whether to build Xinerama... yes ... checking X11/extensions/Xinerama.h usability... yes checking X11/extensions/Xinerama.h presence... yes checking for X11/extensions/Xinerama.h... yes ... if it doesn't work, I'll write back. and thanks for a quick and accurate response. FTR, on debian its libxinerama-dev A -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://www.haskell.org/pipermail/xmonad/attachments/20071002/a3e69e38/attachment.bin From sjanssen at cse.unl.edu Wed Oct 3 00:08:42 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Wed Oct 3 00:10:24 2007 Subject: [Xmonad] workspace/xinerama confusion In-Reply-To: <20071003032739.GA4250@localhost.localdomain> References: <20071003032200.GG7195@localhost.localdomain> <20071003032739.GA4250@localhost.localdomain> Message-ID: <200710022308.43028.sjanssen@cse.unl.edu> On Tuesday 02 October 2007 22:27:39 Stefan O'Rear wrote: > On Tue, Oct 02, 2007 at 08:22:00PM -0700, Andrew Sackville-West wrote: > > Specifically, when I create a series of windows, xmonad treats the two > > screens as one very wide screen. So, for example, the first xterm is > > ... > > > What am I missing here? > > Probably, your system doesn't have the Xinerama development files > installed, so X11-extras built without support. Install them, and do a > clean rebuild of X11-extras and xmonad (in that order); you should see a > configure message from X11-extras stating that Xinerama headers were > found, if not, ask again... > > sjanssen: This is a frequently asked question, can we have it added to > the FAQ? > > Stefan Good idea, done. From codesite-noreply at google.com Wed Oct 3 00:30:55 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Wed Oct 3 00:29:50 2007 Subject: [Xmonad] Issue 50 in xmonad: OS X + unclutter == rare "focus lock" Message-ID: <00163600d519043b8f22b8ad792d1112@google.com> Issue 50: OS X + unclutter == rare "focus lock" http://code.google.com/p/xmonad/issues/detail?id=50 New issue report by m...@twifkak.com: What steps will reproduce the problem? 1. Use Apple's X11 in "full screen mode," with xmonad as your WM. 2. Have two windows open, with the focus and the mouse cursor on the first. 3. Run `unclutter &`. 4. Hit Alt-Cmd-A to exit full screen mode, and again to reenter. 5. Wait for unclutter to kick in. 6. Notice that focus shifts to the second, and mod-j/k don't do jack. (Well, they try -- you can see the red box flicker.) Wiggling the mouse cursor wakes it up and all is well. This is against darcs' latest (trunk?) as of now. Issue attributes: Status: New Owner: ---- Labels: Type-Defect Priority-Medium -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Wed Oct 3 00:49:15 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Wed Oct 3 00:48:09 2007 Subject: [Xmonad] Issue 50 in xmonad: OS X + unclutter == rare "focus lock" Message-ID: <00163600d06e043b8f644309b22d920d@google.com> Issue 50: OS X + unclutter == rare "focus lock" http://code.google.com/p/xmonad/issues/detail?id=50 Comment #1 by m...@twifkak.com: D'oh! I forgot to add a couple of important steps: 0. Configure xmonad with a keybinding to spawn "killall unclutter; unclutter" or have dmenu installed and keybound. 4 1/2. Without mousing, restart unclutter (as Step 4 tends to confuse it). That contrived enough? Also probably of note is that after step 4, my mouse cursor is as if the root window had focus (e.g. the cool little X instead of the xterm I beam). -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Wed Oct 3 02:26:17 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Wed Oct 3 02:25:11 2007 Subject: [Xmonad] Issue 50 in xmonad: OS X + unclutter == rare "focus lock" Message-ID: <00c09ffb50dd043b90bf4f1f092fb7c8@google.com> Issue 50: OS X + unclutter == rare "focus lock" http://code.google.com/p/xmonad/issues/detail?id=50 Comment #2 by andrea.rossato: Did you try to reproduce this issue by running unclutter with the grab option? unclutter -grab It seems to me that this report is a duplicate of this: http://code.google.com/p/xmonad/issues/detail?id=45&can=1 which is not a XMonad bug, but an unclutter's one. Andrea -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From mailing_list at istitutocolli.org Wed Oct 3 04:04:38 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Wed Oct 3 04:05:02 2007 Subject: [Xmonad] darcs patch: Make extra WindowNavigation borders configurable In-Reply-To: <20071003012101.6AD081099B@carbon.sygneca.com> References: <20071003012101.6AD081099B@carbon.sygneca.com> Message-ID: <20071003080438.GC22472@laptop.nowhere.net> On Wed, Oct 03, 2007 at 02:21:01AM +0100, Jamie Webb wrote: > Personally I find the new highlighting feature more distracting than useful, so > this patch adds a parameter to enable/disable it. > > /J > > Wed Oct 3 02:07:46 BST 2007 Jamie Webb > * Make extra WindowNavigation borders configurable I have a patch too, but mine is to make borders colors configurable. This would probably solve your problem too, right? I'm going to ask David's opinion too, since h?s the author. Andrea From mailing_list at istitutocolli.org Wed Oct 3 05:04:19 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Wed Oct 3 05:04:27 2007 Subject: [Xmonad] darcs patch: WindowNavigation: add configurable colors and the poss... Message-ID: <200710030904.l9394JUE001104@laptop.nowhere.net> Hi, this incorporates both my job and Jamie's patch to turn off navigation colors. To be applied only with David (and Jamie) approval. Andrea Wed Oct 3 11:00:17 CEST 2007 Andrea Rossato * WindowNavigation: add configurable colors and the possibility to turn them off -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 67132 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071003/6aedbc2e/attachment-0001.bin From daniel.neri at sigicom.se Wed Oct 3 06:10:14 2007 From: daniel.neri at sigicom.se (Daniel Neri) Date: Wed Oct 3 06:09:10 2007 Subject: [Xmonad] darcs patch: export constructor to make ThreeColumns layout usable ... Message-ID: <20071003101014.4074.qmail@dual.hq.sigicom.net> Wed Oct 3 11:31:03 CEST 2007 Daniel Neri * export constructor to make ThreeColumns layout usable again -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 56831 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071003/d876b1ab/attachment-0001.bin From droundy at darcs.net Wed Oct 3 09:11:37 2007 From: droundy at darcs.net (David Roundy) Date: Wed Oct 3 09:10:36 2007 Subject: [Xmonad] darcs patch: WindowNavigation: add configurable colors and the poss... In-Reply-To: <200710030904.l9394JUE001104@laptop.nowhere.net> References: <200710030904.l9394JUE001104@laptop.nowhere.net> Message-ID: <20071003131136.GI4225@darcs.net> On Wed, Oct 03, 2007 at 11:04:19AM +0200, Andrea Rossato wrote: > Hi, > > this incorporates both my job and Jamie's patch to turn off navigation > colors. > > To be applied only with David (and Jamie) approval. Approved. But I've a few ideas for improvements (see below). > Wed Oct 3 11:00:17 CEST 2007 Andrea Rossato > * WindowNavigation: add configurable colors and the possibility to turn them off > +data WNConfig = > + WNC { showNavigable :: Bool > + , upColor :: String > + , downColor :: String > + , leftColor :: String > + , rightColor :: String > + } deriving (Show, Read) > + > +defaultWNConfig :: WNConfig > +defaultWNConfig = WNC True "#0000FF" "#00FFFF" "#FF0000" "#FF00FF" I definitely vote for a more muted default. I set this gaudy color arrangement only for the purpose of debugging a situation where a wrong window was getting colored. I think the original suggester's idea of a muted red would be reasonable. Even better would be an automatic weighted average of borderNormal and borderFocussed (as the default). This would require something like: data WNConfig = WNC { showNavigable :: Bool , averageFocusAndNormal :: Double , upColor :: String , downColor :: String , leftColor :: String , rightColor :: String } deriving (Show, Read) Note that this average idea could be tricky. If both colors are of the form "#00ff00", then it's easy, we convert to three Ints and back. Otherwise, I think we'd have to involve X to compute the color values, and I'm not sure how to do that. I was also thinking that a couple of exported WNConfigs would be handy: noNavigateBorders :: WNConfig navigateColor :: String -> WNConfig etc. So that in common cases, user won't have to fool with fields of the structure. I also wouldn't mind (unless we've got a user interested in the multi-color option) going with a single configurable border color. In fact, I think it'd be ideal to avoid exporting the WNConfig constructor at all. But for now, I'd just go with your patch. -- David Roundy Department of Physics Oregon State University From codesite-noreply at google.com Wed Oct 3 09:48:52 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Wed Oct 3 09:47:45 2007 Subject: [Xmonad] Issue 50 in xmonad: OS X + unclutter == rare "focus lock" Message-ID: <00163600d1b5043b96ee1c3ddb39e79d@google.com> Issue 50: OS X + unclutter == rare "focus lock" http://code.google.com/p/xmonad/issues/detail?id=50 Comment #3 by m...@twifkak.com: How right you are. Sorry about the dupe. I don't see a 'Closed' button, but I'd press it if I did. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From codesite-noreply at google.com Wed Oct 3 10:50:39 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Wed Oct 3 10:49:33 2007 Subject: [Xmonad] Issue 50 in xmonad: OS X + unclutter == rare "focus lock" Message-ID: <00163600d1b5043b97cb117d403ac830@google.com> Issue 50: OS X + unclutter == rare "focus lock" http://code.google.com/p/xmonad/issues/detail?id=50 Comment #4 by SpencerJanssen: Just change the 'Status' field. I changed it to 'Duplicate' since we've seen this in bug #45 Issue attribute updates: Status: Duplicate -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From droundy at darcs.net Wed Oct 3 11:23:14 2007 From: droundy at darcs.net (David Roundy) Date: Wed Oct 3 11:22:21 2007 Subject: [Xmonad] darcs patch: WindowNavigation: add configurable color... (and 1 more) Message-ID: Hi all, Here's an extension to allow swapping of windows based on their placement on-screen. Basically, it's a replacement for swapUp/Down, except that it won't allow swapping with currently-hidden windows. On the other hand, swapping with hidden windows is perhaps not quite such a hugely important feature. David Wed Oct 3 05:00:17 EDT 2007 Andrea Rossato * WindowNavigation: add configurable colors and the possibility to turn them off Wed Oct 3 11:17:55 EDT 2007 David Roundy * add swapping capability in WindowNavigation. This allows you to reorder your windows geometrically, by swapping the currently focussed window with ones that are up/down/right/left of it. The idea is that we should be able to manipulate windows based on the visual layout of the screen rather than some (possibly obscure) logical ordering. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 70336 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071003/49adb3bd/attachment-0001.bin From j at jwebb.sygneca.com Wed Oct 3 11:37:38 2007 From: j at jwebb.sygneca.com (Jamie Webb) Date: Wed Oct 3 11:36:34 2007 Subject: [Xmonad] darcs patch: WindowNavigation: add configurable colors and the poss... In-Reply-To: <200710030904.l9394JUE001104@laptop.nowhere.net> References: <200710030904.l9394JUE001104@laptop.nowhere.net> Message-ID: <20071003163738.429d071d@carbon.sygneca.com> On 2007-10-03 11:04:19 Andrea Rossato wrote: > Hi, > > this incorporates both my job and Jamie's patch to turn off navigation > colors. > > To be applied only with David (and Jamie) approval. Looks good to me! /J From sjanssen at cse.unl.edu Wed Oct 3 12:32:14 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Wed Oct 3 12:33:54 2007 Subject: [Xmonad] darcs patch: Layout -> LayoutClass for ResizableTile and MosaicAlt In-Reply-To: <20071003011237.2AD9C1099B@carbon.sygneca.com> References: <20071003011237.2AD9C1099B@carbon.sygneca.com> Message-ID: <200710031132.14469.sjanssen@cse.unl.edu> On Tuesday 02 October 2007 20:12:36 Jamie Webb wrote: > Wed Oct 3 02:08:49 BST 2007 Jamie Webb > * Layout -> LayoutClass for ResizableTile and MosaicAlt Applied. From sjanssen at cse.unl.edu Wed Oct 3 12:35:33 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Wed Oct 3 12:36:59 2007 Subject: [Xmonad] darcs patch: SwapWorkspaces for XMonadContrib In-Reply-To: <20071003032508.GA15739@twifkak.com> References: <20071003032508.GA15739@twifkak.com> Message-ID: <200710031135.33884.sjanssen@cse.unl.edu> On Tuesday 02 October 2007 22:25:08 Devin Mullins wrote: > Ermm.... having personal problems with my Postfix/ISP setup, so I'm hand > sending this. Hopefully it's no prob. No problem. > sometime today me > * SwapWorkspaces, so you can move the workspaces around without having > to rewire the number keys on your keyboard. Applied, thanks. From sjanssen at cse.unl.edu Wed Oct 3 12:36:13 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Wed Oct 3 12:37:38 2007 Subject: [Xmonad] darcs patch: WindowNavigation: add configurable colors and the poss... In-Reply-To: <200710030904.l9394JUE001104@laptop.nowhere.net> References: <200710030904.l9394JUE001104@laptop.nowhere.net> Message-ID: <200710031136.13183.sjanssen@cse.unl.edu> On Wednesday 03 October 2007 04:04:19 Andrea Rossato wrote: > Hi, > > this incorporates both my job and Jamie's patch to turn off navigation > colors. > > To be applied only with David (and Jamie) approval. > > Andrea > > Wed Oct 3 11:00:17 CEST 2007 Andrea Rossato > * WindowNavigation: add configurable colors and the possibility to turn > them off Applied. From sjanssen at cse.unl.edu Wed Oct 3 12:36:54 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Wed Oct 3 12:38:19 2007 Subject: [Xmonad] darcs patch: Make extra WindowNavigation borders configurable In-Reply-To: <20071003012101.6AD081099B@carbon.sygneca.com> References: <20071003012101.6AD081099B@carbon.sygneca.com> Message-ID: <200710031136.54873.sjanssen@cse.unl.edu> On Tuesday 02 October 2007 20:21:01 Jamie Webb wrote: > Personally I find the new highlighting feature more distracting than > useful, so this patch adds a parameter to enable/disable it. > > /J > > Wed Oct 3 02:07:46 BST 2007 Jamie Webb > * Make extra WindowNavigation borders configurable I've applied Andrea's patch instead, which seems to have similar functionality. From j at jwebb.sygneca.com Wed Oct 3 12:40:28 2007 From: j at jwebb.sygneca.com (Jamie Webb) Date: Wed Oct 3 12:39:24 2007 Subject: [Xmonad] darcs patch: An alternative mosaic layout implementation In-Reply-To: <20071002142806.GH4225@darcs.net> References: <20071002014512.F297C10071@carbon.sygneca.com> <20071002142806.GH4225@darcs.net> Message-ID: <20071003174028.294a1b79@carbon.sygneca.com> On 2007-10-02 07:28:06 David Roundy wrote: > On Tue, Oct 02, 2007 at 02:45:12AM +0100, Jamie Webb wrote: > > This is a new layout which is very similar to David's Mosaic, but > > produces different tilings. The algorithm is simpler, but I think > > it gives more useful results. It divides the space in a more > > balanced way, in particular trying to avoid very narrow windows. > > This looks pretty nice, although it is less flexible. The algorithms > that Mosaic uses need to be totally rewritten, but I like the ideas > behind them (which is to write down a "goodness" function and then > minimize it). The trouble is that discrete minimization is hard... Mmm... makes sense, though I wonder if it's not an unnecessarily general problem. I've had a bit more of a play and I think I have a reasonable compromise: I break the windows into an arbitrary area-balanced tree as before, but then I use the minimisation approach to select the screen divisions. The tree constraint means that I can do it exhaustively in quadratic time, which should be easily fast enough for reasonable numbers of windows. The results are presumably not always optimal, but they seem to be pretty good. The main disadvantage is that windows jump about a lot as the layout changes. I've also made the target aspect ratio modifiable for each window. The trouble is that this is fine for xterms and the like, and it seems like it /can/ give good results for other sorts of windows, but too much fiddling with areas/aspects is often required: it would be easier to drag borders about. It needs to select more sensible defaults based on the window type. Maybe it can use the geometry that the application initially asks for? I'm not sure how to do that. > but the real reason that Mosaic has languished is that Combo works > better for me. Dynamical tiling just has trouble competing with > static tiling intelligently laid out. Particularly when the dynamical > tiling is constrained to display all windows--very often there *is* > no useful way to display all windows. Yes, I was pretty happy with Ion for something like five years until I found Xmonad a few days ago, and I still think Ion's model probably works better overall, at least for now. A WM that's so easy to hack on was just too tempting though... I think MosaicAlt works very well for a suitable number of xterms, and passably for some other cases. Aside from that I'm mostly using a fullscreen Tabbed at the moment. I'm also using a Combo of ResizableTile and Tabbed sometimes, but I'm not entirely happy with it: as you say, there's difficulty in getting the right set of windows visible. Perhaps you have a better setup than mine? Do you mind posting your layout config? At the moment, my feeling is that it would be better if the user were able to move windows manually between Combo sub-layouts, rather than just assigning a fixed number to each one. > So if I get around to working on Mosaic again, I'll probably work on > finding a way of mingling it with something like Tabbed, so that it > can ensure that every visible window is usefully visible (e.g. no > xterms less than 80 chars wide or two chars tall, and no emacsen less > than 80 chars wide or two dozen chars tall). This will also have the > benefit of both making the algorithm faster (fewer windows displayed > means exponentially fewer possible tilings) and as a result simpler > (e.g. we may be able to try exhaustive search of tilings, provided > window areas are kept fixed). The trouble is figuring out which > window to hide when the user clicks on one of the tabs. Plus, I > don't have much time for xmonad hacking. That sounds nice, but I imagine that it might be an impossible task to usefully guess which windows the user is looking at. Let me know if you have any ideas, and I may have a go. Cheers /J From sjanssen at cse.unl.edu Wed Oct 3 12:38:04 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Wed Oct 3 12:39:31 2007 Subject: [Xmonad] darcs patch: export constructor to make ThreeColumns layout usable ... In-Reply-To: <20071003101014.4074.qmail@dual.hq.sigicom.net> References: <20071003101014.4074.qmail@dual.hq.sigicom.net> Message-ID: <200710031138.04971.sjanssen@cse.unl.edu> On Wednesday 03 October 2007 05:10:14 Daniel Neri wrote: > Wed Oct 3 11:31:03 CEST 2007 Daniel Neri > * export constructor to make ThreeColumns layout usable again Oops! Applied. From j at jwebb.sygneca.com Wed Oct 3 12:41:09 2007 From: j at jwebb.sygneca.com (Jamie Webb) Date: Wed Oct 3 12:40:08 2007 Subject: [Xmonad] darcs patch: MosaicAlt take 2 Message-ID: <20071003164109.A700C1099B@carbon.sygneca.com> Smarter MosaicAlt, per my reply to David. Wed Oct 3 17:25:33 BST 2007 Jamie Webb * MosaicAlt take 2 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 63884 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071003/c3c57ebc/attachment-0001.bin From sjanssen at cse.unl.edu Wed Oct 3 12:39:23 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Wed Oct 3 12:40:49 2007 Subject: [Xmonad] darcs patch: WindowNavigation: add configurable color... (and 1 more) In-Reply-To: References: Message-ID: <200710031139.23546.sjanssen@cse.unl.edu> On Wednesday 03 October 2007 10:23:14 David Roundy wrote: > Hi all, > > Here's an extension to allow swapping of windows based on their > placement on-screen. Basically, it's a replacement for swapUp/Down, > except that it won't allow swapping with currently-hidden windows. > On the other hand, swapping with hidden windows is perhaps not quite > such a hugely important feature. > > David > > Wed Oct 3 05:00:17 EDT 2007 Andrea Rossato > * WindowNavigation: add configurable colors and the possibility to turn > them off > > Wed Oct 3 11:17:55 EDT 2007 David Roundy > * add swapping capability in WindowNavigation. > This allows you to reorder your windows geometrically, by > swapping the currently focussed window with ones that are > up/down/right/left of it. The idea is that we should be > able to manipulate windows based on the visual layout of > the screen rather than some (possibly obscure) logical ordering. Applied. From sjanssen at cse.unl.edu Wed Oct 3 12:49:40 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Wed Oct 3 12:51:07 2007 Subject: [Xmonad] darcs patch: MosaicAlt take 2 In-Reply-To: <20071003164109.A700C1099B@carbon.sygneca.com> References: <20071003164109.A700C1099B@carbon.sygneca.com> Message-ID: <200710031149.40989.sjanssen@cse.unl.edu> On Wednesday 03 October 2007 11:41:09 Jamie Webb wrote: > Smarter MosaicAlt, per my reply to David. > > Wed Oct 3 17:25:33 BST 2007 Jamie Webb > * MosaicAlt take 2 Applied. From j at jwebb.sygneca.com Wed Oct 3 12:58:30 2007 From: j at jwebb.sygneca.com (Jamie Webb) Date: Wed Oct 3 12:57:30 2007 Subject: [Xmonad] darcs patch: Rename ResizableTile.Tall to ResizableTall Message-ID: <20071003165830.DCEE21099B@carbon.sygneca.com> Wed Oct 3 03:30:00 BST 2007 Jamie Webb * Rename ResizableTile.Tall to ResizableTall Having two layouts named Tall was upsetting the deserialization code. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 59888 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071003/971d2365/attachment-0001.bin From droundy at darcs.net Wed Oct 3 13:07:51 2007 From: droundy at darcs.net (David Roundy) Date: Wed Oct 3 13:06:50 2007 Subject: [Xmonad] darcs patch: An alternative mosaic layout implementation In-Reply-To: <20071003174028.294a1b79@carbon.sygneca.com> References: <20071002014512.F297C10071@carbon.sygneca.com> <20071002142806.GH4225@darcs.net> <20071003174028.294a1b79@carbon.sygneca.com> Message-ID: <20071003170749.GK4225@darcs.net> On Wed, Oct 03, 2007 at 05:40:28PM +0100, Jamie Webb wrote: > On 2007-10-02 07:28:06 David Roundy wrote: > > On Tue, Oct 02, 2007 at 02:45:12AM +0100, Jamie Webb wrote: > > > This is a new layout which is very similar to David's Mosaic, but > > > produces different tilings. The algorithm is simpler, but I think > > > it gives more useful results. It divides the space in a more > > > balanced way, in particular trying to avoid very narrow windows. > > > > This looks pretty nice, although it is less flexible. The algorithms > > that Mosaic uses need to be totally rewritten, but I like the ideas > > behind them (which is to write down a "goodness" function and then > > minimize it). The trouble is that discrete minimization is hard... > > Mmm... makes sense, though I wonder if it's not an unnecessarily > general problem. I've had a bit more of a play and I think I have a > reasonable compromise: I break the windows into an arbitrary > area-balanced tree as before, but then I use the minimisation approach > to select the screen divisions. The tree constraint means that I can do > it exhaustively in quadratic time, which should be easily fast enough > for reasonable numbers of windows. > > The results are presumably not always optimal, but they seem to be > pretty good. The main disadvantage is that windows jump about a lot as > the layout changes. Sounds like a neat approach. Jumping windows is an almost-unavoidable side-effect of the mosaic-style layout. It's lessened if you always put larger windows to the left/top when possible (if the user defines a continuum of window areas). > I've also made the target aspect ratio modifiable for each window. Yay! > The trouble is that this is fine for xterms and the like, and it seems > like it /can/ give good results for other sorts of windows, but too much > fiddling with areas/aspects is often required: it would be easier to > drag borders about. It needs to select more sensible defaults based on > the window type. Maybe it can use the geometry that the application > initially asks for? I'm not sure how to do that. Yeah, using window hints was definitely in my plans for mosaic. I know there are places where you can find examples of window hints code, and that's what I'd do for some of these properties. Also I'd like a property (per window) of "min/max width" "min/max height" etc, which would mesh well with hints. I think you could adjust this (in principle) by key combinations + dragging borders, but probably you'd mostly want it set by manageHook, so all xterms start out with appropriate minimum dimensions. > > but the real reason that Mosaic has languished is that Combo works > > better for me. Dynamical tiling just has trouble competing with > > static tiling intelligently laid out. Particularly when the dynamical > > tiling is constrained to display all windows--very often there *is* > > no useful way to display all windows. > > Yes, I was pretty happy with Ion for something like five years until I > found Xmonad a few days ago, and I still think Ion's model probably > works better overall, at least for now. A WM that's so easy to hack on > was just too tempting though... > > I think MosaicAlt works very well for a suitable number of xterms, > and passably for some other cases. Aside from that I'm mostly using a > fullscreen Tabbed at the moment. > > I'm also using a Combo of ResizableTile and Tabbed sometimes, but I'm > not entirely happy with it: as you say, there's difficulty in getting > the right set of windows visible. Perhaps you have a better setup than > mine? Do you mind posting your layout config? I just have two layouts at the moment, fullscreen tabbed and ,Layout $ combo (combo (Mirror $ TwoPane 0.03 0.8) [(Layout $ TwoPane 0.03 0.8,1) ,(Layout Square,1)]) [(mytab,8),(mytab,30),(mytab,1)] The square is because I prefer to keep an xclock visible at all times. Basically, this gives me a big window (I've got a 1024x768 laptop screen) for editing and a little one for a shell (for compiling, usually), and tabs all round so I can view lots of windows. I'd use a different setup with a bigger screen, where I could put two useful windows (other than an xclock) side-by-side. > At the moment, my feeling is that it would be better if the user were > able to move windows manually between Combo sub-layouts, rather than > just assigning a fixed number to each one. Yeah, Combo could be extended in this direction, which would be good. Basically we could keep the current data structure, but add messages that would have the effect of changing the number of windows shown in each sublayout. One trickiness would be figuring out how to handle nested combos (i.e. to send the messages to the "right" layout). And we'd want to have Combo probably synchronize changing the number in each sublayout with a reordering of windows. This might be done something like the new Swap message in WindowNavigation. But ultimately, I think we'll be heading towards insanity if we're forced to emulate all nested-stack transformations in Combo. Proper handling of the float layer requires nested stacks (in my opinion), and I'm hoping that by adding this support we can sneak nested stacks into the core. > > So if I get around to working on Mosaic again, I'll probably work on > > finding a way of mingling it with something like Tabbed, so that it > > can ensure that every visible window is usefully visible (e.g. no > > xterms less than 80 chars wide or two chars tall, and no emacsen less > > than 80 chars wide or two dozen chars tall). This will also have the > > benefit of both making the algorithm faster (fewer windows displayed > > means exponentially fewer possible tilings) and as a result simpler > > (e.g. we may be able to try exhaustive search of tilings, provided > > window areas are kept fixed). The trouble is figuring out which > > window to hide when the user clicks on one of the tabs. Plus, I > > don't have much time for xmonad hacking. > > That sounds nice, but I imagine that it might be an impossible > task to usefully guess which windows the user is looking at. Let me > know if you have any ideas, and I may have a go. Right, you can't figure out what windows they're looking at, but you could display, for example, the N windows that most recently had focus. And you could add a message that will ensure that the currently focussed window always remains visible (for something like an xclock that you want to see, but don't want to focus, or a kpdf set on autorefresh displaying the paper you're working on). -- David Roundy Department of Physics Oregon State University From mailing_list at istitutocolli.org Wed Oct 3 13:14:43 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Wed Oct 3 13:34:32 2007 Subject: [Xmonad] darcs patch: WindowNavigation: add configurable colors and the poss... In-Reply-To: <20071003131136.GI4225@darcs.net> References: <200710030904.l9394JUE001104@laptop.nowhere.net> <20071003131136.GI4225@darcs.net> Message-ID: <20071003171443.GE22472@laptop.nowhere.net> On Wed, Oct 03, 2007 at 06:11:37AM -0700, David Roundy wrote: > muted red would be reasonable. Even better would be an automatic weighted > average of borderNormal and borderFocussed (as the default). This would > require something like: > > data WNConfig = > WNC { showNavigable :: Bool > , averageFocusAndNormal :: Double [...] > > Note that this average idea could be tricky. If both colors are of the > form "#00ff00", then it's easy, we convert to three Ints and back. > Otherwise, I think we'd have to involve X to compute the color values, and > I'm not sure how to do that. I don't thin I've already understood this weighted average stuff but it sounds cool and I'll try to implement it. Actually I'm going to put it on my TODO list... the best I can do right now. > > I was also thinking that a couple of exported WNConfigs would be handy: The rest of you requests seem very useful to me to and I'm going to send a patch soon. Andrea From droundy at darcs.net Wed Oct 3 14:55:56 2007 From: droundy at darcs.net (David Roundy) Date: Wed Oct 3 14:54:56 2007 Subject: [Xmonad] darcs patch: WindowNavigation: add configurable colors and the poss... In-Reply-To: <20071003171443.GE22472@laptop.nowhere.net> References: <200710030904.l9394JUE001104@laptop.nowhere.net> <20071003131136.GI4225@darcs.net> <20071003171443.GE22472@laptop.nowhere.net> Message-ID: <20071003185555.GL4225@darcs.net> On Wed, Oct 03, 2007 at 07:14:43PM +0200, Andrea Rossato wrote: > On Wed, Oct 03, 2007 at 06:11:37AM -0700, David Roundy wrote: > > muted red would be reasonable. Even better would be an automatic weighted > > average of borderNormal and borderFocussed (as the default). This would > > require something like: > > > > data WNConfig = > > WNC { showNavigable :: Bool > > , averageFocusAndNormal :: Double > [...] > > > > Note that this average idea could be tricky. If both colors are of the > > form "#00ff00", then it's easy, we convert to three Ints and back. > > Otherwise, I think we'd have to involve X to compute the color values, and > > I'm not sure how to do that. > > I don't thin I've already understood this weighted average stuff but > it sounds cool and I'll try to implement it. Actually I'm going to put > it on my TODO list... the best I can do right now. My idea is that if we can write functions like redComponent :: Color -> Double -- ranges from zero to one greenComponent :: Color -> Double -- ranges from zero to one blueComponent :: Color -> Double -- ranges from zero to one newColor :: Double -> Double -> Double -> X Color -- rgb then we could do something like: do fc <- asks focusedBorder nc <- asks normalBorder let f = max 1 $ min 0 $ frac n = 1 - f combine comp = f*(comp fc) + n*(comp nc) defaultBorder <- newColor (combine redComponent) (combine greenComponent) (combine blueComponent) But I'm not sure how to extract the components of a color. Constructing a new color with given components seems relatively easy, just by printing the values out as a hex string. > > I was also thinking that a couple of exported WNConfigs would be handy: > > The rest of you requests seem very useful to me to and I'm going to > send a patch soon. That'd be great! -- David Roundy Department of Physics Oregon State University From droundy at darcs.net Wed Oct 3 14:57:56 2007 From: droundy at darcs.net (David Roundy) Date: Wed Oct 3 14:56:56 2007 Subject: [Xmonad] darcs patch: Tabbed: removed two little bugs due to t... (and 5 more) In-Reply-To: <200709281903.l8SJ3q0W025008@laptop.nowhere.net> References: <200709281903.l8SJ3q0W025008@laptop.nowhere.net> Message-ID: <20071003185756.GM4225@darcs.net> On Fri, Sep 28, 2007 at 09:03:52PM +0200, Andrea Rossato wrote: > Hi, > > this is the invisible data type, plus the related updates to Tabbed, > DragPane and WindowNavigation. > > David, is this what you mean? Yeah, it looks great. :) -- David Roundy Department of Physics Oregon State University From quancta at gmail.com Wed Oct 3 18:23:36 2007 From: quancta at gmail.com (=?ISO-8859-1?Q?Qu=E2n_Ta?=) Date: Wed Oct 3 18:22:30 2007 Subject: [Xmonad] cut & paste between xmonad and macosx appl Message-ID: Hi, I've been running xmonad on my macbook pro for a week now, and I really like it. The only knack I have is that cut-and-paste between mac appl to xterm/urxvt and vice versa stop working. Does anyone running xmonad on macosx 10.4 having this problem? Or did I overlooked something in my setup? I've tried different setting in my X11 prefs without effect. Hope someone can give me some leads. TIA, Quan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/xmonad/attachments/20071003/7edd8c59/attachment.htm From allbery at ece.cmu.edu Wed Oct 3 18:28:04 2007 From: allbery at ece.cmu.edu (Brandon S. Allbery KF8NH) Date: Wed Oct 3 18:26:59 2007 Subject: [Xmonad] cut & paste between xmonad and macosx appl In-Reply-To: References: Message-ID: <31A90C9E-5B60-4185-B478-E8B3AF1A36BF@ece.cmu.edu> On Oct 3, 2007, at 18:23 , Qu?n Ta wrote: > I've been running xmonad on my macbook pro for a week now, and I > really like it. The only knack I have is that cut-and-paste > between mac appl to xterm/urxvt and vice versa stop working. > > Does anyone running xmonad on macosx 10.4 having this problem? Or > did I overlooked something in my setup? I've tried different > setting in my X11 prefs without effect. Hope someone can give me > some leads. Cut and paste in XDarwin has always been iffy for me; I have seen claims that it is a bug that was introduced back in 10.2. -- 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 From quancta at gmail.com Wed Oct 3 20:56:28 2007 From: quancta at gmail.com (=?ISO-8859-1?Q?Qu=E2n_Ta?=) Date: Wed Oct 3 20:55:20 2007 Subject: [Xmonad] cut & paste between xmonad and macosx appl In-Reply-To: <31A90C9E-5B60-4185-B478-E8B3AF1A36BF@ece.cmu.edu> References: <31A90C9E-5B60-4185-B478-E8B3AF1A36BF@ece.cmu.edu> Message-ID: I should have read the manpage for quartz-wm carefully! quartz-wm have the option --only-proxy, which make it act as a bridge between the pasteboard and X server clipboard, without getting in the way of managing the display. adding: "quartz-wm --only-proxy &" to my .xinitrc solve the problem. Happy XMonad! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/xmonad/attachments/20071003/d1e5cdf3/attachment.htm From emertens at galois.com Wed Oct 3 21:16:50 2007 From: emertens at galois.com (Eric Mertens) Date: Wed Oct 3 21:17:11 2007 Subject: [Xmonad] [SPAM] Add ^K and ^U support to XPrompt Message-ID: <20071003181650.1d956206@laptop.localdomain> Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1353 bytes Desc: not available Url : http://www.haskell.org/pipermail/xmonad/attachments/20071003/71da2ba4/smime-0001.bin From me at twifkak.com Wed Oct 3 21:49:18 2007 From: me at twifkak.com (Devin Mullins) Date: Wed Oct 3 21:48:10 2007 Subject: [Xmonad] cut & paste between xmonad and macosx appl In-Reply-To: References: <31A90C9E-5B60-4185-B478-E8B3AF1A36BF@ece.cmu.edu> Message-ID: <20071004014918.GB17924@twifkak.com> On Wed, Oct 03, 2007 at 05:56:28PM -0700, Qu?n Ta wrote: > I should have read the manpage for quartz-wm carefully! quartz-wm have the > option --only-proxy, which make it act as a bridge between the pasteboard > and X server clipboard, without getting in the way of managing the display. > > adding: "quartz-wm --only-proxy &" to my .xinitrc solve the problem. Yup! Two other potentially useful Mac-related things: * if you use unclutter, use the -grab option (thanks andrea :) * if you're looking to bind to the Cmd key, map it to mod4 (dunno why, but I couldn't get it working on mod2...) devin From j at jwebb.sygneca.com Thu Oct 4 03:19:49 2007 From: j at jwebb.sygneca.com (Jamie Webb) Date: Thu Oct 4 03:18:45 2007 Subject: [Xmonad] darcs patch: Maximize layout modifier Message-ID: <20071004071949.4204910033@carbon.sygneca.com> Another extension: this one allows the focused window to be temporarily yanked out of the layout to mostly fill the screen. Cheers /J Thu Oct 4 07:12:02 BST 2007 Jamie Webb * Maximize layout modifier -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 60973 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071004/09370465/attachment-0001.bin From me at twifkak.com Thu Oct 4 04:02:53 2007 From: me at twifkak.com (Devin Mullins) Date: Thu Oct 4 04:01:50 2007 Subject: [Xmonad] darcs patch: extract Properties module for re-use by contrib tests Message-ID: <20071004080253.D261059C931@mail.comcast.net> Thu Oct 4 03:58:52 EDT 2007 Devin Mullins * extract Properties module for re-use by contrib tests I want to reuse Properties' Arbitrary instance (as well as the T and NonNegative types) in an upcoming set of SwapWorkspaces QC props. `module Main where import Main` doesn't work too well. :) If this patch is accepted, the darcs 'test' pref should be modified to "-itests tests/Main.hs". -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 10947 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071004/d9b5f9d3/attachment.bin From me at twifkak.com Thu Oct 4 04:18:59 2007 From: me at twifkak.com (Devin Mullins) Date: Thu Oct 4 04:17:55 2007 Subject: [Xmonad] darcs patch: add man page doco (and 1 more) Message-ID: <20071004081859.A0D7E59CA66@mail.comcast.net> Thu Oct 4 04:15:04 EDT 2007 Devin Mullins * add man page doco Thu Oct 4 04:15:34 EDT 2007 Devin Mullins * add QC tests for SwapWorkspaces run with -i..:../tests -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 61170 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071004/fc6c0b7a/attachment-0001.bin From codesite-noreply at google.com Thu Oct 4 05:16:10 2007 From: codesite-noreply at google.com (codesite-noreply@google.com) Date: Thu Oct 4 05:15:01 2007 Subject: [Xmonad] Issue 51 in xmonad: amsn crashes when a contact tries to open a dialog Message-ID: <00163600d6b3043ba73cb41df553c7b3@google.com> Issue 51: amsn crashes when a contact tries to open a dialog http://code.google.com/p/xmonad/issues/detail?id=51 New issue report by nomorecolors: What steps will reproduce the problem? 1. open amsn and log in 2. wait for somebody to contact you 3. kaboom! What is the expected output? What do you see instead? a new window is supposed to pop-up. What version of the product are you using? On what operating system? I am using amsn v.0.97RC1. It works perfectly fine under dwm and wmii. Please provide any additional information below. I am using xmonad 0.3. Issue attributes: Status: New Owner: ---- Labels: Type-Defect Priority-Medium -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings From sjanssen at cse.unl.edu Thu Oct 4 15:35:35 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Thu Oct 4 15:37:00 2007 Subject: [Xmonad] [SPAM] Add ^K and ^U support to XPrompt In-Reply-To: <20071003181650.1d956206@laptop.localdomain> References: <20071003181650.1d956206@laptop.localdomain> Message-ID: <200710041435.35586.sjanssen@cse.unl.edu> On Wednesday 03 October 2007 20:16:50 Eric Mertens wrote: > Hello, > > Please consider this patch for inclusion in XMonadContrib. Applied. From sjanssen at cse.unl.edu Thu Oct 4 15:36:35 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Thu Oct 4 15:38:00 2007 Subject: [Xmonad] darcs patch: Maximize layout modifier In-Reply-To: <20071004071949.4204910033@carbon.sygneca.com> References: <20071004071949.4204910033@carbon.sygneca.com> Message-ID: <200710041436.35373.sjanssen@cse.unl.edu> On Thursday 04 October 2007 02:19:49 Jamie Webb wrote: > Another extension: this one allows the focused window to be temporarily > yanked out of the layout to mostly fill the screen. > > Cheers > > /J > > Thu Oct 4 07:12:02 BST 2007 Jamie Webb > * Maximize layout modifier Applied. From sjanssen at cse.unl.edu Thu Oct 4 15:34:02 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Thu Oct 4 15:41:14 2007 Subject: [Xmonad] darcs patch: Rename ResizableTile.Tall to ResizableTall In-Reply-To: <20071003165830.DCEE21099B@carbon.sygneca.com> References: <20071003165830.DCEE21099B@carbon.sygneca.com> Message-ID: <200710041434.02350.sjanssen@cse.unl.edu> On Wednesday 03 October 2007 11:58:30 Jamie Webb wrote: > Wed Oct 3 03:30:00 BST 2007 Jamie Webb > * Rename ResizableTile.Tall to ResizableTall > Having two layouts named Tall was upsetting the deserialization code. Applied. From sjanssen at cse.unl.edu Thu Oct 4 16:58:16 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Thu Oct 4 16:59:46 2007 Subject: [Xmonad] darcs patch: The road to killing possibleLayouts: add... (and 2 more) Message-ID: <200710042100.l94L0jMi006733@cse.unl.edu> This is an exploratory change to remove possibleLayouts. I'd like to get some opinions on this patch before I push it. Cheers, Spencer Janssen Thu Oct 4 15:05:59 CDT 2007 Spencer Janssen * The road to killing possibleLayouts: add subLayouts Thu Oct 4 15:14:01 CDT 2007 Spencer Janssen * Remove possibleLayouts Thu Oct 4 15:31:45 CDT 2007 Spencer Janssen * subLayouts for Layout -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 11644 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071004/dbd98f9a/attachment.bin From sjanssen at cse.unl.edu Thu Oct 4 17:01:47 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Thu Oct 4 17:03:14 2007 Subject: [Xmonad] darcs patch: subLayouts for Combo (and 2 more) Message-ID: <200710042104.l94L4GCi007077@cse.unl.edu> This is a companion to the possibleLayouts removal patches. David, I'd like to know if serialization still works for Combo with these changes. Cheers, Spencer Janssen Thu Oct 4 15:09:48 CDT 2007 Spencer Janssen * subLayouts for Combo Thu Oct 4 15:11:35 CDT 2007 Spencer Janssen * subLayouts for LayoutModifier Thu Oct 4 15:26:10 CDT 2007 Spencer Janssen * Include subLayouts of ModifiedLayouts too -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 59007 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071004/61eeb0a1/attachment-0001.bin From sjanssen at cse.unl.edu Thu Oct 4 19:39:09 2007 From: sjanssen at cse.unl.edu (Spencer Janssen) Date: Thu Oct 4 19:40:47 2007 Subject: [Xmonad] darcs patch: extract Properties module for re-use by contrib tests In-Reply-To: <20071004080253.D261059C931@mail.comcast.net> References: <20071004080253.D261059C931@mail.comcast.net> Message-ID: <200710041839.09199.sjanssen@cse.unl.edu> On Thursday 04 October 2007 03:02:53 Devin Mullins wrote: > Thu Oct 4 03:58:52 EDT 2007 Devin Mullins > * extract Properties module for re-use by contrib tests > I want to reuse Properties' Arbitrary instance (as well as the T and > NonNegative types) in an upcoming set of SwapWorkspaces QC props. > `module Main where import Main` doesn't work too well. :) > > If this patch is accepted, the darcs 'test' pref should be modified to > "-itests tests/Main.hs". Applied. From mvanier at cs.caltech.edu Fri Oct 5 05:48:29 2007 From: mvanier at cs.caltech.edu (Michael Vanier) Date: Fri Oct 5 05:47:26 2007 Subject: [Xmonad] possible bug in tabbed window extension Message-ID: <4706086D.1040400@cs.caltech.edu> I've just upgraded to the latest xmonad in darcs, and it's great! However, one thing that used to work doesn't work anymore. I bind mod-button3 to the kill command, and when I put the cursor on a tab and hit mod-button3 the entire X server crashes! When I do it outside of a tab it works fine. FWIW the relevant part of my Config.hs is: -- | -- default actions bound to mouse events -- mouseBindings :: M.Map (KeyMask, Button) (Window -> X ()) mouseBindings = M.fromList $ -- mod-button1 %! Set the window to floating mode and move by dragging [ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w)) -- mod-button2 %! Set the window to floating mode and resize by dragging , ((modMask, button2), (\w -> focus w >> mouseResizeWindow w)) -- mod-button3 %! Kill a window , ((modMask, button3), (\_ -> kill)) -- Extension-provided mouse bindings ] Anybody have any idea what's going wrong? TIA, Mike From mailing_list at istitutocolli.org Fri Oct 5 06:52:05 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Fri Oct 5 06:52:49 2007 Subject: [Xmonad] possible bug in tabbed window extension In-Reply-To: <4706086D.1040400@cs.caltech.edu> References: <4706086D.1040400@cs.caltech.edu> Message-ID: <20071005105205.GA17914@laptop.nowhere.net> On Fri, Oct 05, 2007 at 02:48:29AM -0700, Michael Vanier wrote: > I've just upgraded to the latest xmonad in darcs, and it's great! However, > one thing that used to work doesn't work anymore. I bind mod-button3 to the > kill command, and when I put the cursor on a tab and hit mod-button3 the > entire X server crashes! When I do it outside of a tab it works fine. FWIW > the relevant part of my Config.hs is: > [...] > Anybody have any idea what's going wrong? yes, a stupid assumption I made when using fromJust a bit too liberally. a patch is comming. andrea From mailing_list at istitutocolli.org Fri Oct 5 07:18:50 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Fri Oct 5 07:17:49 2007 Subject: [Xmonad] darcs patch: Tabbed: check if we really have a window to focus Message-ID: <200710051118.l95BIo3C020371@laptop.nowhere.net> hi, this fixes the bug reported by Michael Vanier. Andrea Fri Oct 5 13:17:33 CEST 2007 Andrea Rossato * Tabbed: check if we really have a window to focus -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 59428 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071005/52925cc6/attachment-0001.bin From mailing_list at istitutocolli.org Fri Oct 5 08:14:34 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Fri Oct 5 08:34:44 2007 Subject: [Xmonad] darcs patch: XPrompt: added ^A and ^E and more (and 1 more) Message-ID: <200710051214.l95CEYpU020835@laptop.nowhere.net> hi, some stuff I had floating around for a while, and a step towards the i18n support (but I'm going to send separately something more). After some experiments with readline, bash, getDirectoryContents I think that the best way to get command completion is to use getDirectoryContents over the path. This is the most efficient on my laptop, at least. Sure we also get non executable files, but that's a very small price to pay. Bash instead is used to get directory/file completions. Moreover, now we escape special characters and spaces, which should lead to a better completion handling and shell interaction. The code is a bit longer but I think it is worth. And moreover we don't need readline anymore. Finally, thanks to Eric who started the commands implementation. I added ^A and ^E. Andrea Fri Oct 5 13:21:22 CEST 2007 Andrea Rossato * XPrompt: added ^A and ^E and more - added ^A (start of line) and ^E (end of line) - added support for escaping spaces (see an example of it's use in the new ShellPrompt) - some code cleanup: I'm now tracking changes to XPrompt also in modified version that supports i18n. This is the reason of some name changes. Fri Oct 5 13:22:50 CEST 2007 Andrea Rossato * ShellPrompt: removed readline dependency and added escape character support -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 74793 bytes Desc: A darcs patch for your repository! Url : http://www.haskell.org/pipermail/xmonad/attachments/20071005/302b6223/attachment-0001.bin From mailing_list at istitutocolli.org Fri Oct 5 08:51:17 2007 From: mailing_list at istitutocolli.org (Andrea Rossato) Date: Fri Oct 5 08:51:20 2007 Subject: [Xmonad] i18n in xprompt Message-ID: <20071005125116.GB17914@laptop.nowhere.net> hi, this is a follow up of another thread. Attached to this message there is a new version of the XPrompt with i18n support. Actually, IXPrompt.hs is what XPrompt will look like, but first I need to fix the FIXME stuff, which requires importing the XwcLookupString function. Otherwise I need to use toLocale to translate the string I receive with XLookupString. The Xwc* family function are already part of x11-extras. Only the lookupString function is missing, and it requires, I think - still I didn't look it closely -, a Storable instance. When I'll have that function imported XPrompt will be encoding independent and I will be able to have only the IShellPrompt, which is fully i18n aware, requiring the locale C stuff that is presently in IXPromptLib.hsc. The goal is to have a default, not i18n, prompt without any external dependency, and specific prompts i18n aware which will require calling setlocale() and the related C stuff. Hope to finish this stuff before x11-extras-0.4 will be released, otherwise we will have to wait the post 0.4 cycle. Andrea -------------- next part -------------- {-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | -- Module : XMonadContrib.IXPromptLib -- Copyright : (C) 2007 Andrea Rossato -- License : BSD3 -- -- Maintainer : andrea.rossato@unibz.it -- Stability : unstable -- Portability : unportable -- -- A module for writing graphical prompts for XMonad -- This code comes from John Meacham's HsLocale ----------------------------------------------------------------------------- module XMonadContrib.IXPromptLib ( -- * Usage -- $usage fromLocale , toLocale , setupLocale ) where import Prelude hiding (catch) import Control.Exception import Control.Monad import Data.Char import Foreign import Foreign.C -- $usage -- In order to use XPrompt you need to add XMonadContrib.XPromptLib to -- the "other-modules" list in xmonad.cabal: -- -- > other-modules: Config Operations StackSet XMonad XMonadContrib.IXPromptLib -- -- For usage examples see "XMonadContrib.IShellPrompt" -- This code comes from John Meacham's HsLocale -- http://repetae.net/john/repos/HsLocale/ toLocale :: String -> IO String toLocale s = catch (stringToBytes s >>= return . map (chr . fromIntegral)) (const $ return "invalid\\ character\\ sequence") fromLocale :: String -> IO String fromLocale s = bytesToString (map (fromIntegral . ord) s) `catch` \_ -> return "invalid\\ character\\ sequence" stringToBytes :: String -> IO [Word8] stringToBytes cs = (withIConv "" "UTF-32" $ \ic -> convertRaw ic cs) bytesToString :: [Word8] -> IO String bytesToString bs = (withIConv "UTF-32" "" $ \ic -> convertRaw ic bs) >>= return . f where f ('\65279':xs) = xs -- discard byte order marker f xs = xs newtype IConv = IConv (#type intptr_t) deriving(Num,Eq,Show) foreign import ccall unsafe "iconv.h iconv_open" iconv_open :: Ptr CChar -> Ptr CChar -> IO IConv foreign import ccall unsafe "iconv.h iconv_close" iconv_close :: IConv -> IO CInt foreign import ccall unsafe "iconv.h iconv" iconv :: IConv -> Ptr (Ptr CChar) -> Ptr CSize -> Ptr (Ptr CChar) -> Ptr CSize -> IO CInt withIConv :: String -> String -> (IConv -> IO a) -> IO a withIConv to from action = bracket open close action where close ic = throwErrnoIfMinus1_ "iconv_close" (iconv_close ic) open = throwErrnoIfMinus1 "iconv_open" iopen iopen = do withCAString to $ \t -> do withCAString from $ \f -> do iconv_open t f convertRaw :: (Storable a, Storable b) => IConv -> [a] -> IO [b] convertRaw ic xs = do with (fromIntegral $ sizeOf (head xs) * length xs) $ \inptrSz -> do withArray xs $ \arr -> do with (castPtr arr) $ \inptr -> do allocaBytes (1024) $ \outptr -> do with outptr $ \outptrptr -> do with 1024 $ \outptrSz -> do let outSz = fromIntegral $ sizeOf $ unsafePerformIO (peek outptr) let go = do ret <- iconv ic inptr inptrSz (castPtr outptrptr) outptrSz err <- getErrno case (ret,err) of (-1,_) | err == e2BIG -> do oz <- peek outptrSz x <- peekArray ((1024 - fromIntegral oz) `div` outSz) (castPtr outptr) poke outptrptr outptr poke outptrSz 1024 y <- go return $ x ++ y (-1,_) -> throwErrno "iconv" (_,_) -> do oz <- peek outptrSz peekArray ((1024 - fromIntegral oz) `div` outSz) outptr go #include foreign import ccall unsafe "locale.h setlocale" setlocale :: CInt -> CString -> IO CString setupLocale :: IO () setupLocale = withCString "" $ \s -> do setlocale (#const LC_ALL) s return () -------------- next part -------------- {-# LANGUAGE ExistentialQuantification #-} ----------------------------------------------------------------------------- -- | -- Module : XMonadContrib.IXPrompt -- Copyright : (C) 2007 Andrea Rossato -- License : BSD3 -- -- Maintainer : andrea.rossato@unibz.it -- Stability : unstable -- Portability : unportable -- -- A locale aware (temporary) version of XPrompt -- ----------------------------------------------------------------------------- module XMonadContrib.IXPrompt ( -- * Usage -- $usage mkXPrompt , defaultXPConfig , mkComplFunFromList , XPType (..) , XPPosition (..) , XPConfig (..) , XPrompt (..) , ComplFunction -- * X Utilities -- $xutils , mkUnmanagedWindow , fillDrawable , printString -- * Other Utilities -- $utils , getLastWord , skipLastWord , splitInSubListsAt , breakAtSpace , newIndex , newCommand ) where import Graphics.X11.Xlib import Graphics.X11.Xlib.Extras import XMonad hiding (io) import Operations (initColor) import qualified StackSet as W import XMonadContrib.IXPromptLib import Control.Arrow ((***),(&&&)) import Control.Monad.Reader import Control.Monad.State import Data.Bits import Data.Char import Data.Maybe import Data.List import System.Environment (getEnv) import System.IO import System.Posix.Files -- $usage -- For usage examples see "XMonadContrib.ISshPrompt" -- -- In order to use IXPrompt you need to add XMonadContrib.IXPromptLib to -- the "other-modules" list in xmonad.cabal: -- -- > other-modules: Config Operations StackSet XMonad XMonadContrib.IXPromptLib -- -- TODO: -- -- * scrolling the completions that don't fit in the window (?) -- -- * commands to edit the command line type XP = StateT XPState IO data XPState = XPS { dpy :: Display , rootw :: Window , win :: Window , screen :: Rectangle , complWin :: Maybe Window , complWinDim :: Maybe ComplWindowDim , completionFunction :: String -> IO [String] , gcon :: GC , fontSet :: FontSet , xptype :: XPType , command :: String , offset :: Int , history :: [History] , config :: XPConfig } data XPConfig = XPC { font :: String -- ^ Font , bgColor :: String -- ^ Backgroud color , fgColor :: String -- ^ Font color , fgHLight :: String -- ^ Font color of a highlighted completion entry , bgHLight :: String -- ^ Backgroud color of a highlighted completion entry , borderColor :: String -- ^ Border color , promptBorderWidth :: Dimension -- ^ Border width , position :: XPPosition -- ^ Position: 'Top' or 'Bottom' , height :: Dimension -- ^ Window height , historySize :: Int -- ^ The number of history entries to be saved } deriving (Show, Read) data XPType = forall p . XPrompt p => XPT p instance Show XPType where show (XPT p) = showXPrompt p instance XPrompt XPType where showXPrompt = show -- | The class prompt types must be an instance of. In order to -- create a prompt you need to create a data type, without parameters, -- and make it an instance of this class, by implementing a simple -- method, 'showXPrompt', which will be used to print the string to be -- displayed in the command line window. -- -- This is an example of a XPrompt instance definition: -- -- > instance XPrompt Shell where -- > showXPrompt Shell = "Run: " class XPrompt t where showXPrompt :: t -> String data XPPosition = Top | Bottom deriving (Show,Read) defaultXPConfig :: XPConfig defaultXPConfig = XPC { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" , bgColor = "#333333" , fgColor = "#FFFFFF" , fgHLight = "#000000" , bgHLight = "#BBBBBB" , borderColor = "#FFFFFF" , promptBorderWidth = 1 , position = Bottom , height = 18 , historySize = 256 } type ComplFunction = String -> IO [String] initState :: XPrompt p => Display -> Window -> Window -> Rectangle -> ComplFunction -> GC -> FontSet -> p -> [History] -> XPConfig -> XPState initState d rw w s compl gc fonts pt h c = XPS d rw w s Nothing Nothing compl gc fonts (XPT pt) "" 0 h c -- | Creates a prompt given: -- -- * a prompt type, instance of the 'XPrompt' class. -- -- * a prompt configuration ('defaultXPConfig' can be used as a -- starting point) -- -- * a completion function ('mkComplFunFromList' can be used to -- create a completions function given a list of possible completions) -- -- * an action to be run: the action must take a string and return 'XMonad.X' () mkXPrompt :: XPrompt p => p -> XPConfig -> ComplFunction -> (String -> X ()) -> X () mkXPrompt t conf compl action = do liftIO setupLocale c <- ask let d = display c rw = theRoot c s <- gets $ screenRect . W.screenDetail . W.current . windowset w <- liftIO $ createWin d rw conf s liftIO $ selectInput d w $ exposureMask .|. keyPressMask gc <- liftIO $ createGC d w liftIO $ setGraphicsExposures d gc False (hist,h) <- liftIO $ readHistory (_,_,fset) <- liftIO $ createFontSet d (font conf) `catch` \_ -> createFontSet d "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" let st = initState d rw w s compl gc fset (XPT t) hist conf st' <- liftIO $ execStateT runXP st liftIO $ freeFontSet d fset liftIO $ freeGC d gc liftIO $ hClose h when (command st' /= "") $ do let htw = take (historySize conf) (history st') liftIO $ writeHistory htw action (command st') runXP :: XP () runXP = do st <- get let (d,w) = (dpy &&& win) st status <- io $ grabKeyboard d w True grabModeAsync grabModeAsync currentTime when (status == grabSuccess) $ do updateWindows eventLoop handle io $ ungrabKeyboard d currentTime io $ destroyWindow d w destroyComplWin io $ sync d False type KeyStroke = (KeySym, String) eventLoop :: (KeyStroke -> Event -> XP ()) -> XP () eventLoop action = do d <- gets dpy (keysym,string,event) <- io $ allocaXEvent $ \e -> do maskEvent d (exposureMask .|. keyPressMask) e ev <- getEvent e (ks,s) <- if ev_event_type ev == keyPress -- FIXME we should be using XwcLookupString!! then lookupString $ asKeyEvent e else return (Nothing, "") return (ks,s,ev) action (fromMaybe xK_VoidSymbol keysym,string) event -- Main event handler handle :: KeyStroke -> Event -> XP () handle k@(ks,_) e@(KeyEvent {ev_event_type = t}) | t == keyPress && ks == xK_Tab = do c <- getCompletions completionHandle c k e handle ks (KeyEvent {ev_event_type = t, ev_state = m}) | t == keyPress = keyPressHandle m ks handle _ (AnyEvent {ev_event_type = t, ev_window = w}) | t == expose = do st <- get when (win st == w) updateWindows eventLoop handle handle _ _ = eventLoop handle -- completion event handler completionHandle :: [String] -> KeyStroke -> Event -> XP () completionHandle c (ks,_) (KeyEvent {ev_event_type = t}) | t == keyPress && ks == xK_Tab = do st <- get case c of [] -> do updateWindows eventLoop handle l -> do let new_command = newCommand (command st) l modify $ \s -> s { command = new_command, offset = length new_command } redrawWindows c eventLoop (completionHandle c) -- key release | t == keyRelease && ks == xK_Tab = eventLoop (completionHandle c) -- other keys completionHandle _ ks (KeyEvent {ev_event_type = t, ev_state = m}) | t == keyPress = keyPressHandle m ks -- some other event: go back to main loop completionHandle _ k e = handle k e -- | Given a completion and a list of possible completions, returns the -- index of the next completion in the list newIndex :: String -> [String] -> Int newIndex com cl = case elemIndex (getLastWord com) cl of Just i -> if i >= length cl - 1 then 0 else i + 1 Nothing -> 0 -- | Given a completion and a list of possible completions, returns the -- the next completion in the list newCommand :: String -> [String] -> String newCommand com cl = skipLastWord com ++ (cl !! (newIndex com cl)) -- KeyPresses data Direction = Prev | Next deriving (Eq,Show,Read) keyPressHandle :: KeyMask -> KeyStroke -> XP () -- commands: ctrl + ... todo keyPressHandle mask (ks,_) | mask == controlMask = case () of -- ^U _ | ks == xK_u -> killBefore >> go -- ^K | ks == xK_k -> killAfter >> go -- ^A | ks == xK_a -> startOfLine >> go -- ^E | ks == xK_e -> endOfLine >> go -- Unhandled control sequence | otherwise -> eventLoop handle -- Return: exit | ks == xK_Return = historyPush >> return () -- backspace | ks == xK_BackSpace = deleteString Prev >> go -- delete | ks == xK_Delete = deleteString Next >> go -- left | ks == xK_Left = moveCursor Prev >> go -- right | ks == xK_Right = moveCursor Next >> go -- up | ks == xK_Up = moveHistory Prev >> go -- down | ks == xK_Down = moveHistory Next >> go -- escape: exit and discard everything | ks == xK_Escape = flushString >> return () where go = updateWindows >> eventLoop handle -- insert a character keyPressHandle _ (_,s) | s == "" = eventLoop handle | otherwise = do s' <- io $ fromLocale s insertString s' updateWindows eventLoop handle -- KeyPress and State -- | Kill the portion of the command before the cursor killBefore :: XP () killBefore = modify $ \s -> s { command = drop (offset s) (command s) , offset = 0 } -- | Kill the portion of the command including and after the cursor killAfter :: XP () killAfter = modify $ \s -> s { command = take (offset s) (command s) } -- | Put the cursor at the end of line endOfLine :: XP () endOfLine = modify $ \s -> s { offset = length (command s) } -- | Put the cursor at the start of line startOfLine :: XP () startOfLine = modify $ \s -> s { offset = 0 } -- | Flush the command string and reset the offest flushString :: XP () flushString = do modify (\s -> s { command = "", offset = 0} ) -- | Insert a character at the cursor position insertString :: String -> XP () insertString str = modify (\s -> s { command = c (command s) (offset s), offset = o (offset s)} ) where o oo = oo + length str c oc oo | oo >= length oc = oc ++ str | otherwise = f ++ str ++ ss where (f,ss) = splitAt oo oc -- | Remove a character at the cursor position deleteString :: Direction -> XP () deleteString d = modify (\s -> s { command = c (command s) (offset s), offset = o (offset s)} ) where o oo = if d == Prev then max 0 (oo - 1) else oo c oc oo | oo >= length oc && d == Prev = take (oo - 1) oc | oo < length oc && d == Prev = take (oo - 1) f ++ ss | oo < length oc && d == Next = f ++ tail ss | otherwise = oc where (f,ss) = splitAt oo oc -- | move the cursor one position moveCursor :: Direction -> XP () moveCursor d = modify (\s -> s { offset = o (offset s) (command s)} ) where o oo c = if d == Prev then max 0 (oo - 1) else min (length c) (oo + 1) moveHistory :: Direction -> XP () moveHistory d = do h <- getHistory c <- gets command let str = if h /= [] then head h else c let nc = case elemIndex c h of Just i -> case d of Prev -> h !! (if (i + 1) > (length h - 1) then 0 else i + 1) Next -> h !! (max (i - 1) 0) Nothing -> str modify (\s -> s { command = nc, offset = length nc }) -- X Stuff updateWindows :: XP () updateWindows = do d <- gets dpy drawWin c <- getCompletions case c of [] -> destroyComplWin >> return () l -> redrawComplWin l io $ sync d False redrawWindows :: [String] -> XP () redrawWindows c = do d <- gets dpy drawWin case c of [] -> return () l -> redrawComplWin l io $ sync d False createWin :: Display -> Window -> XPConfig -> Rectangle -> IO Window createWin d rw c s = do let (x,y) = case position c of Top -> (0,0) Bottom -> (0, rect_height s - height c) w <- mkUnmanagedWindow d (defaultScreenOfDisplay d) rw (rect_x s + x) (rect_y s + fi y) (rect_width s) (height c) mapWindow d w return w drawWin :: XP () drawWin = do st <- get let (c,(d,(w,gc))) = (config &&& dpy &&& win &&& gcon) st scr = defaultScreenOfDisplay d wh = widthOfScreen scr ht = height c bw = promptBorderWidth c bgcolor <- io $ initColor d (bgColor c) border <- io $ initColor d (borderColor c) p <- io $ createPixmap d w wh ht (defaultDepthOfScreen scr) io $ fillDrawable d p gc border bgcolor (fi bw) wh ht printPrompt p io $ copyArea d p w gc 0 0 wh ht 0 0 io $ freePixmap d p printPrompt :: Drawable -> XP () printPrompt drw = do st <- get let (gc,(c,(d,fs))) = (gcon &&& config &&& dpy &&& fontSet) st (prt,(com,off)) = (show . xptype &&& command &&& offset) st str = prt ++ com -- scompose the string in 3 part: till the cursor, the cursor and the rest (f,p,ss) = if off >= length com then (str, " ","") -- add a space: it will be our cursor ;-) else let (a,b) = (splitAt off com) in (prt ++ a, [head b], tail b) ht = height c (fsl,psl) = (wcTextEscapement fs *** wcTextEscapement fs) (f,p) (_,rl) = wcTextExtents (fontSet st) str y = fi $ (ht - (rect_height rl)) `div` 2 - fi (rect_y rl) x = fi $ (rect_height rl) `div` 2 fgcolor <- io $ initColor d $ fgColor c bgcolor <- io $ initColor d $ bgColor c -- print the first part io $ printString d drw fs gc fgcolor bgcolor x y f -- reverse the colors and print the "cursor" ;-) io $ printString d drw fs gc bgcolor fgcolor (x + fsl) y p -- reverse the colors and print the rest of the string io $ printString d drw fs gc fgcolor bgcolor (x + fsl + psl) y ss -- Completions getCompletions :: XP [String] getCompletions = do s <- get io $ (completionFunction s) (getLastWord $ command s) setComplWin :: Window -> ComplWindowDim -> XP () setComplWin w wi = modify (\s -> s { complWin = Just w, complWinDim = Just wi }) destroyComplWin :: XP () destroyComplWin = do d <- gets dpy cw <- gets complWin case cw of Just w -> do io $ destroyWindow d w modify (\s -> s { complWin = Nothing, complWinDim = Nothing }) Nothing -> return () type ComplWindowDim = (Position,Position,Dimension,Dimension,Columns,Rows) type Rows = [Position] type Columns = [Position] createComplWin :: ComplWindowDim -> XP Window createComplWin wi@(x,y,wh,ht,_,_) = do st <- get let d = dpy st scr = defaultScreenOfDisplay d w <- io $ mkUnmanagedWindow d scr (rootw st) x y wh ht io $ mapWindow d w setComplWin w wi return w getComplWinDim :: [String] -> XP ComplWindowDim getComplWinDim compl = do st <- get let (c,(scr,fs)) = (config &&& screen &&& fontSet) st wh = rect_width scr ht = height c let max_compl_len = (fi ht `div` 2) + (maximum . map (wcTextEscapement fs) $ compl) columns = max 1 $ wh `div` (fi max_compl_len) rem_height = rect_height scr - ht (rows,r) = (length compl) `divMod` fi columns needed_rows = max 1 (rows + if r == 0 then 0 else 1) actual_max_number_of_rows = rem_height `div` ht actual_rows = min actual_max_number_of_rows (fi needed_rows) actual_height = actual_rows * ht (x,y) = case position c of Top -> (0,ht) Bottom -> (0, (0 + rem_height - actual_height)) let (_,rl) = wcTextExtents fs $ head compl yp = fi $ (ht - (rect_height rl)) `div` 2 - fi (rect_y rl) xp = fi $ (rect_height rl) `div` 2 yy = map fi . take (fi actual_rows) $ [yp,(yp + ht)..] xx = take (fi columns) [xp,(xp + max_compl_len)..] return (rect_x scr + x, rect_y scr + fi y, wh, actual_height, xx, yy) drawComplWin :: Window -> [String] -> XP () drawComplWin w compl = do st <- get let c = config st d = dpy st scr = defaultScreenOfDisplay d bw = promptBorderWidth c gc = gcon st bgcolor <- io $ initColor d (bgColor c) fgcolor <- io $ initColor d (fgColor c) border <- io $ initColor d (borderColor c) (_,_,wh,ht,xx,yy) <- getComplWinDim compl p <- io $ createPixmap d w wh ht (defaultDepthOfScreen scr) io $ fillDrawable d p gc border bgcolor (fi bw) wh ht let ac = splitInSubListsAt (length yy) (take ((length xx) * (length yy)) compl) printComplList d p gc fgcolor bgcolor xx yy ac io $ copyArea d p w gc 0 0 wh ht 0 0 io $ freePixmap d p redrawComplWin :: [String] -> XP () redrawComplWin compl = do st <- get nwi <- getComplWinDim compl let recreate = do destroyComplWin w <- createComplWin nwi drawComplWin w compl if (compl /= [] ) then case complWin st of Just w -> case complWinDim st of Just wi -> if nwi == wi -- complWinDim did not change then drawComplWin w compl -- so update else recreate Nothing -> recreate Nothing -> recreate else destroyComplWin printComplList :: Display -> Drawable -> GC -> Pixel -> Pixel -> [Position] -> [Position] -> [[String]] -> XP () printComplList _ _ _ _ _ _ _ [] = return () printComplList _ _ _ _ _ [] _ _ = return () printComplList d drw gc fc bc (x:xs) y (s:ss) = do printComplColumn d drw gc fc bc x y s printComplList d drw gc fc bc xs y ss printComplColumn :: Display -> Drawable -> GC -> Pixel -> Pixel -> Position -> [Position] -> [String] -> XP () printComplColumn _ _ _ _ _ _ _ [] = return () printComplColumn _ _ _ _ _ _ [] _ = return () printComplColumn d drw gc fc bc x (y:yy) (s:ss) = do printComplString d drw gc fc bc x y s printComplColumn d drw gc fc bc x yy ss printComplString :: Display -> Drawable -> GC -> Pixel -> Pixel -> Position -> Position -> String -> XP () printComplString d drw gc fc bc x y s = do st <- get if s == getLastWord (command st) then do bhc <- io $ initColor d (bgHLight $ config st) fhc <- io $ initColor d (fgHLight $ config st) io $ printString d drw (fontSet st) gc fhc bhc x y s else io $ printString d drw (fontSet st) gc fc bc x y s -- History data History = H { prompt :: String , command_history :: String } deriving (Show, Read, Eq) historyPush :: XP () historyPush = do c <- gets command when (c /= []) $ modify (\s -> s { history = nub $ H (showXPrompt (xptype s)) c : history s }) getHistory :: XP [String] getHistory = do hist <- gets history pt <- gets xptype return $ map command_history . filter (\h -> prompt h == showXPrompt pt) $ hist readHistory :: IO ([History],Handle) readHistory = do home <- getEnv "HOME" let path = home ++ "/.xmonad_history" f <- fileExist path if f then do h <- openFile path ReadMode str <- hGetContents h case (reads str) of [(hist,_)] -> return (hist,h) [] -> return ([],h) _ -> return ([],h) else do h <- openFile path WriteMode return ([],h) writeHistory :: [History] -> IO () writeHistory hist = do home <- getEnv "HOME" let path = home ++ "/.xmonad_history" catch (writeFile path (show hist)) (\_ -> do putStrLn "error in writing"; return ()) -- $xutils -- | Prints a string on a 'Drawable' printString :: Display -> Drawable -> FontSet -> GC -> Pixel -> Pixel -> Position -> Position -> String -> IO () printString d drw fs gc fc bc x y s = do setForeground d gc fc setBackground d gc bc wcDrawImageString d drw fs gc x y s -- | Fills a 'Drawable' with a rectangle and a border fillDrawable :: Display -> Drawable -> GC -> Pixel -> Pixel -> Dimension -> Dimension -> Dimension -> IO () fillDrawable d drw gc border bgcolor bw wh ht = do -- we start with the border setForeground d gc border fillRectangle d drw gc 0 0 wh ht -- here foreground means the background of the text setForeground d gc bgcolor fillRectangle d drw gc (fi bw) (fi bw) (wh - (bw * 2)) (ht - (bw * 2)) -- | Creates a window with the attribute override_redirect set to True. -- Windows Managers should not touch this kind of windows. mkUnmanagedWindow :: Display -> Screen -> Window -> Position -> Position -> Dimension -> Dimension -> IO Window mkUnmanagedWindow d s rw x y w h = do let visual = defaultVisualOfScreen s attrmask = cWOverrideRedirect allocaSetWindowAttributes $ \attributes -> do set_override_redirect attributes True createWindow d rw x y w h 0 (defaultDepthOfScreen s) inputOutput visual attrmask attributes -- $utils -- | This function takes a list of possible completions and returns a -- completions function to be used with 'mkXPrompt' mkComplFunFromList :: [String] -> String -> IO [String] mkComplFunFromList _ [] = return [] mkComplFunFromList l s = return $ filter (\x -> take (length s) x == s) l -- Lift an IO action into the XP io :: IO a -> XP a io = liftIO -- Shorthand for fromIntegral fi :: (Num b, Integral a) => a -> b fi = fromIntegral -- | Given a maximum length, splits a list into sublists splitInSubListsAt :: Int -> [a] -> [[a]] splitInSubListsAt _ [] = [] splitInSubListsAt i x = f : splitInSubListsAt i rest where (f,rest) = splitAt i x -- | Gets the last word of a string or the whole string if formed by -- only one word getLastWord :: String -> String getLastWord str = reverse . fst . breakAtSpace . reverse $ str -- | Skips the last word of the string, if the string is composed by -- more then one word. Otherwise returns the string. skipLastWord :: String -> String skipLastWord str = reverse . snd . breakAtSpace . reverse $ str breakAtSpace :: String -> (String, String) breakAtSpace s | " \\" `isPrefixOf` s2 = (s1 ++ " " ++ s1', s2') | otherwise = (s1, s2) where (s1, s2 ) = break isSpace s (s1',s2') = breakAtSpace $ tail s2 -------------- next part -------------- ----------------------------------------------------------------------------- -- | -- Module : XMonadContrib.IShellPrompt -- Copyright : (C) 2007 Andrea Rossato -- License : BSD3 -- -- Maintainer : andrea.rossato@unibz.it -- Stability : unstable -- Portability : unportable -- -- A i18n aware shell prompt for XMonad -- ----------------------------------------------------------------------------- module XMonadContrib.IShellPrompt ( -- * Usage -- $usage ishellPrompt ) where import XMonad import XMonadContrib.IXPrompt import XMonadContrib.IXPromptLib import XMonadContrib.Dmenu import Control.Monad import Data.List import System.Directory import System.IO import System.Environment -- $usage -- -- 1. In Config.hs add: -- -- > import XMonadContrib.IXPrompt -- > import XMonadContrib.IShellPrompt -- -- 2. add XMonadContrib.IXPromptLib to the "other-modules" list in xmonad.cabal: -- -- > other-modules: Config Operations StackSet XMonad XMonadContrib.IXPromptLib -- -- 3. In your keybindings add something like: -- -- > , ((modMask .|. controlMask, xK_x), ishellPrompt defaultXPConfig) -- -- %import XMonadContrib.IXPrompt -- %import XMonadContrib.IShellPrompt -- %keybind , ((modMask .|. controlMask, xK_x), ishellPrompt defaultXPConfig) data Shell = Shell instance XPrompt Shell where showXPrompt Shell = "Run: " ishellPrompt :: X () ishellPrompt = mkXPrompt Shell defaultXPConfig getShellCompl spawn getShellCompl :: String -> IO [String] getShellCompl s | s /= "" && last s /= ' ' = do s' <- toLocale s f <- fmap lines $ runProcessWithInput "/bin/bash" [] ("compgen -A file " ++ s ++