diff options
| author | Josh Rahm <rahm@google.com> | 2021-11-10 10:54:06 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:45 -0600 |
| commit | b74311612b240c73eb60e3a5511bf111b1e8115e (patch) | |
| tree | 95c075b1a07606e72e881991ac04bb70a457a39f /src/Internal | |
| parent | d440f618a657a1eada3635832a5957ff8f51bd26 (diff) | |
| download | rde-b74311612b240c73eb60e3a5511bf111b1e8115e.tar.gz rde-b74311612b240c73eb60e3a5511bf111b1e8115e.tar.bz2 rde-b74311612b240c73eb60e3a5511bf111b1e8115e.zip | |
Upgrade to XMonad v0.17
Diffstat (limited to 'src/Internal')
| -rw-r--r-- | src/Internal/Layout.hs | 2 | ||||
| -rw-r--r-- | src/Internal/Marking.hs | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/Internal/Layout.hs b/src/Internal/Layout.hs index 8903fed..fed0fd9 100644 --- a/src/Internal/Layout.hs +++ b/src/Internal/Layout.hs @@ -52,7 +52,7 @@ data ThreeColDescMod = ThreeColDescMod class DescriptionModifier m l where newDescription :: m -> l a -> String -> String -instance (Show m, DescriptionModifier m l, LayoutClass l a) => LayoutClass (ModifyDescription m l) a where +instance (Typeable m, Show m, DescriptionModifier m l, LayoutClass l a) => LayoutClass (ModifyDescription m l) a where runLayout (W.Workspace t (ModifyDescription m l) a) rect = do (rects, maybeNewLayout) <- runLayout (W.Workspace t l a) rect return (rects, fmap (ModifyDescription m) maybeNewLayout) diff --git a/src/Internal/Marking.hs b/src/Internal/Marking.hs index 606b55e..f9083d2 100644 --- a/src/Internal/Marking.hs +++ b/src/Internal/Marking.hs @@ -9,6 +9,7 @@ import Data.Map (Map) import System.FilePath import System.IO import Control.Exception +import System.Environment import qualified Data.Map as Map @@ -26,16 +27,18 @@ data MarkContext = MarkContext (IORef MarkState) readMarkState :: IO MarkState readMarkState = do - dir <- getXMonadDir - let markstate = dir </> "markstate" + -- TODO(rahm) The mark state should use the extensible state constructs in the + -- XState rather than relying on IO. + dir <- getEnv "HOME" + let markstate = dir </> ".xmonad" </> "markstate" catch (read <$> (hGetContents =<< openFile markstate ReadMode)) (\(e :: IOError) -> return (MarkState mempty Nothing)) saveMarkState :: MarkState -> X () saveMarkState ms = do - dir <- getXMonadDir - let markstate = dir </> "markstate" + dir <- io $ getEnv "HOME" + let markstate = dir </> ".xmonad" </> "markstate" liftIO $ writeFile markstate (show ms) |