Module awesome-launch

Launch clients with single instance IDs using wm-launch.

Info:

  • Copyright: 2019 James Reed
  • Author: James Reed <jcrd@tuta.io>

Functions

client.by_id (id, filter) Get a launched client by its ID.
client.by_cmdline (cmd, filter) Get a launched client by its command line.
launch.spawn (cmd, args) Spawn a client with wm-launch.
spawn.single_instance (cmd, args) Spawn a command if an instance is not already running.
spawn.raise_or_spawn (cmd, args) Raise a client if it exists or spawn a new one then raise it.


Functions

client.by_id (id, filter)
Get a launched client by its ID.

Parameters:

  • id The ID.
  • filter Function to filter clients that are considered.

Returns:

    The client.
client.by_cmdline (cmd, filter)
Get a launched client by its command line.

Parameters:

  • cmd The command line.
  • filter Function to filter clients that are considered.

Returns:

    The client.
launch.spawn (cmd, args)
Spawn a client with wm-launch.

Parameters:

  • cmd The command.
  • args Table containing the single instance ID and additional arguments
    • id Single instance ID.
    • props Properties to apply to the client.
    • pwd Pathname to the working directory for new clients.
    • timeout Seconds after which to stop waiting for a client to spawn.
    • callback Function to call with client when it spawns.
    • factory The factory to use (see wm-launch's -f flag).
    • firejail If true, run cmd with firejail.

Returns:

    The client's ID.
spawn.single_instance (cmd, args)
Spawn a command if an instance is not already running.

Parameters:

  • cmd The command.
  • args Table containing the single instance ID and additional arguments for spawn
    • id Single instance ID.
    • props Properties to apply to the client.
    • pwd Pathname to the working directory for new clients.
    • timeout Seconds after which to stop waiting for a client to spawn.
    • callback Function to call with client when it spawns.
    • factory The factory to use (see wm-launch's -f flag).
    • firejail If true, run cmd with firejail.
    • filter Function to filter clients that are considered.

Returns:

    The client's ID.
spawn.raise_or_spawn (cmd, args)
Raise a client if it exists or spawn a new one then raise it.

Parameters:

  • cmd The command.
  • args Table containing the single instance ID and additional arguments for spawn
    • id Single instance ID.
    • props Properties to apply to the client.
    • pwd Pathname to the working directory for new clients.
    • timeout Seconds after which to stop waiting for a client to spawn.
    • callback Function to call with client when it spawns.
    • factory The factory to use (see wm-launch's -f flag).
    • firejail If true, run cmd with firejail.
    • filter Function to filter clients that are considered.

Returns:

    The client's ID.
generated by LDoc 1.4.6 Last updated 2019-07-02 17:25:40