Merge pull request #667 from geekosaur/664-spawnonce-documentation

document need for `manageSpawn` in `SpawnOnce`
This commit is contained in:
Tony Zorman 2021-12-27 17:30:46 +01:00 committed by GitHub
commit 4d387bbfc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,13 @@
-- --
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
module XMonad.Util.SpawnOnce (spawnOnce, spawnOnOnce, spawnNOnOnce, spawnAndDoOnce) where module XMonad.Util.SpawnOnce (spawnOnce,
-- * 'SpawnOn' helpers
-- $spawnon
manageSpawn,
spawnOnOnce,
spawnNOnOnce,
spawnAndDoOnce) where
import XMonad import XMonad
import XMonad.Actions.SpawnOn import XMonad.Actions.SpawnOn
@ -43,7 +49,12 @@ doOnce f s = do
spawnOnce :: String -> X () spawnOnce :: String -> X ()
spawnOnce = doOnce spawn spawnOnce = doOnce spawn
-- | Like spawnOnce but launches the application on the given workspace. -- $spawnon
-- These functions combine 'spawnOnce' with their relatives in
-- 'XMonad.Actions.SpawnOn'. You must add 'manageSpawn' to your
-- @manageHook@ for them to work, as with @SpawnOn@.
-- | Like 'spawnOnce' but launches the application on the given workspace.
spawnOnOnce :: WorkspaceId -> String -> X () spawnOnOnce :: WorkspaceId -> String -> X ()
spawnOnOnce ws = doOnce (spawnOn ws) spawnOnOnce ws = doOnce (spawnOn ws)