[xmonad] Get width and height of current screen ?

Brandon Allbery allbery.b at gmail.com
Thu Dec 8 02:57:52 UTC 2016


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.



-- 
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: <http://mail.haskell.org/pipermail/xmonad/attachments/20161208/918f0dbf/attachment.html>


More information about the xmonad mailing list