Add an option to set the icon size. Update documentation.
This commit is contained in:
parent
624c5909ec
commit
c8293fb84c
15
README.md
15
README.md
|
@ -13,13 +13,14 @@ git clone https://github.com/lmanul/awesome-workspace-grid.git
|
|||
|
||||
Arguments to pass 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 |
|
||||
| `position` | `"top_middle"` | Notification position on the screen |
|
||||
| `visual` | `true` | Whether to show workspace changes |
|
||||
| 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.
|
||||
|
|
|
@ -18,6 +18,7 @@ function workspace_grid:init(args)
|
|||
self.position = args.position or "top_middle"
|
||||
self.visual = args.visual or true
|
||||
self.cycle = args.cycle or false
|
||||
self.icon_size = args.icon_size or 100
|
||||
|
||||
if self.visual then
|
||||
awful.screen.connect_for_each_screen(function(s)
|
||||
|
@ -81,7 +82,7 @@ function workspace_grid:on_tag_selected(t)
|
|||
icon_path = "icons/workspace_" .. self.rows .. "x" .. self.columns .. "_" .. t.index .. ".svg"
|
||||
notification = naughty.notify({
|
||||
icon = script_path() .. icon_path,
|
||||
icon_size = 100,
|
||||
icon_size = self.icon_size,
|
||||
margin = 0,
|
||||
position = self.position,
|
||||
preset = naughty.config.presets.normal,
|
||||
|
|
Loading…
Reference in New Issue