xmonad-contrib-0.11.4: Third party extensions for xmonad

Copyright(c) Spencer Janssen
LicenseBSD
MaintainerSpencer Janssen <spencerjanssen@gmail.com>
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell98

XMonad.Actions.SpawnOn

Contents

Description

Provides a way to modify a window spawned by a command(e.g shift it to the workspace it was launched on) 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

Usage

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

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

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

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

The module can also be used to apply other manage hooks to the window of the spawned application(e.g. float or resize it).

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

manageSpawn :: ManageHook

Provides a manage hook to react on process spawned with spawnOn, spawnHere etc.

spawnHere :: String -> X ()

Replacement for spawn which launches application on current workspace.

spawnOn :: WorkspaceId -> String -> X ()

Replacement for spawn which launches application on given workspace.

spawnAndDo :: ManageHook -> String -> X ()

Spawn an application and apply the manage hook when it opens.

shellPromptHere :: XPConfig -> X ()

Replacement for Shell prompt (XMonad.Prompt.Shell) which launches application on current workspace.

shellPromptOn :: WorkspaceId -> XPConfig -> X ()

Replacement for Shell prompt (XMonad.Prompt.Shell) which launches application on given workspace.