summaryrefslogtreecommitdiff
path: root/volume-widget/README.md
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2019-09-03 21:57:24 -0400
committerstreetturtle <streetturtle@gmail.com>2019-09-03 21:57:24 -0400
commit0999de2bfd2e9f7ccd5d0e04eb1f63c3803449ae (patch)
tree52b013d18a348450c8b15ed37efee063d3ac6de1 /volume-widget/README.md
parentdbee6f75f727b68092890d814d24b84136363e75 (diff)
externalize config of volume widget
Diffstat (limited to 'volume-widget/README.md')
-rw-r--r--volume-widget/README.md30
1 files changed, 25 insertions, 5 deletions
diff --git a/volume-widget/README.md b/volume-widget/README.md
index 494be24..24c2d76 100644
--- a/volume-widget/README.md
+++ b/volume-widget/README.md
@@ -1,10 +1,18 @@
# Volume widget
-Simple and easy-to-install widget for Awesome Window Manager which represents the sound level: ![Volume Widget](
+Simple and easy-to-install widget for Awesome Window Manager which shows the sound level: ![Volume Widget](
./vol-widget-1.png)
Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder.
+## Customization
+
+It is possible to customize widget by providing a table with all or some of the following config parameters:
+
+| Name | Default | Description |
+|---|---|---|
+| `volume_audio_controller` | `pulse` | audio device |
+
## Installation
- clone/copy **volume.lua** file;
@@ -18,7 +26,7 @@ s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
- volume_widget,
+ volume_widget(),
...
```
@@ -35,9 +43,12 @@ s.mytasklist, -- Middle widget
Try running this command:
-```amixer -D pulse sget Master```
+```bash
+amixer -D pulse sget Master
+```
If that prints something like this, then the default setting of 'pulse' is probably fine:
+
```
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
@@ -48,13 +59,22 @@ Simple mixer control 'Master',0
```
If it prints something like this:
-```
+
+```bash
$ amixer -D pulse sget Master
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
amixer: Mixer attach pulse error: Connection refused
```
-then try setting the environment variable `AWW_VOLUME_CONTROLLER` to `alsa_only`.
+then set `volume_audio_controller` to `alsa_only` in widget constructor:
+
+```lua
+volume_widget({
+ volume_audio_controller = 'alsa_only'
+})
+```
+
+.
## Control volume