awesome-wm-widgets/_widgets/fs-widget.md

33 lines
1.2 KiB
Markdown
Raw Normal View History

2020-03-02 03:40:04 +01:00
---
layout: page
---
2020-11-15 03:26:34 +01:00
# Filesystem Widget
2020-03-02 03:40:04 +01:00
2022-01-24 01:17:02 +01:00
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.
2020-03-02 03:40:04 +01:00
2022-01-24 01:17:02 +01:00
![](./screenshot.png)
2020-12-01 15:03:04 +01:00
2021-01-24 20:46:54 +01:00
## Customizations
2020-12-01 15:03:04 +01:00
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**:
2020-03-02 03:40:04 +01:00
```lua
2020-11-15 03:26:34 +01:00
local fs_widget = require("awesome-wm-widgets.fs-widget.fs-widget")
2020-03-02 03:40:04 +01:00
...
s.mywibox:setup {
s.mytasklist, -- Middle widget
{ -- Right widgets
2020-11-15 03:26:34 +01:00
fs_widget(), --default
2020-12-01 15:03:04 +01:00
fs_widget({ mounts = { '/', '/mnt/music' } }), -- multiple mounts
2020-03-02 03:40:04 +01:00
...
```