summaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Stockholm/Shutdown.hs15
1 files changed, 1 insertions, 14 deletions
diff --git a/XMonad/Stockholm/Shutdown.hs b/XMonad/Stockholm/Shutdown.hs
index 164ddd8..ef8da71 100644
--- a/XMonad/Stockholm/Shutdown.hs
+++ b/XMonad/Stockholm/Shutdown.hs
@@ -7,12 +7,8 @@ module XMonad.Stockholm.Shutdown
)
where
-import qualified Data.Map as Map
-import qualified XMonad.StackSet as W
import Control.Monad
-import Data.Maybe (catMaybes)
import Data.Monoid
-import System.Environment (getEnv)
import System.Exit (exitSuccess)
import XMonad
@@ -39,16 +35,7 @@ handleShutdownEvent = \case
shutdown :: X ()
shutdown = do
broadcastMessage ReleaseResources
- io . flush =<< asks display
- let wsData = show . W.mapLayout show . windowset
- maybeShow (t, Right (PersistentExtension ext)) = Just (t, show ext)
- maybeShow (t, Left str) = Just (t, str)
- maybeShow _ = Nothing
- extState =
- return . show . catMaybes . map maybeShow . Map.toList . extensibleState
- s <- gets (\s -> (wsData s : extState s))
+ writeStateToFile
_ <- io $ do
- path <- getEnv "XMONAD_STATE"
- writeFile path (unlines s)
exitSuccess
return ()