From 1c957ffc8a68081a56d20951050f9af83cac3c25 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Mon, 30 Nov 2020 09:31:44 -0500 Subject: [fs] fix #218 --- fs-widget/README.md | 27 ++++++++++++++++----------- fs-widget/fs-widget.lua | 5 ++--- fs-widget/out.gif | Bin 103946 -> 0 bytes fs-widget/screenshot.png | Bin 0 -> 20958 bytes 4 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 fs-widget/out.gif create mode 100644 fs-widget/screenshot.png (limited to 'fs-widget') diff --git a/fs-widget/README.md b/fs-widget/README.md index 5cda048..f134b05 100644 --- a/fs-widget/README.md +++ b/fs-widget/README.md @@ -1,10 +1,21 @@ # Filesystem Widget -This widget shows disk usage. When clicked another widget appears with more detailed information. By default it monitors the "/" mount. It can be configured with a -list of mounts to monitor though only the first will show in the wibar. To have -multiple mounts displayed on the wibar simply define multiple `fs_widgets` -with different mounts as arguments. +This widget shows file system disk space usage which is based on the `df` output. When clicked another widget appears with more detailed information. By default it monitors the "/" mount. It can be configured with a list of mounts to monitor though only the first will show in the wibar. To have multiple mounts displayed on the wibar simply define multiple `fs_widgets` with different mounts as arguments. +![](./screenshot.png) + +## Cusomizations + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `mounts` | `{'/'}` | Table with mounts to monitor, check the output from a `df` command for available options (column 'Mounted on') | +| `timeout` | 60 | How often in seconds the widget refreshes | + +## Installation + +Clone/download repo and use the widget in **rc.lua**: ```lua local fs_widget = require("awesome-wm-widgets.fs-widget.fs-widget") @@ -13,12 +24,6 @@ with different mounts as arguments. s.mytasklist, -- Middle widget { -- Right widgets fs_widget(), --default - wibox.widget.textbox(':'), - fs_widget({ mounts = { '/', '/mnt/musicj' } }), -- multiple mounts + fs_widget({ mounts = { '/', '/mnt/music' } }), -- multiple mounts ... - ``` - -## Installation - -Please refer to the [installation](https://github.com/streetturtle/awesome-wm-widgets#installation) section of the repo. diff --git a/fs-widget/fs-widget.lua b/fs-widget/fs-widget.lua index 613c472..e920e47 100644 --- a/fs-widget/fs-widget.lua +++ b/fs-widget/fs-widget.lua @@ -17,7 +17,8 @@ local function worker(args) forced_width = 35, paddings = 1, margins = 4, - border_width = 0.5, + border_width = 1, + border_radius = 2, border_color = beautiful.fg_normal, background_color = beautiful.bg_normal, bar_border_width = 1, @@ -61,8 +62,6 @@ local function worker(args) offset = { y = 5 }, widget = {} } - popup:connect_signal("mouse::enter", function(c) is_update = false end) - popup:connect_signal("mouse::leave", function(c) is_update = true end) storage_bar_widget:buttons( awful.util.table.join( diff --git a/fs-widget/out.gif b/fs-widget/out.gif deleted file mode 100644 index 736f894..0000000 Binary files a/fs-widget/out.gif and /dev/null differ diff --git a/fs-widget/screenshot.png b/fs-widget/screenshot.png new file mode 100644 index 0000000..41e6ccc Binary files /dev/null and b/fs-widget/screenshot.png differ -- cgit v1.2.3