awesome-wm-widgets/volumearc-widget/README.md

63 lines
1.7 KiB
Markdown
Raw Normal View History

2017-10-05 02:46:09 +02:00
# Volumearc widget
2017-10-09 22:20:20 +02:00
Almost the same as [volumebar widget](https://github.com/streetturtle/awesome-wm-widgets/tree/master/volumebar-widget), but using arcchart:
2019-04-14 02:56:13 +02:00
![screenshot](out.gif)
2017-10-09 22:20:20 +02:00
2019-04-14 04:46:16 +02:00
Supports
- scroll up - increase volume,
- scroll down - decrease volume,
- left click - mute/unmute.
2019-04-14 02:51:54 +02:00
## Customization
It is possible to customize widget by providing a table with all or some of the following config parameters:
2019-04-15 02:07:15 +02:00
| 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:
2019-04-14 02:51:54 +02:00
```lua
volumearc_widget({
main_color = '#af13f7',
mute_color = '#ff0000',
thickness = 5,
height = 25
})
```
2019-06-03 04:06:02 +02:00
The config above results in the following widget:
2019-04-14 02:51:54 +02:00
![custom](./custom.png)
2017-10-09 22:20:20 +02:00
## Installation
2019-03-30 22:42:59 +01:00
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**:
2019-05-03 21:23:12 +02:00
```lua
require("volumearc")
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
volumearc_widget,
...
```