summaryrefslogtreecommitdiff
path: root/ram-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2022-04-15 17:19:42 -0400
committerGitHub <noreply@github.com>2022-04-15 17:19:42 -0400
commitdc80558d9d656ddeb3c51107d9ea85ac97c08de9 (patch)
tree7dbc9b510b2b198c4769344ca863f56fc9b139f0 /ram-widget
parent2043d21cb5af7070b505364b799ffbf85a9e594a (diff)
parentfbe207a0f9110dc3a686cb85d9f2bea19bc0aef3 (diff)
Merge pull request #350 from easlice/misc-customization-additions
Add customizations to batteryarc and ram widgets.
Diffstat (limited to 'ram-widget')
-rw-r--r--ram-widget/README.md2
-rw-r--r--ram-widget/ram-widget.lua5
2 files changed, 6 insertions, 1 deletions
diff --git a/ram-widget/README.md b/ram-widget/README.md
index 6e80976..568245b 100644
--- a/ram-widget/README.md
+++ b/ram-widget/README.md
@@ -15,6 +15,8 @@ It is possible to customize widget by providing a table with all or some of the
| `color_used` | `beautiful.bg_urgent` | Color for used RAM |
| `color_free` | `beautiful.fg_normal` | Color for free RAM |
| `color_buf` | `beautiful.border_color_active` | Color for buffers/cache |
+| `widget_height` | `25` | Height of the widget |
+| `widget_width` | `25` | Width of the widget |
| `widget_show_buf` | `false` | Whether to display buffers/cache separately in the tray widget. If `false`, buffers/cache are considered free RAM. |
| `timeout` | 1 | How often (in seconds) the widget refreshes |
diff --git a/ram-widget/ram-widget.lua b/ram-widget/ram-widget.lua
index 1b5cdcf..867d28e 100644
--- a/ram-widget/ram-widget.lua
+++ b/ram-widget/ram-widget.lua
@@ -15,6 +15,8 @@ local function worker(user_args)
local color_free = args.color_free or beautiful.fg_normal
local color_buf = args.color_buf or beautiful.border_color_active
local widget_show_buf = args.widget_show_buf or false
+ local widget_height = args.widget_height or 25
+ local widget_width = args.widget_width or 25
--- Main ram widget shown on wibar
ramgraph_widget = wibox.widget {
@@ -25,7 +27,8 @@ local function worker(user_args)
color_buf,
},
display_labels = false,
- forced_width = 25,
+ forced_height = widget_height,
+ forced_width = widget_width,
widget = wibox.widget.piechart
}