awesome-wm-widgets/volume-widget
streetturtle 1d59dd3637
Merge pull request #51 from tchoutchawn/patch-1
Created a new muted speaker icon
2018-11-03 10:48:46 -04:00
..
audio-volume-muted-symbolic.png update readme for volume icon 2017-06-17 12:45:58 -04:00
audio-volume-muted-symbolic.svg update readme for volume icon 2017-06-09 16:10:57 -04:00
audio-volume-muted-symbolic_new.svg Created a new muted speaker icon 2018-10-17 22:40:08 -04:00
audio-volume-muted-symbolic_red.png update readme for volume icon 2017-06-17 12:45:58 -04:00
audio-volume-muted-symbolic_red.svg update readme for volume icon 2017-06-09 16:10:57 -04:00
README.md Add back accidentally removed newline 2018-10-31 19:54:48 -05:00
vol-widget-1.png improve widget rendering and use wibox.widget wrapper 2017-02-03 22:15:16 -05:00
volume.lua refactor volume widget 2018-10-05 11:02:05 -04:00

Volume widget

Simple and easy-to-install widget for Awesome Window Manager which represents the sound level: Volume Widget

Note that widget uses the Arc icon theme, so it should be installed first under /usr/share/icons/Arc/ folder.

Installation

  • clone/copy volume.lua file;

  • include volume.lua and add volume widget to your wibox in rc.lua:

require("volume")
...
s.mytasklist, -- Middle widget
	{ -- Right widgets
    	layout = wibox.layout.fixed.horizontal,
		...
		volume_widget,
		...      
  • Optional step. In Arc icon theme the muted audio level icon (Volume-widget) looks like 0 level icon, which could be a bit misleading. So I decided to use original muted icon for low audio level, and the same icon, but colored in red for muted audio level. Fortunately icons are in svg format, so you can easily recolor them with sed, so it would look like this (Volume Widget):
cd /usr/share/icons/Arc/status/symbolic && 
sudo cp audio-volume-muted-symbolic.svg audio-volume-muted-symbolic_red.svg && 
sudo sed -i 's/bebebe/ed4737/g' ./audio-volume-muted-symbolic_red.svg 

Control volume

To mute/unmute click on the widget. To increase/decrease volume scroll up or down when mouse cursor is over the widget.

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):

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"}),
awful.key({ modkey}, "\", function () awful.spawn("amixer -D pulse set Master +1 toggle") end, {description = "mute volume", group = "custom"}),