Sound volume controls fixed: .spawn() runs multiple amixer commands so right/left controls changes not synchronously.
This commit is contained in:
parent
ff4e8ba2d4
commit
738c403532
8
rc.lua
8
rc.lua
|
@ -391,17 +391,17 @@ root.buttons(awful.util.table.join(
|
|||
globalkeys = awful.util.table.join(
|
||||
-- Volume control --
|
||||
awful.key({ modkey }, ".", function ()
|
||||
awful.util.spawn("amixer set Master 9%+") end),
|
||||
os.execute("pgrep -x amixer || amixer set Master 1%+") end),
|
||||
awful.key({ modkey }, ",", function ()
|
||||
awful.util.spawn("amixer set Master 9%-") end),
|
||||
os.execute("pgrep -x amixer || amixer set Master 1%-") end),
|
||||
awful.key({ modkey }, "/", function ()
|
||||
awful.util.spawn("amixer sset Master toggle") end),
|
||||
|
||||
-- Volume control --
|
||||
awful.key({ }, "XF86AudioRaiseVolume", function ()
|
||||
awful.util.spawn("amixer set Master 9%+") end),
|
||||
os.execute("pgrep -x amixer || amixer set Master 1%+") end),
|
||||
awful.key({ }, "XF86AudioLowerVolume", function ()
|
||||
awful.util.spawn("amixer set Master 9%-") end),
|
||||
os.execute("pgrep -x amixer || amixer set Master 1%-") end),
|
||||
awful.key({ }, "XF86AudioMute", function ()
|
||||
awful.util.spawn("amixer sset Master toggle") end),
|
||||
|
||||
|
|
8
wi.lua
8
wi.lua
|
@ -73,16 +73,16 @@ volicon:set_image(beautiful.widget_vol)
|
|||
volicon:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({ }, 1, function () awful.util.spawn("urxvt -e alsamixer --view=all") end),
|
||||
awful.button({ }, 4, function () awful.util.spawn("amixer set Master 1%+") end),
|
||||
awful.button({ }, 5, function () awful.util.spawn("amixer set Master 1%-") end)
|
||||
awful.button({ }, 4, function () os.execute("pgrep -x amixer || amixer set Master 1%+") end),
|
||||
awful.button({ }, 5, function () os.execute("pgrep -x amixer || amixer set Master 1%-") end)
|
||||
)
|
||||
)
|
||||
volpct = wibox.widget.textbox()
|
||||
volpct:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({ }, 1, function () awful.util.spawn("urxvt -e alsamixer --view=all") end),
|
||||
awful.button({ }, 4, function () awful.util.spawn("amixer set Master 1%+") end),
|
||||
awful.button({ }, 5, function () awful.util.spawn("amixer set Master 1%-") end)
|
||||
awful.button({ }, 4, function () os.execute("pgrep -x amixer || amixer set Master 1%+") end),
|
||||
awful.button({ }, 5, function () os.execute("pgrep -x amixer || amixer set Master 1%-") end)
|
||||
)
|
||||
)
|
||||
vicious.register(volpct, vicious.widgets.volume, "$1% ", nil, "Master")
|
||||
|
|
Loading…
Reference in New Issue