|
1 | 1 | # Email widget |
2 | 2 |
|
3 | | -This widget consists of an icon with counter which shows number of unread emails:  |
4 | | -and a popup message which appears when mouse hovers over an icon:  |
| 3 | +This widget consists of an icon with counter which shows the number of unread emails: |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +And a popup message which appears when mouse hovers over the icon: |
| 8 | + |
| 9 | + |
5 | 10 |
|
6 | 11 | ## Installation |
| 12 | + |
7 | 13 | 1. Clone this repository to your awesome config folder: |
8 | 14 |
|
9 | | -```bash |
10 | | -git clone https://github.com/streetturtle/awesome-wm-widgets/email-widget ~/.config/awesome/email-widget |
11 | | -``` |
12 | | -2. Make virtual environment and install dependencies: |
| 15 | + ```bash |
| 16 | + git clone https://github.com/streetturtle/awesome-wm-widgets/email-widget ~/.config/awesome/email-widget |
| 17 | + ``` |
13 | 18 |
|
14 | | -```bash |
15 | | -cd ~/.config/awesome/email-widget |
16 | | -python3 -m venv venv |
17 | | -source venv/bin/activate |
18 | | -pip install -r requirements.txt |
19 | | -``` |
20 | | -3. Fill .env file with your credentials: |
| 19 | +2. Create virtual environment and install dependencies: |
21 | 20 |
|
22 | | -```bash |
23 | | -cp .env.example .env |
24 | | -``` |
25 | | -4. Add widget to awesome: |
26 | | - |
27 | | -```lua |
28 | | -local email_widget = require("email-widget.email") |
29 | | -... |
30 | | -s.mytasklist, -- Middle widget |
31 | | - { -- Right widgets |
32 | | - layout = wibox.layout.fixed.horizontal, |
33 | | - ... |
34 | | - email_widget, |
35 | | - ... |
36 | | -``` |
| 21 | + ```bash |
| 22 | + cd ~/.config/awesome/email-widget |
| 23 | + python3 -m venv venv |
| 24 | + source venv/bin/activate |
| 25 | + pip install -r requirements.txt |
| 26 | + ``` |
37 | 27 |
|
38 | | -If you want to reduce time of getting emails, you can change maximum number of emails to be fetched in .env file. Default is 10. |
39 | | -If you want to configure width of popup window, you can change this line in email.lua file: |
| 28 | +3. Fill the .env file with your credentials: |
| 29 | + |
| 30 | + ```bash |
| 31 | + cp .env.example .env |
| 32 | + ``` |
| 33 | + |
| 34 | +4. Add widget to **rc.lua**: |
| 35 | + |
| 36 | + ```lua |
| 37 | + local email_widget = require("email-widget.email") |
| 38 | + ... |
| 39 | + s.mytasklist, -- Middle widget |
| 40 | + { -- Right widgets |
| 41 | + layout = wibox.layout.fixed.horizontal, |
| 42 | + ... |
| 43 | + email_widget, |
| 44 | + ... |
| 45 | + ``` |
| 46 | +
|
| 47 | +If you want to reduce the time for fetching emails, you can change the maximum number of emails to be fetched in the .env file. Default is 10. |
| 48 | +
|
| 49 | +If you want to configure the width of the popup window, you can change this line in the email.lua file: |
| 50 | +
|
| 51 | + ```lua |
| 52 | + width = 800, |
| 53 | + ``` |
| 54 | +
|
| 55 | +After this you can change the MAX_BODY_LENGTH variable in the .env file to change the number of characters to be displayed in the popup window. Default is 100. |
40 | 56 |
|
41 | | -```lua |
42 | | - width = 800, |
43 | | -``` |
44 | | -After this you can change MAX_BODY_LENGTH variable in .env file to change number of characters to be displayed in popup window. Default is 100. |
45 | 57 | Next step is restarting awesome. You can do this by pressing Mod+Ctrl+r. |
46 | 58 |
|
47 | 59 | ## How it works |
|
0 commit comments