2013-09-07 12:27:10 +02:00
|
|
|
Shows disk space usage for a set partition.
|
|
|
|
|
|
|
|
Displays a notification when the partition is full or has low space.
|
|
|
|
|
|
|
|
mypartition = lain.widgets.fs()
|
|
|
|
|
|
|
|
The function takes a table as optional argument, which can contain:
|
|
|
|
|
|
|
|
Variable | Meaning | Type | Default
|
|
|
|
--- | --- | --- | ---
|
|
|
|
`partition` | Partition to monitor | string | "/"
|
|
|
|
`refresh_timeout` | Refresh timeout seconds | int | 600
|
|
|
|
`header` | Text to show before value | string | " Hdd "
|
|
|
|
`header_color` | Header color | string | `beautiful.fg_normal` or "#FFFFFF"
|
|
|
|
`color` | Value color | string | `beautiful.fg_focus` or "#FFFFFF"
|
|
|
|
`footer` | Text to show after value | string | "%"
|
|
|
|
`shadow` | Hide the widget if `partition` < 90 | boolean | false
|
|
|
|
|
|
|
|
**Note**: `footer` color is `color`.
|
|
|
|
|
|
|
|
`lain.widgets.fs` outputs the following table:
|
|
|
|
|
|
|
|
Variable | Type
|
|
|
|
--- | ---
|
|
|
|
`widget` | `wibox.widget.textbox`
|
|
|
|
`show` | function
|
|
|
|
|
2013-09-07 12:40:38 +02:00
|
|
|
You can display a notification of current disk space usage with a key binding like this:
|
2013-09-07 12:27:10 +02:00
|
|
|
|
|
|
|
awful.key({ altkey }, "h", function () mypartition.show(7) end),
|
|
|
|
|
|
|
|
where ``altkey = "Mod1"`` and ``show`` argument is an optional integer, meaning timeout seconds.
|