diff options
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Stockholm/Shutdown.hs | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/XMonad/Stockholm/Shutdown.hs b/XMonad/Stockholm/Shutdown.hs index 164ddd8..6786c7c 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,5 @@ 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)) - _ <- io $ do - path <- getEnv "XMONAD_STATE" - writeFile path (unlines s) - exitSuccess - return () + writeStateToFile + io exitSuccess >> return () |