From mlists at pmade.com Thu Dec 1 18:37:21 2016 From: mlists at pmade.com (Peter Jones) Date: Thu, 01 Dec 2016 11:37:21 -0700 Subject: [xmonad] Announcing xmonad-testing: Help us test xmonad for v0.13 Message-ID: <87h96n338e.fsf@pmade.com> We're working on the v0.13 release but we need your help. We'd like to process as many pull requests/patches as possible before the release. And of course, we'd like it to be as rock solid as possible. We now have a new repo that should help you participate: https://github.com/xmonad/xmonad-testing Even if you don't know how to use `git` you can help. The `README.md` file for the `xmonad-testing` repository contains instructions on testing someone else's pull request. Just follow the steps! If you have some spare cycles here's how you can help: * Test someone's pull request using xmonad-testing * Review open issues and see if you can fix something :) Thanks everyone! -- Peter Jones, Founder, Devalot.com Defending the honor of good code From e.a.gebhart at gmail.com Thu Dec 8 02:49:15 2016 From: e.a.gebhart at gmail.com (e.a.gebhart at gmail.com) Date: Wed, 07 Dec 2016 21:49:15 -0500 Subject: [xmonad] Get width and height of current screen ? Message-ID: <87r35jjftg.fsf@gmail.com> I know the information is there but I don't have sufficient Haskell skills to figure it out yet. I've only been using Xmonad for about 6 months. I've seen the information in the StackSet doc, and I can also see it in prelude with this: Graphics.X11.openDisplay [] >>= Graphics.X11.Xinerama.getScreenInfo [Rectangle {rect_x = 0, rect_y = 0, rect_width = 3440, rect_height = 1440}] I have yet to successfully look inside the stackSet. I can tell that I'm not getting something that is very fundamental. I have this submap that I use mostly to move my scratchpads around. It works great but I would like to set the width and height according to the height and width of the current screen. floatKeymap = [ ("g", withFocused (keysMoveWindowTo (0,40) (0,0))) -- Top Left , ("c", withFocused (keysMoveWindowTo (halfWidth, 40) (1%2, 0))) -- Top Center , ("r", withFocused (keysMoveWindowTo (screenWidth, 40) (1,0))) -- Top Right , ("h", withFocused (keysMoveWindowTo (0, halfHeight) (0, 1%2))) -- Left Center , ("t", withFocused (keysMoveWindowTo (halfWidth, halfHeight) (1%2, 1%2))) -- Center , ("n", withFocused (keysMoveWindowTo (screenWidth, halfHeight) (1, 1%2))) -- Right Center , ("m", withFocused (keysMoveWindowTo (0, screenHeight) (0,1))) -- Bottom Left , ("w", withFocused (keysMoveWindowTo (halfWidth, screenHeight) (1%2, 1))) -- Bottom Center , ("v", withFocused (keysMoveWindowTo (screenWidth, screenHeight) (1,1))) -- BottomRight ] where screenWidth = 3440 screenHeight = 1440 halfWidth = div screenWidth 2 halfHeight = div screenHeight 2 I would appreciate any pointers that would help me understand and figure this out. From allbery.b at gmail.com Thu Dec 8 02:57:52 2016 From: allbery.b at gmail.com (Brandon Allbery) Date: Thu, 8 Dec 2016 02:57:52 +0000 Subject: [xmonad] Get width and height of current screen ? In-Reply-To: <87r35jjftg.fsf@gmail.com> References: <87r35jjftg.fsf@gmail.com> Message-ID: On Thu, Dec 8, 2016 at 2:49 AM, wrote: > I have yet to successfully look inside the stackSet. I can tell that I'm > not getting > something that is very fundamental. > Somewhere in a do block in X: rect <- fmap (W.screenRect . W.screenDetail . current) (gets windowset) (the type of this is http://hackage.haskell.org/package/X11-1.6.1.2/docs/Graphics-X11-Xlib-Types.html#t:Rectangle ) Also, you need to have imported the StackSet stuff properly: import qualified XMonad.StackSet as W The StackSet type is heavily parameterized because sjanssen ran the XMonad.StackSet module through a code verifier which couldn't handle the X11 types, so substituted basic types for them instead. http://hackage.haskell.org/package/xmonad-0.12/docs/XMonad-Core.html#t:WindowSet is the actual type of what we normally refer to as the StackSet. -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.a.gebhart at gmail.com Thu Dec 8 04:19:31 2016 From: e.a.gebhart at gmail.com (e.a.gebhart at gmail.com) Date: Wed, 07 Dec 2016 23:19:31 -0500 Subject: [xmonad] Get width and height of current screen ? In-Reply-To: References: <87r35jjftg.fsf@gmail.com> Message-ID: <87oa0njbn0.fsf@gmail.com> Thank you that makes more sense. I do have import qualified XMonad.StackSet as W But everything makes more sense now that I'm looking at XMonad.Core. I'm also still struggling with monads and all the types. That might take me bit of time. XMonad may not be the best way to learn Haskell... Brandon Allbery writes: > On Thu, Dec 8, 2016 at 2:49 AM, wrote: > >> I have yet to successfully look inside the stackSet. I can tell that I'm >> not getting >> something that is very fundamental. >> > > Somewhere in a do block in X: > > rect <- fmap (W.screenRect . W.screenDetail . current) (gets windowset) > > (the type of this is > http://hackage.haskell.org/package/X11-1.6.1.2/docs/Graphics-X11-Xlib-Types.html#t:Rectangle > ) > > Also, you need to have imported the StackSet stuff properly: > > import qualified XMonad.StackSet as W > > The StackSet type is heavily parameterized because sjanssen ran the > XMonad.StackSet module through a code verifier which couldn't handle the > X11 types, so substituted basic types for them instead. > http://hackage.haskell.org/package/xmonad-0.12/docs/XMonad-Core.html#t:WindowSet > is the actual type of what we normally refer to as the StackSet. From allbery.b at gmail.com Thu Dec 8 04:22:40 2016 From: allbery.b at gmail.com (Brandon Allbery) Date: Thu, 8 Dec 2016 04:22:40 +0000 Subject: [xmonad] Get width and height of current screen ? In-Reply-To: <87oa0njbn0.fsf@gmail.com> References: <87r35jjftg.fsf@gmail.com> <87oa0njbn0.fsf@gmail.com> Message-ID: On Thu, Dec 8, 2016 at 4:19 AM, wrote: > XMonad may not be the best way > to learn Haskell... > It's actually a rather poor way to learn Haskell: programs tend to be sitting very close to the Xlib API, and usually end up looking like a "translation" of C to Haskell instead of like idiomatic Haskell code. -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: