diff options
author | lassulus <lassulus@lassul.us> | 2017-12-03 21:46:07 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2017-12-03 22:03:30 +0100 |
commit | 9d99d9f94e49ab7ca1232cc8b3de09b6ef956251 (patch) | |
tree | 283efda42fd01c501f31c25b7c12b3370edbccc9 /XMonad | |
parent | 179d29fd4c765dee698058ef63295331ac603639 (diff) |
shutdown: use writeStateToFileprism/newestprism/masterprism/lassulus
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Stockholm/Shutdown.hs | 15 |
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 () |