summaryrefslogtreecommitdiff
path: root/experiments/volume
diff options
context:
space:
mode:
Diffstat (limited to 'experiments/volume')
-rw-r--r--experiments/volume/README.md10
-rw-r--r--experiments/volume/volume.lua2
-rw-r--r--experiments/volume/widgets/horizontal-bar-widget.lua2
3 files changed, 10 insertions, 4 deletions
diff --git a/experiments/volume/README.md b/experiments/volume/README.md
index 547e259..1210ced 100644
--- a/experiments/volume/README.md
+++ b/experiments/volume/README.md
@@ -6,9 +6,15 @@ Volume widget based on [amixer](https://linux.die.net/man/1/amixer) (is used for
From left to right: `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc`
-Right-click on the widget opens a popup where you can choose a sink/source:
+A right-click on the widget opens a popup where you can choose a sink/source:
![sink-sources](./screenshots/volume-sink-sources.png)
+### Features
+
+ - switch between sinks/sources by right clicking on the widget;
+ - more responsive than previous versions of volume widget, which were refreshed once a second;
+ - 5 predefined looks (check the screenshots below);
+
## Customization
It is possible to customize the widget by providing a table with all or some of the following config parameters:
@@ -60,7 +66,7 @@ _Note:_ if you are changing icons, the folder should contain following .svg imag
| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc |
| `with_icon` | `true` | Show volume icon|
-_Note:_ I didn't figure out how does the `forced_height` property of progressbar widget works (maybe it doesn't work at all), thus there is a workaround with margins.
+_Note:_ I didn't figure out how does the `forced_height` property of progressbar widget work (maybe it doesn't work at all), thus there is a workaround with margins.
### `vertical_bar` parameters
diff --git a/experiments/volume/volume.lua b/experiments/volume/volume.lua
index e4af2b3..7daeb40 100644
--- a/experiments/volume/volume.lua
+++ b/experiments/volume/volume.lua
@@ -170,7 +170,7 @@ local function worker(user_args)
if widget_types[widget_type] == nil then
volume_widget = widget_types['icon_and_text'].get_widget(user_args.icon_and_text_args)
else
- volume_widget = widget_types[widget_type].get_widget(user_args[widget_type .. '_args'])
+ volume_widget = widget_types[widget_type].get_widget(args)
end
local function update_graphic(widget, stdout)
diff --git a/experiments/volume/widgets/horizontal-bar-widget.lua b/experiments/volume/widgets/horizontal-bar-widget.lua
index 865fed6..1a1c8a4 100644
--- a/experiments/volume/widgets/horizontal-bar-widget.lua
+++ b/experiments/volume/widgets/horizontal-bar-widget.lua
@@ -13,7 +13,7 @@ function widget.get_widget(widgets_args)
local mute_color = args.mute_color or beautiful.fg_urgent
local bg_color = args.bg_color or '#ffffff11'
local width = args.width or 50
- local margins = args.height or 10
+ local margins = args.margins or 10
local shape = args.shape or 'bar'
local with_icon = args.with_icon == true and true or false