From 02198e22932192aede4a73e7a121007c76093e5f Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sat, 25 Nov 2023 20:03:34 -0700 Subject: Change history to work on a per-screen basis. This change is still experimental, but it is more intuitive that each screen has its own history because each screen is generally dedicated to a specific use case. I'm going to try this on for size, though it is possible that per-workspace history mighte prove to be more useful. We'll see. --- src/Rahm/Desktop/Common.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Rahm/Desktop/Common.hs') 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 -- cgit