]> git.madduck.net Git - etc/awesome.git/blobdiff - .config/awesome/lain/widget/static/git-favicon.png

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '33c0e0c2360a04fcc6f51bccb0ad2a7a9e9c07b3'
[etc/awesome.git] / .config / awesome / lain / widget / static / git-favicon.png
diff --git a/widget/pulse.lua b/widget/pulse.lua
deleted file mode 100644 (file)
index f63fe55..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
---[[
-
-     Licensed under GNU General Public License v2
-      * (c) 2016, Luca CPZ
-
---]]
-
-local helpers = require("lain.helpers")
-local shell   = require("awful.util").shell
-local wibox   = require("wibox")
-local string  = string
-local type    = type
-
--- PulseAudio volume
--- lain.widget.pulse
-
-local function factory(args)
-    local pulse    = { widget = wibox.widget.textbox(), device = "N/A" }
-    local args     = args or {}
-    local timeout  = args.timeout or 5
-    local settings = args.settings or function() end
-
-    pulse.devicetype = args.devicetype or "sink"
-    pulse.cmd = args.cmd or "pacmd list-" .. pulse.devicetype .. "s | sed -n -e '/*/,$!d' -e '/index/p' -e '/base volume/d' -e '/volume:/p' -e '/muted:/p' -e '/device\\.string/p'"
-
-    function pulse.update()
-        helpers.async({ shell, "-c", type(pulse.cmd) == "string" and pulse.cmd or pulse.cmd() },
-        function(s)
-            volume_now = {
-                index  = string.match(s, "index: (%S+)") or "N/A",
-                device = string.match(s, "device.string = \"(%S+)\"") or "N/A",
-                muted  = string.match(s, "muted: (%S+)") or "N/A"
-            }
-
-            pulse.device = volume_now.index
-
-            local ch = 1
-            volume_now.channel = {}
-            for v in string.gmatch(s, ":.-(%d+)%%") do
-                volume_now.channel[ch] = v
-                ch = ch + 1
-            end
-
-            volume_now.left  = volume_now.channel[1] or "N/A"
-            volume_now.right = volume_now.channel[2] or "N/A"
-
-            widget = pulse.widget
-            settings()
-        end)
-    end
-
-    helpers.newtimer("pulse", timeout, pulse.update)
-
-    return pulse
-end
-
-return factory