[xmonad] Get width and height of current screen ?
e.a.gebhart at gmail.com
e.a.gebhart at gmail.com
Thu Dec 8 04:19:31 UTC 2016
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 <allbery.b at gmail.com> writes:
> On Thu, Dec 8, 2016 at 2:49 AM, <e.a.gebhart at gmail.com> 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.
More information about the xmonad
mailing list