All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 [<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets)
3 Shows mail status in a textbox over IMAP protocol.
9 New mails are notified through a notification like this:
11 +---------------------------------------------------+
13 | |\ /| donald@disney.org has 3 new messages |
15 | Latest From: Mickey Mouse <boss@disney.org> |
16 | Subject: Re: pay raise |
18 | Not after what you did yesterday. |
19 | Daisy told me everything [...] |
21 +---------------------------------------------------+
23 Text will be cut if the mail is too long.
25 myimapcheck = lain.widgets.imap(args)
27 The function takes a table as argument. Required table parameters are:
35 while the optional are:
37 Variable | Meaning | Type | Default
39 `port` | IMAP port | int | 993
40 `refresh_timeout` | Refresh timeout seconds | int | 60
41 `header` | Text to show before value | string | " Mail "
42 `header_color` | Header color | string | `beautiful.fg_normal` or "#FFFFFF"
43 `color` | Mail value color | string | `beautiful.fg_focus` or "#FFFFFF"
44 `footer` | Text to append after value | string | " "
45 `mail_encoding` | Mail character encoding | string | autodetected
46 `maxlen` | Maximum chars to display in notification | int | 200
47 `app` | Mail program to spawn on click | string | "mutt"
48 `shadow` | Hide widget when there are no mails | boolean | false
49 `is_plain` | Define whether `password` is a plain password (true) or a function that retrieves it (false) | boolean | false
51 **Note**: `footer` can be markup text.
53 Let's focus better on `is_plain`.
55 You can just set your password like this:
58 args.password = "mypassword"
60 and you'll have the same security provided by `~/.netrc`.
62 **Or** you can use a keyring, like [python keyring](https://pypi.python.org/pypi/keyring):
64 args.password = "keyring get password"
66 When `is_plain == false`, it *executes* `password` before using it, so you can also use whatever password fetching solution you want.
68 You can also define your custom icon for the naughty notification. Just set `lain_mail_notify` into `theme.lua`:
70 theme.lain_mail_notify = "/path/to/my/icon"