Module awesome-launch

Launch clients with single instance IDs using wm-launch.

Info:

  • Copyright: 2019-2020 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.
spawn.here (tag_func) Spawn clients on a tag.


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).
    • systemd If true, run cmd with systemd-run.
    • firejail If true, run cmd with firejail.
    • rule Fallback client rule used if setting the ID fails.

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).
    • systemd If true, run cmd with systemd-run.
    • firejail If true, run cmd with firejail.
    • rule Fallback client rule used if setting the ID fails.
    • 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.
    • raise_callback Function to call with client when it spawns or is raised.
    • factory The factory to use (see wm-launch's -f flag).
    • systemd If true, run cmd with systemd-run.
    • firejail If true, run cmd with firejail.
    • rule Fallback client rule used if setting the ID fails.
    • filter Function to filter clients that are considered.

Returns:

    The client's ID.
spawn.here (tag_func)
Spawn clients on a tag.

Usage: launch.spawn.here().spawn("xterm")

Parameters:

  • tag_func Optional function that returns the tag, defaults to awful.screen.focused().selected_tag.

Returns:

    A table with the functions: spawn, single_instance, raise_or_spawn.
generated by LDoc 1.4.6 Last updated 2020-12-20 15:51:19