Documentation updates

This commit is contained in:
Manu Cornet 2021-12-25 09:52:52 +00:00
parent c8293fb84c
commit c24fb6f0f0
1 changed files with 21 additions and 15 deletions

View File

@ -11,21 +11,7 @@ git clone https://github.com/lmanul/awesome-workspace-grid.git
## Usage ## Usage
Arguments to pass to the contructor (all of them are optional): Basic usage, in `rc.lua`:
| Arg | Default | Description |
|-------------|----------------|-------------------------------------|
| `rows` | 2 | Number of rows (1 to 9) |
| `columns` | 3 | Number of columns (1 to 9) |
| `cycle` | `false` | Whether to cycle at grid edges |
| `icon_size` | 100 | Size of icon in notification |
| `position` | `"top_middle"` | Notification position on the screen |
| `visual` | `true` | Whether to show workspace changes |
Please make sure that `rows` × `columns` is equal to your number of tags, as
defined by the call to `awful.tag()` in your configuration.
Sample usage in `rc.lua`:
``` ```
local workspace_grid = require("awesome-workspace-grid") local workspace_grid = require("awesome-workspace-grid")
@ -33,7 +19,14 @@ grid = workspace_grid({
rows = 3, rows = 3,
columns = 3, columns = 3,
}) })
```
Please make sure that `rows` × `columns` is equal to your number of tags, as
defined by the call to `awful.tag()` in your configuration.
Define keyboard shortcuts like so:
```
-- Insert after 'globalkeys' is defined but before it is passed to 'root': -- Insert after 'globalkeys' is defined but before it is passed to 'root':
tag_nav_mod_keys = { "Control" } tag_nav_mod_keys = { "Control" }
@ -48,3 +41,16 @@ globalkeys = gears.table.join(globalkeys,
function () grid:navigate("right") end, {description = "Right", group="Tag"}), function () grid:navigate("right") end, {description = "Right", group="Tag"}),
) )
``` ```
## Options
Arguments that can be passed to the contructor (all of them are optional):
| Arg | Default | Description |
|-------------|----------------|-------------------------------------|
| `rows` | 2 | Number of rows (1 to 9) |
| `columns` | 3 | Number of columns (1 to 9) |
| `cycle` | `false` | Whether to cycle at grid edges |
| `icon_size` | 100 | Size of icon in notification |
| `position` | `"top_middle"` | Notification position on the screen |
| `visual` | `true` | Whether to show workspace changes |