xmonad-contrib-bluetilebranch-0.8.1: Third party extensions for xmonadSource codeContentsIndex
XMonad.Actions.SpawnOn
Portabilityunportable
Stabilityunstable
MaintainerSpencer Janssen <spencerjanssen@gmail.com>
Contents
Usage
Description
Provides a way to spawn an application on a specific workspace by using the _NET_WM_PID property that most windows set on creation. Hence this module won't work on applications that don't set this property.
Synopsis
data Spawner
mkSpawner :: (Functor m, MonadIO m) => m Spawner
manageSpawn :: Spawner -> ManageHook
spawnHere :: Spawner -> String -> X ()
spawnOn :: Spawner -> WorkspaceId -> String -> X ()
shellPromptHere :: Spawner -> XPConfig -> X ()
shellPromptOn :: Spawner -> WorkspaceId -> XPConfig -> X ()
Usage

You can use this module with the following in your ~/.xmonad/xmonad.hs:

    import XMonad.Actions.SpawnOn
    main = do
      sp <- mkSpawner
      xmonad defaultConfig {
         ...
         manageHook = manageSpawn sp <+> manageHook defaultConfig
         ...
      }

To ensure that application appears on a workspace it was launched at, add keybindings like:

  , ((mod1Mask,xK_o), spawnHere sp "urxvt")
  , ((mod1Mask,xK_s), shellPromptHere sp defaultXPConfig)

For detailed instructions on editing your key bindings, see XMonad.Doc.Extending.

data Spawner Source
mkSpawner :: (Functor m, MonadIO m) => m SpawnerSource
Create Spawner which then has to be passed to other functions.
manageSpawn :: Spawner -> ManageHookSource
Provides a manage hook to react on process spawned with spawnOn, spawnHere etc.
spawnHere :: Spawner -> String -> X ()Source
Replacement for spawn which launches application on current workspace.
spawnOn :: Spawner -> WorkspaceId -> String -> X ()Source
Replacement for spawn which launches application on given workspace.
shellPromptHere :: Spawner -> XPConfig -> X ()Source
Replacement for Shell prompt (XMonad.Prompt.Shell) which launches application on current workspace.
shellPromptOn :: Spawner -> WorkspaceId -> XPConfig -> X ()Source
Replacement for Shell prompt (XMonad.Prompt.Shell) which launches application on given workspace.
Produced by Haddock version 2.4.2