aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Common.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Rahm/Desktop/Common.hs')
-rw-r--r--src/Rahm/Desktop/Common.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Rahm/Desktop/Common.hs b/src/Rahm/Desktop/Common.hs
index 730a216..0ac41a7 100644
--- a/src/Rahm/Desktop/Common.hs
+++ b/src/Rahm/Desktop/Common.hs
@@ -7,6 +7,7 @@ module Rahm.Desktop.Common
windowJump,
withBorderColor,
withBorderWidth,
+ getCurrentScreen,
gotoWorkspace,
moveLocationToWorkspace,
getCurrentWorkspace,
@@ -37,7 +38,8 @@ import qualified Rahm.Desktop.StackSet as S
)
import Text.Printf (printf)
import XMonad
- ( Window,
+ ( ScreenId,
+ Window,
WorkspaceId,
X,
XConf (config, display),
@@ -169,6 +171,10 @@ getCurrentWorkspace = withWindowSet $
\(S.StackSet (S.Screen (S.Workspace t _ _) _ _) _ _ _) -> do
return t
+getCurrentScreen :: X ScreenId
+getCurrentScreen = withWindowSet $
+ \(S.StackSet (S.Screen _ sid _) _ _ _) -> return sid
+
getCurrentLocation :: X Location
getCurrentLocation = do
ws <- getCurrentWorkspace