AwesomeWM library for launching clients with single instance IDs
Go to file
James Reed 771cd555f4
Update version to v0.4.3
2021-11-07 15:54:48 -07:00
rockspec Update version to v0.4.3 2021-11-07 15:54:48 -07:00
.gitignore Add .gitignore 2020-08-05 14:27:24 -06:00
Dockerfile.toolbox toolbox: Use lua-toolbox 2020-12-13 16:55:13 -07:00
LICENSE Change license to MIT 2020-09-16 11:28:51 -06:00
Makefile Makefile: Add target to serve gh-pages with python 2020-08-05 14:48:37 -06:00
README.md README: Require `wm-launch` version >= 0.5.0 2020-12-31 16:36:19 -07:00
awesome-launch Change license to MIT 2020-09-16 11:28:51 -06:00
config.ld Add workspaces 2019-09-16 08:12:35 -06:00
init.lua Ensure client is assigned to an active tag 2021-03-05 17:03:35 -07:00
panel.lua panel: Ensure client is valid after delayed call 2021-01-25 05:27:45 -07:00
shared.lua Change license to MIT 2020-09-16 11:28:51 -06:00
widget.lua Reformat 2020-12-20 17:11:35 -07:00
workspace.lua workspace: Don't delete tags with pending clients 2021-11-07 15:52:39 -07:00

README.md

awesome-launch

awesome-launch is a library for Awesome window manager that provides functions to spawn clients with single instance IDs using wm-launch.

Dependencies

Installation

$ git clone https://github.com/jcrd/awesome-launch.git
$ cd awesome-launch
$ luarocks make --local rockspec/awesome-launch-devel-1.rockspec

Usage

Require the library:

local launch = require("awesome-launch")

Now spawn a client:

launch.spawn("xterm", {id="xterm1"})

The new client will have these properties set:

  • single_instance_id = "xterm1"
  • cmdline = "xterm"

See the API documentation for descriptions of all functions.

Workspaces

Require the library:

local ws = require("awesome-launch.workspace")

Add a new workspace:

ws.add("code", {
  pwd = "/home/user/code",
  clients = {
    "xterm -e vim",
    {"qutebrowser", {factory="qutebrowser"}},
  }
})

A new tag named code will be created with the working directory and clients listed above.

Widget

A launchbar widget is provided to visualize pending clients.

Customize the launchbar:

launch.widget.color = beautiful.fg_focus

Create a new launchbar for the given screen:

screen.connect_signal("request::desktop_decoration", function (s)
  ...
  s.launchbar = launch.widget.launchbar {
    screen = s,
  }
  s.mywibox:setup {
    ...
    s.launchbar,
    ...
  }
end)

Command-line client

awesome-launch is a wrapper around awesome-client that can be used to launch clients from the command line with single instance IDs tracked by Awesome.

Usage

usage: awesome-launch [options] COMMAND...

options:
  -h          Show help message
  -s          Launch with systemd-run
  -j          Launch with firejail
  -f FACTORY  Launch via a window factory
  -i ID       The single instance ID to use
  -1          Spawn if not already running
  -r          Raise or spawn

Enable use of awesome-client by including the following in rc.lua:

require("awful.remote")

If installed via luarocks, ensure awesome-launch's location is in your PATH.

License

This project is licensed under the MIT License (see LICENSE).