diff options
| author | Josh Rahm <rahm@google.com> | 2021-11-10 10:54:06 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2021-11-10 10:54:06 -0700 |
| commit | ebc4b4be4a5a361c2b4376ab2c1b92b052b61b8a (patch) | |
| tree | 95c075b1a07606e72e881991ac04bb70a457a39f | |
| parent | a6ff366f93d8123e5b897da6fbc74bfac64c1b2f (diff) | |
| download | rde-ebc4b4be4a5a361c2b4376ab2c1b92b052b61b8a.tar.gz rde-ebc4b4be4a5a361c2b4376ab2c1b92b052b61b8a.tar.bz2 rde-ebc4b4be4a5a361c2b4376ab2c1b92b052b61b8a.zip | |
Upgrade to XMonad v0.17
| -rw-r--r-- | package.yaml | 4 | ||||
| -rw-r--r-- | src/Internal/Layout.hs | 2 | ||||
| -rw-r--r-- | src/Internal/Marking.hs | 11 | ||||
| -rw-r--r-- | stack.yaml | 4 |
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) @@ -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 |