awesome-workspace-grid/README.md

57 lines
1.9 KiB
Markdown
Raw Normal View History

2021-12-26 09:14:26 +01:00
![Animated screenshot](https://raw.githubusercontent.com/lmanul/awesome-workspace-grid/master/screenshot.gif)
2021-12-25 10:39:43 +01:00
## Installation
Clone this repository into your `awesome` configuration directory:
2021-12-14 09:43:19 +01:00
```
cd ~/.config/awesome
git clone https://github.com/lmanul/awesome-workspace-grid.git
```
2021-12-25 10:39:43 +01:00
## Usage
2021-12-25 10:52:52 +01:00
Basic usage, in `rc.lua`:
2021-12-14 09:18:08 +01:00
```
local workspace_grid = require("awesome-workspace-grid")
grid = workspace_grid({
rows = 3,
columns = 3,
2021-12-14 09:18:08 +01:00
})
2021-12-25 10:52:52 +01:00
```
Please make sure that `rows` × `columns` is equal to your number of tags, as
defined by the call to `awful.tag()` in your configuration.
2021-12-14 09:18:08 +01:00
2021-12-25 10:52:52 +01:00
Define keyboard shortcuts like so:
```
2021-12-14 09:43:19 +01:00
-- Insert after 'globalkeys' is defined but before it is passed to 'root':
tag_nav_mod_keys = { "Control" }
2021-12-14 09:18:08 +01:00
globalkeys = gears.table.join(globalkeys,
awful.key(tag_nav_mod_keys, "Up",
function () grid:navigate("up") end, {description = "Up", group="Tag"}),
awful.key(tag_nav_mod_keys, "Down",
function () grid:navigate("down") end, {description = "Down", group="Tag"}),
awful.key(tag_nav_mod_keys, "Left",
function () grid:navigate("left") end, {description = "Left", group="Tag"}),
awful.key(tag_nav_mod_keys, "Right",
function () grid:navigate("right") end, {description = "Right", group="Tag"}),
)
```
2021-12-25 10:52:52 +01:00
## 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 |