lain/maildir.md

39 lines
874 B
Markdown
Raw Normal View History

2013-09-09 14:06:43 +02:00
[<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets)
2013-09-07 14:10:43 +02:00
Shows maildirs status in a textbox.
2013-09-07 12:12:36 +02:00
Maildirs are structured as follows:
~/Mail
.
|-- arch
| |-- cur
| |-- new
| `-- tmp
|-- gmail
| |-- cur
| |-- new
| `-- tmp
.
.
.
therefore the widget checks whether there are files in the `new` directories.
2013-09-07 14:09:48 +02:00
If there's new mails, the textbox will say something like "mail: bugs(3), system(1)", otherwise it says
2013-09-07 12:12:36 +02:00
"no mail".
2013-09-07 14:09:48 +02:00
mymaildir = lain.widgets.maildir("/path/to/my/maildir")
2013-09-07 12:12:36 +02:00
2013-09-10 23:31:01 +02:00
### input table
2013-09-07 12:12:36 +02:00
Variable | Meaning | Type | Default
--- | --- | --- | ---
2013-09-10 23:31:01 +02:00
`timeout` | Refresh timeout seconds | int | 60
2013-09-07 12:12:36 +02:00
`mailpath` | Path to your maildir | string | "~/Mail"
2013-09-10 23:31:01 +02:00
`settings` | User settings | function | empty function
`settings` can use the string `newmail`, which format will be something like defined above, or "no mail".
### output
A textbox.