diff options
| author | Josh Rahm <rahm@google.com> | 2022-04-09 15:09:55 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:46 -0600 |
| commit | 3f6b3dd99cd45fdd063580fa1deb03257c65e83e (patch) | |
| tree | 7e668f37fd957cf294cc1f7d44d80659c1b6eee0 /src/Internal/Windows.hs | |
| parent | c796e7533cd8da13f42961966313c926810f6468 (diff) | |
| download | rde-3f6b3dd99cd45fdd063580fa1deb03257c65e83e.tar.gz rde-3f6b3dd99cd45fdd063580fa1deb03257c65e83e.tar.bz2 rde-3f6b3dd99cd45fdd063580fa1deb03257c65e83e.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. - |