Skip to content

A session management module for xmonad

Notifications You must be signed in to change notification settings

swillner/xmonad-sessions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

xmonad-sessions

Simplified version of zaxtax/xmonad-sessions that also saves workspace of the windows to be restored. xmonad-sessions is a way to use xmonad to control which of your applications persist and are easily restored.

Installing

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


$ cp ViewDoc.hs ~/.xmonad/lib

modify xmonad.hs to import:


import ViewDoc
import XMonad.Actions.SpawnOn

and call toggleSaveState to save/unsave focused window and launchDocuments to restore all saved windows, e.g. bind it to keys:


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

And use manageSpawn in your manageHooks, e.g.


main = xmonad $ defaultConfig 
       { managehook = manageSpawn <+> myManageHook
       , ...
       }

Using

For a setup as described above:

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

About

A session management module for xmonad

Topics

Resources

Stars

Watchers

Forks

Languages

  • Haskell 100.0%