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 disk space usage for a set partition.
5 Displays a notification when the partition is full or has low space.
7 mypartition = lain.widgets.fs()
11 Variable | Meaning | Type | Default
13 `timeout` | Refresh timeout seconds -| int | 600
14 `partition` | Partition to monitor | string | "/"
15 `settings` | User settings | function | empty function
17 `settings` can use the following `partition` related float values: `used` and `available`, `size_mb`, `size_gb`.
19 It can also use value strings in these formats:
21 fs_info[p .. "used_p"]
22 fs_info[p .. "avail_p"]
23 fs_info[p .. "size_mb"]
24 fs_info[p .. "size_gb"]
26 where `p` is the last column of `df` command ("/", "/home", "/boot", ...).
28 This means you can set the widget for a certain partition, but you can look up at others too.
30 Finally, `settings` can modify `notification_preset` table too. This table will be the preset for the naughty notifications. Check [here](http://awesome.naquadah.org/doc/api/modules/naughty.html#notify) for the list of variables it can contain. Default definition:
32 notification_preset = { fg = beautiful.fg_normal }
36 Variable | Meaning | Type
38 `widget` | The widget | `wibox.widget.textbox`
39 `show` | The notification | function
41 You can display the notification with a key binding like this:
43 awful.key({ altkey }, "h", function () mypartition.show(7) end),
45 where ``altkey = "Mod1"`` and ``show`` argument is an optional integer, meaning timeout seconds.