Skip to content

tamawy/volume-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

In the name of Allah.

Awesome Volume Control

This is a very simple module with lua language that controls volume in Awesome window manager.
I created and used this modeule on Arch Linux.

Installation and Usage

  1. Clone your project inside ~/.config/awesome (i.e. in the same directory with rc.lua)
cd ~/.config/awesome
git clone https://github.com/IbrahimElsayed26498/volume-control
  1. Inside rc.lua In the beginning of the file write:
local volume = require("volume-control.volume")
  1. Inside (Right Widget) area call volume.getwidget
s.mywibox:setup {
        layout = wibox.layout.align.horizontal,
        { -- Left widgets
            layout = wibox.layout.fixed.horizontal,
            mylauncher,
            s.mytaglist,
            s.mypromptbox,
        },
        s.mytasklist, -- Middle widget
        { -- Right widgets
            layout = wibox.layout.fixed.horizontal,
            volume.getwidget(), -- Add this line here
            mykeyboardlayout,
            mytextclock,
            -- s.mylayoutbox,
        },
    }

After previous steps, you have the volume value in you title bar.

  1. Let's make the keys works to make the volume up, down and mute/unmute
    We are still inside rc.lua
    In key binding area add.
   -- Volume
   awful.key({}, "XF86AudioRaiseVolume", function() volume.up() end,
             {description = "volume up", group = "volume"}),
   awful.key({}, "XF86AudioLowerVolume", function() volume.down() end,
             {description = "volume down", group = "volume"}),
   awful.key({}, "XF86AudioMute", function() volume.toggle() end,
             {descriptoin = "mute / unmute", group = "volume"})

Now save the file and reload awesome window manager.

You can use or modify it. Thank you. :)

Updates

  1. Now it supports to control external devices.

About

Very simple module to control volume in awesome window manager.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages