]> git.madduck.net Git - etc/awesome.git/blobdiff - 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:

Removed a misplaced space in mpd_notification_preset variable declaration
[etc/awesome.git] / fs.md
diff --git a/fs.md b/fs.md
index 951f73ba615024d8f5d6bc8f11bf1cbe55e53761..1e34f86a61c432c9b8a906634cc082dea06facb2 100644 (file)
--- a/fs.md
+++ b/fs.md
@@ -1,31 +1,44 @@
+[<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets)
+
 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:
+### input table
 
 Variable | Meaning | Type | Default
 --- | --- | --- | ---
+`timeout` | Refresh timeout seconds -| int | 600
 `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
+`settings` | User settings | function | empty function
+
+`settings` can use the following `partition` related float values: `fs_now.used`, `fs_now.available`, `fs_now.size_mb`, `fs_now.size_gb`.
+
+It can also use value strings in these formats:
+
+    fs_info[p .. "used_p"]
+    fs_info[p .. "avail_p"]
+    fs_info[p .. "size_mb"]
+    fs_info[p .. "size_gb"]
+
+where `p` is the last column of `df` command ("/", "/home", "/boot", ...).
+
+This means you can set the widget for a certain partition, but you can look up at others too.
+
+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:
 
-**Note**: `footer` color is `color`.
+    fs_notification_preset = { fg = beautiful.fg_normal }
 
-`lain.widgets.fs` outputs the following table:
+### output table
 
 Variable | Meaning | Type
 --- | --- | ---
 `widget` | The widget | `wibox.widget.textbox`
 `show` | The notification | function
 
-You can display a notification of current disk space usage with a key binding like this:
+You can display the notification with a key binding like this:
 
     awful.key({ altkey }, "h", function () mypartition.show(7) end),