diff options
author | Pavel Makhov <pmakhov@theoctavegroup.com> | 2019-09-17 15:29:36 -0400 |
---|---|---|
committer | Pavel Makhov <pmakhov@theoctavegroup.com> | 2019-09-17 15:29:36 -0400 |
commit | 6fd76c254b296da86619b43db619ccebcd521853 (patch) | |
tree | a005c8045bbee2998642c55fd5edadb258ea87de /volumearc-widget/README.md | |
parent | 372ae3c9e7cab4b64b8dcaf31d9d2d921a723585 (diff) | |
parent | 2e211937a116102c3647b85070718102192ddc54 (diff) |
Merge branch '74-externalize-config'
Note: breaking change, now widgets should be created with parentheses, i.e. battery(), instead of battery. Read more in README of the widget.
Diffstat (limited to 'volumearc-widget/README.md')
-rw-r--r-- | volumearc-widget/README.md | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/volumearc-widget/README.md b/volumearc-widget/README.md index 702b486..0ae17b4 100644 --- a/volumearc-widget/README.md +++ b/volumearc-widget/README.md @@ -1,17 +1,54 @@ # Volumearc widget -Almost the same as [volumebar widget](https://github.com/streetturtle/awesome-wm-widgets/tree/master/volumebar-widget), but using arcchart: +Almost the same as [volumebar widget](https://github.com/streetturtle/awesome-wm-widgets/tree/master/volumebar-widget), but using [arcchart](https://awesomewm.org/doc/api/classes/wibox.container.arcchart.html): ![screenshot](out.gif) -Supports: - - scroll up - increase volume, - - scroll down - decrease volume, +Supports + - scroll up - increase volume, + - scroll down - decrease volume, - left click - mute/unmute. +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `main_color` | `beautiful.fg_normal` | Color of the arc | +| `mute_color` | `beautiful.fg_urgent` | Color of the arc when mute | +| `path_to_icon` | /usr/share/icons/Arc/status/symbolic/audio-volume-muted-symbolic.svg | Path to the icon | +| `thickness` | 2 | The arc thickness | +| `height` | `beautiful.fg_normal` | Widget height | +| `get_volume_cmd` | `amixer -D pulse sget Master` | Get current volume level | +| `inc_volume_cmd` | `amixer -D pulse sset Master 5%+` | Increase volume level | +| `dec_volume_cmd` | `amixer -D pulse sset Master 5%-` | Descrease volume level | +| `tog_volume_cmd` | `amixer -D pulse sset Master toggle` | Mute / unmute | + +### Example: + +```lua +volumearc_widget({ + main_color = '#af13f7', + mute_color = '#ff0000', + thickness = 5, + height = 25 +}) +``` + +The config above results in the following widget: + +![custom](./custom.png) + ## Installation -Clone repo, include widget and use it in **rc.lua**: +1. Clone this repo under **~/.config/awesome/** + + ```bash + git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/ + ``` + +1. Require volumearc widget at the beginning of **rc.lua**: ```lua require("volumearc") |