Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $> git diff
- diff --git a/src/XMonad/Util/WorkspaceScreenshot.hs b/src/XMonad/Util/WorkspaceScreenshot.hs
- index 22080fc..1e938c5 100644
- --- a/src/XMonad/Util/WorkspaceScreenshot.hs
- +++ b/src/XMonad/Util/WorkspaceScreenshot.hs
- @@ -15,12 +15,12 @@ module XMonad.Util.WorkspaceScreenshot
- import Control.Applicative ((<$>))
- import Control.Concurrent (threadDelay)
- -import Control.Monad (filterM, foldM_, (>=>))
- +import Control.Monad (filterM, foldM_, (>=>), void)
- import Data.Maybe (catMaybes)
- import System.Directory (getAppUserDataDirectory)
- import System.FilePath ((</>), (<.>))
- -import Graphics.UI.Gtk (Rectangle(..), drawableGetSize, drawWindowGetDefaultRootWindow)
- +import Graphics.UI.Gtk (initGUI, Rectangle(..), drawableGetSize, drawWindowGetDefaultRootWindow)
- import Graphics.UI.Gtk.Gdk.Pixbuf (Colorspace(ColorspaceRgb), Pixbuf, pixbufCopyArea, pixbufGetFromDrawable, pixbufGetHeight, pixbufGetWidth, pixbufNew, pixbufSave)
- import XMonad hiding (Image, Rectangle)
- import qualified XMonad.StackSet as S
- @@ -36,6 +36,7 @@ captureWorkspacesWhen p hook = captureWorkspacesWhenId (workspaceIdToWindowSpace
- -- | Capture screens from workspaces which id satisfies given predicate.
- captureWorkspacesWhenId ∷ (WorkspaceId → X Bool) → (FilePath → IO ()) → CapturingLayout → X ()
- captureWorkspacesWhenId p hook mode = do
- + xfork $ void initGUI
- c ← gets $ S.currentTag . windowset
- ps ← catMaybes <$> (mapM (\t → windows (S.view t) >> captureScreen) =<< filterM p =<< asks (workspaces . config))
- windows $ S.view c
Advertisement
Add Comment
Please, Sign In to add comment