diff options
| author | Josh Rahm <rahm@google.com> | 2022-04-09 15:09:55 -0600 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2022-04-09 15:09:55 -0600 |
| commit | b8428f25d0beeb9ee08fdb51d35d6c912d24f72a (patch) | |
| tree | 7e668f37fd957cf294cc1f7d44d80659c1b6eee0 /src/Internal/Windows.hs | |
| parent | f1f5993a10d57674c635f0cf3b2ffe47f77e9d5c (diff) | |
| download | rde-b8428f25d0beeb9ee08fdb51d35d6c912d24f72a.tar.gz rde-b8428f25d0beeb9ee08fdb51d35d6c912d24f72a.tar.bz2 rde-b8428f25d0beeb9ee08fdb51d35d6c912d24f72a.zip | |
Change mosaic to respond to multiple different kinds of messages
Diffstat (limited to 'src/Internal/Windows.hs')
| -rw-r--r-- | src/Internal/Windows.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Internal/Windows.hs b/src/Internal/Windows.hs index 98baa51..45fea95 100644 --- a/src/Internal/Windows.hs +++ b/src/Internal/Windows.hs @@ -3,7 +3,7 @@ module Internal.Windows where import XMonad (windowset, X, Window, get) import Control.Applicative ((<|>)) -import XMonad.StackSet (Stack(..), StackSet(..), Screen(..), Workspace(..), integrate, integrate', allWindows) +import XMonad.StackSet (Stack(..), StackSet(..), Screen(..), Workspace(..), peek, integrate, integrate', allWindows) import Data.Maybe (listToMaybe, catMaybes) import qualified Data.Map as Map @@ -52,6 +52,10 @@ forAllWindows fn = do stackSet <- windowset <$> get mapM_ fn (allWindows stackSet) +getFocusedWindow :: X (Maybe Window) +getFocusedWindow = do + (peek . windowset) <$> get + {- Finds a Window and returns the screen its on and the workspace its on. - Returns nothing if the window doesn't exist. - |