Copyright | (c) Spencer Janssen |
---|---|
License | BSD |
Maintainer | Spencer Janssen <spencerjanssen@gmail.com> |
Stability | unstable |
Portability | unportable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data Spawner
- manageSpawn :: ManageHook
- manageSpawnWithGC :: ([(ProcessID, ManageHook)] -> X [(ProcessID, ManageHook)]) -> ManageHook
- spawnHere :: String -> X ()
- spawnOn :: WorkspaceId -> String -> X ()
- spawnAndDo :: ManageHook -> String -> X ()
- shellPromptHere :: XPConfig -> X ()
- shellPromptOn :: WorkspaceId -> XPConfig -> X ()
Usage
You can use this module with the following in your ~/.xmonad/xmonad.hs
:
import XMonad.Actions.SpawnOn
main = do xmonad def { ... manageHook = manageSpawn <> manageHook def ... }
To ensure that application appears on a workspace it was launched at, add keybindings like:
, ((mod1Mask,xK_o), spawnHere "urxvt") , ((mod1Mask,xK_s), shellPromptHere def)
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.
Instances
ExtensionClass Spawner Source # | |
Defined in XMonad.Actions.SpawnOn initialValue :: Spawner # extensionType :: Spawner -> StateExtension # |
:: ([(ProcessID, ManageHook)] -> X [(ProcessID, ManageHook)]) | function to stop accumulation of entries for windows that never set |
-> ManageHook |
spawnHere :: String -> X () Source #
Replacement for spawn
which launches
application on current workspace.
spawnOn :: WorkspaceId -> String -> X () Source #
Replacement for spawn
which launches
application on given workspace.
spawnAndDo :: ManageHook -> String -> X () Source #
Spawn an application and apply the manage hook when it opens.
shellPromptHere :: XPConfig -> X () Source #
Replacement for Shell prompt (XMonad.Prompt.Shell) which launches application on current workspace.
shellPromptOn :: WorkspaceId -> XPConfig -> X () Source #
Replacement for Shell prompt (XMonad.Prompt.Shell) which launches application on given workspace.