]> git.donarmstrong.com Git - x_base.git/commitdiff
* add volume support controls
authorDon Armstrong <don@donarmstrong.com>
Thu, 29 Jul 2010 21:37:11 +0000 (21:37 +0000)
committerDon Armstrong <don@donarmstrong.com>
Thu, 29 Jul 2010 21:37:11 +0000 (21:37 +0000)
.config/awesome/rc.lua

index cf8633ee4c0a0de9b6c1370944e7a384443c65fc..684ea27a04569c717800babb99b136c4beb10933 100644 (file)
@@ -7,6 +7,8 @@ require("beautiful")
 -- Notification library
 require("naughty")
 
+require("obvious.volume_alsa")
+
 -- Load Debian menu entries
 require("debian.menu")
 
@@ -76,6 +78,8 @@ mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
 -- Create a textclock widget
 mytextclock = awful.widget.textclock({ align = "right" }, " %c ", 1)
 
+myvolumealsa = obvious.volume_alsa()
+
 -- Create a systray
 mysystray = widget({ type = "systray" })
 
@@ -149,6 +153,7 @@ for s = 1, screen.count() do
         },
         mylayoutbox[s],
         mytextclock,
+       myvolumealsa,
         s == 1 and mysystray or nil,
         mytasklist[s],
         layout = awful.widget.layout.horizontal.rightleft
@@ -168,6 +173,8 @@ root.buttons(awful.util.table.join(
 globalkeys = awful.util.table.join(
     -- awful.key({ modkey,           }, "Left",   awful.tag.viewprev       ),
     -- awful.key({ modkey,           }, "Right",  awful.tag.viewnext       ),
+   awful.key({},"XF86AudioRaiseVolume",function () obvious.volume_alsa.raise(0, "Master", 2) end),
+   awful.key({},"XF86AudioLowerVolume",function () obvious.volume_alsa.lower(0, "Master", 2) end),
     awful.key({ modkey,           }, "Escape", awful.tag.history.restore),
 
     awful.key({ modkey,           }, "j",