2017-02-02 03:25:25 +01:00
# Volume widget
2017-02-08 02:31:34 +01:00
Simple and easy-to-install widget for Awesome Window Manager which represents the sound level: ![Volume Widget](
./vol-widget-1.png)
2017-02-02 03:25:25 +01:00
2017-02-02 03:45:15 +01:00
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.
2017-02-02 03:25:25 +01:00
## Installation
- clone/copy **volume.lua** file;
- include `volume.lua` and add volume widget to your wibox in rc.lua:
```lua
require("volume")
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
volume_widget,
...
```
## Control volume
2017-02-10 03:57:39 +01:00
To mute/unmute click on the widget. To increase/decrease volume scroll up or down when mouse cursor is over the widget.
2017-02-10 03:56:09 +01:00
2017-02-10 03:57:39 +01:00
If you want to control volume level by keyboard shortcuts add following lines in shortcut section of the **rc.lua** (the commands could be slightly different depending on your PC configuration):
2017-02-02 03:25:25 +01:00
```lua
awful.key({ modkey}, "[", function () awful.spawn("amixer -D pulse sset Master 5%-") end, {description = "increase volume", group = "custom"}),
awful.key({ modkey}, "]", function () awful.spawn("amixer -D pulse sset Master 5%+") end, {description = "decrease volume", group = "custom"}),
2017-02-10 03:56:09 +01:00
awful.key({ modkey}, "\\", function () awful.spawn("amixer -D pulse set Master +1 toggle") end, {description = "mute volume", group = "custom"}),
2017-02-02 03:26:31 +01:00
```