XMonad.Util.SpawnOnce

xmonad-contrib-0.18.1: Community-maintained extensions for xmonad

Copyright | (c) Spencer Janssen 2009
License | BSD3-style (see LICENSE)
Maintainer | spencerjanssen@gmail.com
Stability | unstable
Portability | not portable
Safe Haskell | None
Language | Haskell2010

XMonad.Util.SpawnOnce

Contents

- `SpawnOn` helpers

Description

A module for spawning a command once, and only once. Useful to start status bars and make session settings inside startupHook. See also XMonad.Util.SessionStart for a different and more flexible way to run commands only on first startup.

Synopsis

- spawnOnce :: String -> X ()
- manageSpawn :: ManageHook
- spawnOnOnce :: WorkspaceId -> String -> X ()
- spawnNOnOnce :: Int -> WorkspaceId -> String -> X ()
- spawnAndDoOnce :: ManageHook -> String -> X ()

# Documentation

spawnOnce :: String -> X () #

The first time `spawnOnce` is executed on a particular command, that command is executed. Subsequent invocations for a command do nothing.

# `SpawnOn` helpers

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`.

manageSpawn :: ManageHook #

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

spawnOnOnce :: WorkspaceId -> String -> X () #

Like `spawnOnce` but launches the application on the given workspace.

spawnNOnOnce :: Int -> WorkspaceId -> String -> X () #

Lanch the given application n times on the specified workspace. Subsequent attempts to spawn this application will be ignored.

spawnAndDoOnce :: ManageHook -> String -> X () #

Spawn the application once and apply the manage hook. Subsequent attempts to spawn this application will be ignored.