]> git.madduck.net Git - etc/awesome.git/blob - fs.md

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Updated fs (markdown)
[etc/awesome.git] / fs.md
1 [<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets)
2
3 Shows disk space usage for a set partition.
4
5 Displays a notification when the partition is full or has low space.
6
7     mypartition = lain.widgets.fs()
8
9 ### input table
10
11 Variable | Meaning | Type | Default
12 --- | --- | --- | ---
13 `timeout` | Refresh timeout seconds -| int | 600
14 `partition` | Partition to monitor | string | "/"
15 `settings` | User settings | function | empty function
16
17 `settings` can use the following `partition` related float values: `used`, `available`, `size_mb`, `size_gb`.
18
19 It can also use value strings in these formats:
20
21     fs_info[p .. "used_p"]
22     fs_info[p .. "avail_p"]
23     fs_info[p .. "size_mb"]
24     fs_info[p .. "size_gb"]
25
26 where `p` is the last column of `df` command ("/", "/home", "/boot", ...).
27
28 This means you can set the widget for a certain partition, but you can look up at others too.
29
30 Finally, `settings` can modify `fs_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:
31
32     fs_notification_preset = { fg = beautiful.fg_normal }
33
34 ### output table
35
36 Variable | Meaning | Type
37 --- | --- | ---
38 `widget` | The widget | `wibox.widget.textbox`
39 `show` | The notification | function
40
41 You can display the notification with a key binding like this:
42
43     awful.key({ altkey }, "h", function () mypartition.show(7) end),
44
45 where ``altkey = "Mod1"`` and ``show`` argument is an optional integer, meaning timeout seconds.