xmonad-contrib-0.14: Third party extensions for xmonad

Copyright(c) 2010 Alejandro Serrano
LicenseBSD-style (see xmonad/LICENSE)
Maintainertrupill@gmail.com
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell98

XMonad.Util.Image

Contents

Description

Utilities for manipulating [[Bool]] as images

Synopsis

Usage:

This module uses matrices of boolean values as images. When drawing them, a True value tells that we want the fore color, and a False value that we want the background color to be painted. In the module we suppose that those matrices are represented as [[Bool]], so the lengths of the inner lists must be the same.

See Xmonad.Layout.Decoration for usage examples

data Placement Source #

Placement of the icon in the title bar

Constructors

OffsetLeft Int Int

An exact amount of pixels from the upper left corner

OffsetRight Int Int

An exact amount of pixels from the right left corner

CenterLeft Int

Centered in the y-axis, an amount of pixels from the left

CenterRight Int

Centered in the y-axis, an amount of pixels from the right

iconPosition :: Rectangle -> Placement -> [[Bool]] -> (Position, Position) Source #

Return the x and y positions inside a Rectangle to start drawing the image given its Placement

drawIcon :: (Functor m, MonadIO m) => Display -> Drawable -> GC -> String -> String -> Position -> Position -> [[Bool]] -> m () Source #

Draw an image into a X surface