X.U.DynamicScratchpads: Deprecate

This commit is contained in:
slotThe 2022-03-02 19:24:26 +01:00
parent f6334b6af6
commit bc2aaf41af
2 changed files with 9 additions and 2 deletions

View File

@ -24,6 +24,11 @@
in the module's documentation) should _not_ notice any difference in the module's documentation) should _not_ notice any difference
in behaviour. in behaviour.
* `XMonad.Util.DynamicScratchpads`
- Deprecated the module; use the new dynamic scratchpad
functionality of `XMonad.Util.NamedScratchpad` instead.
[on the website]: https://xmonad.org/configurations.html [on the website]: https://xmonad.org/configurations.html
### New Modules ### New Modules

View File

@ -13,7 +13,7 @@
-- --
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
module XMonad.Util.DynamicScratchpads ( module XMonad.Util.DynamicScratchpads {-# DEPRECATED "Use the dynamic scratchpad facility of XMonad.Util.NamedScratchpad instead." #-} (
-- * Usage -- * Usage
-- $usage -- $usage
makeDynamicSP, makeDynamicSP,
@ -36,7 +36,7 @@ import qualified XMonad.Util.ExtensibleState as XS
-- Like with XMonad.Util.NamedScratchpad, you have to have a workspace called -- Like with XMonad.Util.NamedScratchpad, you have to have a workspace called
-- NSP, where hidden scratchpads will be moved to. -- NSP, where hidden scratchpads will be moved to.
-- --
-- You can declare dynamic scrachpads in your xmonad.hs like so: -- You can declare dynamic scratchpads in your xmonad.hs like so:
-- --
-- import XMonad.Util.DynamicScratchpads -- import XMonad.Util.DynamicScratchpads
-- --
@ -65,6 +65,7 @@ makeDynamicSP s w = do
Just ow -> if w == ow Just ow -> if w == ow
then removeDynamicSP s then removeDynamicSP s
else showWindow ow >> addDynamicSP s w else showWindow ow >> addDynamicSP s w
{-# DEPRECATED makeDynamicSP "Use XMonad.Util.NamedScratchpad.toggleDynamicNSP instead" #-}
-- | Spawn the specified dynamic scratchpad -- | Spawn the specified dynamic scratchpad
spawnDynamicSP :: String -- ^ Scratchpad name spawnDynamicSP :: String -- ^ Scratchpad name
@ -72,6 +73,7 @@ spawnDynamicSP :: String -- ^ Scratchpad name
spawnDynamicSP s = do spawnDynamicSP s = do
(SPStorage m) <- XS.get (SPStorage m) <- XS.get
maybe mempty spawnDynamicSP' (M.lookup s m) maybe mempty spawnDynamicSP' (M.lookup s m)
{-# DEPRECATED spawnDynamicSP "Use XMonad.Util.NamedScratchpad.dynamicNSPAction instead" #-}
spawnDynamicSP' :: Window -> X () spawnDynamicSP' :: Window -> X ()
spawnDynamicSP' w = withWindowSet $ \s -> do spawnDynamicSP' w = withWindowSet $ \s -> do