From 61c654615dc4cf624ecd7b9454c85833ee9e618d Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Tue, 10 Apr 2007 08:47:14 +0200 Subject: Move workspace fetching logic from Config.hs to Operations.hs darcs-hash:20070410064714-a5988-e9b1fac201a546d1722db41213efc81223007e43.gz --- Operations.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Operations.hs') diff --git a/Operations.hs b/Operations.hs index 86d6da1..01585e4 100644 --- a/Operations.hs +++ b/Operations.hs @@ -238,6 +238,10 @@ view o = do setTopFocus where n = o-1 +-- | 'screenWorkspace sc' returns the workspace number viewed by 'sc'. +screenWorkspace :: Int -> X Int +screenWorkspace sc = fmap (succ . fromMaybe 0 . W.workspace sc) (gets workspace) + -- | True if window is under management by us isClient :: Window -> X Bool isClient w = liftM (W.member w) (gets workspace) -- cgit v1.2.3