Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://jcrd.github.io/awesome-launch/
AwesomeWM library for launching clients with single instance IDs
https://jcrd.github.io/awesome-launch/
awesomewm lua
Last synced: about 1 month ago
JSON representation
AwesomeWM library for launching clients with single instance IDs
- Host: GitHub
- URL: https://jcrd.github.io/awesome-launch/
- Owner: jcrd
- License: mit
- Created: 2019-03-28T14:42:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-07T22:56:26.000Z (about 3 years ago)
- Last Synced: 2024-05-22T16:08:58.899Z (7 months ago)
- Topics: awesomewm, lua
- Language: Lua
- Homepage: https://jcrd.github.io/awesome-launch/
- Size: 139 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# awesome-launch
awesome-launch is a library for [Awesome](https://github.com/awesomeWM/awesome)
window manager that provides functions to spawn clients with single instance
IDs using [wm-launch](https://github.com/jcrd/wm-launch).## Dependencies
* [uuid](https://luarocks.org/modules/tieske/uuid) rock
* [wm-launch](https://github.com/jcrd/wm-launch) >= 0.5.0## 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:
```lua
local launch = require("awesome-launch")
```Now spawn a client:
```lua
launch.spawn("xterm", {id="xterm1"})
```
The new client will have these properties set:
* `single_instance_id` = `"xterm1"`
* `cmdline` = `"xterm"`See the [API documentation](https://jcrd.github.io/awesome-launch/) for
descriptions of all functions.## Workspaces
Require the library:
```lua
local ws = require("awesome-launch.workspace")
```Add a new workspace:
```lua
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:
```lua
launch.widget.color = beautiful.fg_focus
```Create a new launchbar for the given screen:
```lua
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`:
```lua
require("awful.remote")
```If installed via `luarocks`, ensure `awesome-launch`'s [location][1] is in your
`PATH`.[1]: https://github.com/luarocks/luarocks/wiki/File-locations#Path_where_commandline_scripts_are_installed
## License
This project is licensed under the MIT License (see [LICENSE](LICENSE)).