volume: move volume functions into a lib

Also add some notification when changing the volume. Also move
sharetags to the `lib/` directory. And modify `loadrc` to be able to
load modules.
This commit is contained in:
Vincent Bernat 2012-07-14 16:29:19 +02:00
parent 5d55609657
commit 3415d39992
6 changed files with 79 additions and 11 deletions

View file

@ -1,5 +1,6 @@
config.keys = {}
config.mouse = {}
local volume = loadrc("volume", "volume")
local function client_info()
local v = ""
@ -79,9 +80,9 @@ config.keys.global = awful.util.table.join(
awful.key({ modkey, "Control" }, "r", awesome.restart),
-- Multimedia keys
awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -q -c 0 set Master 2dB+", false) end),
awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -q -c 0 set Master 2dB-", false) end),
awful.key({ }, "XF86AudioMute", function () awful.util.spawn("amixer -q -c 0 set Master toggle", false) end)
awful.key({ }, "XF86AudioRaiseVolume", volume.increase),
awful.key({ }, "XF86AudioLowerVolume", volume.decrease),
awful.key({ }, "XF86AudioMute", volume.toggle)
)
config.keys.client = awful.util.table.join(