aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-06-29 23:39:17 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-06-29 23:39:17 +0200
commitdc49874c83c20b17b5b6ea5ab63e638402ba8f1a (patch)
treed938fa4d290b5d324229fdf915b36ae6b86d6d45 /XMonad.hs
parent31209bf181ca53a126049cad67e90cb4ddc98b31 (diff)
downloadxmonad-dc49874c83c20b17b5b6ea5ab63e638402ba8f1a.tar.gz
xmonad-dc49874c83c20b17b5b6ea5ab63e638402ba8f1a.tar.xz
xmonad-dc49874c83c20b17b5b6ea5ab63e638402ba8f1a.zip
Move screen details into StackSet
darcs-hash:20070629213917-a5988-3ad31d8f028efcec41c9c4805c01c2d42c0009b2.gz
Diffstat (limited to '')
-rw-r--r--XMonad.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/XMonad.hs b/XMonad.hs
index bc54bfd..8eec7b1 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -15,7 +15,7 @@
-----------------------------------------------------------------------------
module XMonad (
- X, WindowSet, WorkspaceId(..), ScreenId(..), XState(..), XConf(..), Layout(..),
+ X, WindowSet, WorkspaceId(..), ScreenId(..), ScreenDetail(..), XState(..), XConf(..), Layout(..),
Typeable, Message, SomeMessage(..), fromMessage, runLayout,
runX, catchX, io, catchIO, withDisplay, withWindowSet, isRoot, spawn, restart, trace, whenJust, whenX,
atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW
@@ -30,6 +30,8 @@ import System.Posix.Process (executeFile, forkProcess, getProcessStatus, createS
import System.Exit
import System.Environment
import Graphics.X11.Xlib
+-- for Read instance
+import Graphics.X11.Xlib.Extras ()
import Data.Typeable
import qualified Data.Map as M
@@ -39,8 +41,6 @@ import qualified Data.Set as S
-- Just the display, width, height and a window list
data XState = XState
{ windowset :: !WindowSet -- ^ workspace list
- , xineScreens :: ![Rectangle] -- ^ dimensions of each screen
- , statusGaps :: ![(Int,Int,Int,Int)] -- ^ width of status bar on each screen
, mapped :: !(S.Set Window) -- ^ the Set of mapped windows
, waitingUnmap :: !(M.Map Window Int) -- ^ the number of expected UnmapEvents
, layouts :: !(M.Map WorkspaceId (Layout Window, [Layout Window])) }
@@ -51,7 +51,7 @@ data XConf = XConf
, normalBorder :: !Pixel -- ^ border color of unfocused windows
, focusedBorder :: !Pixel } -- ^ border color of the focused window
-type WindowSet = StackSet WorkspaceId Window ScreenId
+type WindowSet = StackSet WorkspaceId Window ScreenId ScreenDetail
-- | Virtual workspace indicies
newtype WorkspaceId = W Int deriving (Eq,Ord,Show,Read,Enum,Num,Integral,Real)
@@ -59,6 +59,10 @@ newtype WorkspaceId = W Int deriving (Eq,Ord,Show,Read,Enum,Num,Integral,Real)
-- | Physical screen indicies
newtype ScreenId = S Int deriving (Eq,Ord,Show,Read,Enum,Num,Integral,Real)
+data ScreenDetail = SD { screenRect :: !Rectangle
+ , statusGap :: !(Int,Int,Int,Int) -- ^ width of status bar on the screen
+ } deriving (Eq,Show, Read)
+
------------------------------------------------------------------------
-- | The X monad, a StateT transformer over IO encapsulating the window