From d3d67d059d2b56ceac63cebaa34802f2fb5a5019 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sun, 20 Nov 2022 17:11:34 -0700 Subject: Add "Theaters" to RDE. A "Theater" is basically the state of the "StackSet". This means that jumping to a Theater will reset all the windows to where they were when the user last left that theater, or an empty theater if there is not. New windows that a theater does not know about are put in the "hidden" workspace (which is "*"). --- src/Rahm/Desktop/XMobarLog.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/Rahm/Desktop/XMobarLog.hs') diff --git a/src/Rahm/Desktop/XMobarLog.hs b/src/Rahm/Desktop/XMobarLog.hs index af0a1a1..9ea8bad 100644 --- a/src/Rahm/Desktop/XMobarLog.hs +++ b/src/Rahm/Desktop/XMobarLog.hs @@ -15,6 +15,7 @@ import XMonad (X) import Rahm.Desktop.Workspaces (getPopulatedWorkspaces, WorkspaceState(..)) import Text.Printf import Rahm.Desktop.Logger +import Rahm.Desktop.Theater (getCurrentTheaterName) import qualified XMonad as X import qualified Rahm.Desktop.StackSet as S @@ -41,6 +42,7 @@ xMobarLogHook (XMobarLog xmproc) = do (_, _, layoutXpm) <- drawLayout loglevel <- getLogLevel + currentTheater <- getCurrentTheaterName winset <- X.gets X.windowset title <- maybe (pure "") (fmap show . getName) . S.peek $ winset @@ -49,9 +51,17 @@ xMobarLogHook (XMobarLog xmproc) = do let log = trunc 80 $ execWriter $ do tell " " tell (toChangeLayoutAction layoutXpm) - tell " " + tell " " tell $ logLevelToXMobar loglevel + case currentTheater of + Just theater -> do + tell "[" + tell theater + tell "] " + + Nothing -> tell " " + forM_ wss $ \(t, ws) -> do case t of Current -> tell "" -- cgit