A session management module for xmonad
Latest commit e438540 Jan 1, 2014 @zaxtax Correct instructions
Failed to load latest commit information.
README.textile Correct instructions Jan 1, 2014
ViewDoc.hs merged loadDocuments into ViewDoc Dec 18, 2009
saveDocument.hs Initial changes Nov 21, 2009



xmonad-sessions is a way to use xmonad to control which of your applications
persist and are easily restored.


place ViewDoc.hs into ~/.xmonad/lib/

$ cp ViewDoc.hs ~/.xmonad/lib

compile saveDocument and loadDocuments and place in path

$ ghc --make saveDocument
$ mv saveDocument /home/user/bin

symlink all applications you want session saved

$ ln -s /usr/user/bin/saveDocument /home/user/bin/gv
$ ln -s /usr/user/bin/saveDocument /home/user/bin/evince

modify xmonad.hs

import XMonad
import qualified Data.Map as M
import ViewDoc

myLogHook :: X ()
myLogHook = do ewmhDesktopsLogHook

mykeys (XConfig {modMask = modm}) = M.fromList $
   [  ((modm, xK_s), toggleSaveState)
   ,  ((modm .|. shiftMask, xK_s), launchDocuments)

main = xmonad $ defaultConfig 
       { loghook = myLogHook
       , keys    = (\c -> mykeys c `M.union` keys defaultConfig c)


If you want to save any window focus over it and Mod-s.
Mod-s again will untoggle it

To restore all previous windows saved Mod-S

All applications that have been wrapped with saveDocument will be restorable