Add sample usage in README
This commit is contained in:
parent
0cbfb26bbf
commit
107bcdfced
24
README.md
24
README.md
|
@ -1 +1,23 @@
|
|||
# awesome-workspace-grid
|
||||
# awesome-workspace-grid
|
||||
|
||||
Sample usage:
|
||||
|
||||
```
|
||||
local workspace_grid = require("awesome-workspace-grid")
|
||||
grid = workspace_grid({
|
||||
rows = rows, -- only 2 supported for now!
|
||||
columns = columns, -- only 3 supported for now!
|
||||
visual = true,
|
||||
})
|
||||
|
||||
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"}),
|
||||
)
|
||||
```
|
||||
|
|
|
@ -34,8 +34,8 @@ function workspace_grid:new(args)
|
|||
end
|
||||
|
||||
function workspace_grid:init(args)
|
||||
self.rows = args.rows
|
||||
self.columns = args.columns
|
||||
self.rows = args.rows or 2
|
||||
self.columns = args.columns or 3
|
||||
|
||||
if args.visual then
|
||||
awful.screen.connect_for_each_screen(function(s)
|
||||
|
|
Loading…
Reference in New Issue