summaryrefslogtreecommitdiff
path: root/stackoverflow-widget/README.md
blob: c47abb6d46255e9484a0f7e9190c0caa5db0ff89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Stackoverflow widget

When clicked, widget shows latest questions from stackoverflow.com with a given tag(s).

![screenshot](./screenshot.png)

## Customization

It is possible to customize widget by providing a table with all or some of the following config parameters:

| Name | Default | Description |
|---|---|---|
| `icon`| `/.config/awesome/awesome-wm-widgets/stackoverflow-widget/so-icon.svg` | Path to the icon |
| `limit` | 5 | Number of items to show in the widget |
| `tagged` | `awesome-wm` | Tag, or comma-separated tags |
| `timeout` | 300 | How often in seconds the widget refreshes |

## Installation

1. Clone this repo (if not cloned yet) under **~/.config/awesome/**:

    ```bash
    git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/
    ```

1. Require widget at the top of the **rc.lua**:

    ```lua
    local stackoverflow_widget = require("awesome-wm-widgets.stackoverflow-widget.stackoverflow")
    ```

1. Add widget to the tasklist:

    ```lua
    s.mytasklist, -- Middle widget
        { -- Right widgets
            layout = wibox.layout.fixed.horizontal,
            ...
            --default
            stackoverflow_widget(),
            --customized
            stackoverflow_widget({
                limit = 10
            })
            ...
    ```