diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2022-11-20 17:11:34 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-11-20 17:11:34 -0700 |
| commit | d3d67d059d2b56ceac63cebaa34802f2fb5a5019 (patch) | |
| tree | e11ec28eb13d5682dd56f84de05bac8960bb4c06 /src/Rahm/Desktop/XMobarLog.hs | |
| parent | 27dac9cb0fad229c88144b432a957f1cbd067b98 (diff) | |
| download | rde-d3d67d059d2b56ceac63cebaa34802f2fb5a5019.tar.gz rde-d3d67d059d2b56ceac63cebaa34802f2fb5a5019.tar.bz2 rde-d3d67d059d2b56ceac63cebaa34802f2fb5a5019.zip | |
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 "*").
Diffstat (limited to 'src/Rahm/Desktop/XMobarLog.hs')
| -rw-r--r-- | src/Rahm/Desktop/XMobarLog.hs | 12 |
1 files changed, 11 insertions, 1 deletions
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 "<fn=1><fc=#ffffff>[" + tell theater + tell "] </fc></fn>" + + Nothing -> tell " " + forM_ wss $ \(t, ws) -> do case t of Current -> tell "<fn=1><fc=#ff8888>" |