X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/a3832b86deffa231776cf843262e6f90bb2eaa45..88e64639d11859621848ca2ebe21acfa6adfc4d2:/alsabar.md diff --git a/alsabar.md b/alsabar.md index 549b28a..7a90478 100644 --- a/alsabar.md +++ b/alsabar.md @@ -1,6 +1,6 @@ [<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets) -Shows and controls alsa volume with a progressbar and provides tooltips, notifications, and color changes at mute/unmute switch. +Shows and controls alsa volume with a progressbar; provides tooltips, notifications, and color changes at mute/unmute switch. myvolumebar = lain.widgets.alsabar() @@ -12,6 +12,7 @@ The function takes a table as optional argument, which can contain: Variable | Meaning | Type | Default --- | --- | --- | --- +`timeout` | Refresh timeout seconds | int | 4 `width` | Bar width | int | 63 `height` | Bar height | int | 1 `ticks` | Set bar ticks on | boolean | true @@ -56,22 +57,22 @@ You can control the widget with key bindings like these: -- Volume control awful.key({ altkey }, "Up", function () - awful.util.spawn("amixer sset " .. volume.channel .. " " .. volume.step .. "+") + awful.util.spawn("amixer set " .. volume.channel .. " " .. volume.step .. "+") volume.notify() end), awful.key({ altkey }, "Down", function () - awful.util.spawn("amixer sset " .. volume.channel .. " " .. volume.step .. "-") + awful.util.spawn("amixer set " .. volume.channel .. " " .. volume.step .. "-") volume.notify() end), awful.key({ altkey }, "m", function () - awful.util.spawn("amixer set Master playback toggle") + awful.util.spawn("amixer set " .. volume.channel .. " playback toggle") volume.notify() end), awful.key({ altkey, "Control" }, "m", function () - awful.util.spawn("amixer set Master playback 100%", false ) + awful.util.spawn("amixer set " .. volume.channel .. " playback 100%", false ) volume.notify() end),