aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.yaml4
-rw-r--r--src/Internal/Layout.hs2
-rw-r--r--src/Internal/Marking.hs11
-rw-r--r--stack.yaml4
4 files changed, 14 insertions, 7 deletions
diff --git a/package.yaml b/package.yaml
index bc8e530..e9e59d9 100644
--- a/package.yaml
+++ b/package.yaml
@@ -8,8 +8,8 @@ executables:
dependencies:
- base >= 4.0.0
- - xmonad
- - xmonad-contrib
+ - xmonad >= 0.17
+ - xmonad-contrib >= 0.17
- directory
- filepath
- process
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)
diff --git a/stack.yaml b/stack.yaml
index e592062..9c394eb 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -71,3 +71,7 @@ packages:
#
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor
+
+extra-deps:
+ - xmonad-0.17.0@sha256:fc90c8fa647390c68c902912a5a7417f04025dfe72f7de51b248217f7ca0d484,5533
+ - xmonad-contrib-0.17.0@sha256:defd04a9ca0e031eb7280b734ccd6d6b73f757babfe4a561a7ff718e75211749,20357