xmonad-screenshot: Workspaces screenshooting utility for XMonad.

[ library, mit, xmonad ] [ Propose Tags ]

See README.markdown


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2
Change log CHANGELOG.markdown
Dependencies base (>=3 && <5), gtk (>=0.12.3), xmonad (>=0.9) [details]
License MIT
Author Matvey Aksenov
Maintainer Dmitry Malikov, malikov.d.y@gmail.com
Category XMonad
Home page https://github.com/supki/xmonad-screenshot
Source repo head: git clone https://github.com/supki/xmonad-screenshot
this: git clone https://github.com/supki/xmonad-screenshot(tag 0.1.2)
Uploaded by DmitryMalikov at 2015-06-25T16:18:01Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2533 total (18 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-10-01 [all 2 reports]

Readme for xmonad-screenshot-0.1.2

[back to package description]

XMonad-screenshot

Hackage Build Status

gtk-based screen capturing utility for the XMonad window manager. It's flexible enough to give a user options for comprehensive captured workspaces' filtering and post-capture processing. By default it captures all existing workspaces and places resulting screenshot in ~/.xmonad/screenshot.png

Example screenshots

Caveats

Installation

You may want to make sure you have gtk2hs-buildtools package installed and its binaries are in PATH before installing xmonad-screenshot:

$ type gtk2hsC2hs
gtk2hsC2hs is /home/user/.cabal/bin/gtk2hsC2hs

If you do not see any encouraging output, try cabal install gtk2hs-buildtools and/or check PATH contains /home/user/.cabal/bin directory

Initialization

Due to gtk (and XMonad) constraints you need to initialize the capturing before using it. Place call to initCapturing before you call xmonad:

main :: IO ()
main = do
  initCapturing
  xmonad defaultConfig { ... }

Usage examples

The most simple usage example:

import XMonad.Util.WorkspaceScreenshot

myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
  [ ...
  , ((modm .|. shiftMask, xK_u), captureWorkspacesWhen defaultPredicate defaultHook horizontally)
  , ...
  ]

You can filter some blacklisted workspaces from capturing using predicates:

import XMonad.Util.WorkspaceScreenshot

predicate x = return $ x `notElem` ["blacklistedWorkspace1", "blacklistedWorkspace2"]

myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
  [ ...
  , ((modm .|. shiftMask, xK_u), captureWorkspacesWhen predicate defaultHook horizontally)
  , ...
  ]

You can move screenshot file somewhere using post-processing hook:

import Control.Monad.Trans
import System.FilePath
import System.Directory
import XMonad.Util.WorkspaceScreenshot

hook filepath =
  do hd <- getHomeDirectory
	 renameFile filepath (hd </> "Pictures" </> filepath)

myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
  [ ...
  , ((modm .|. shiftMask, xK_u), captureWorkspacesWhen defaultPredicate hook horizontally)
  , ...
  ]