From: copycat-killer Date: Sun, 21 Feb 2016 13:45:46 +0000 (+0100) Subject: pulseaudio: cmd switch from grep to sed #168 X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/4d664adc0132c8d110cde257227557dd7deac48b?ds=inline;hp=-c pulseaudio: cmd switch from grep to sed #168 --- 4d664adc0132c8d110cde257227557dd7deac48b diff --git a/widgets/pulseaudio.lua b/widgets/pulseaudio.lua index 17f91f3..589249f 100644 --- a/widgets/pulseaudio.lua +++ b/widgets/pulseaudio.lua @@ -25,7 +25,8 @@ local function worker(args) local settings = args.settings or function() end pulseaudio.sink = args.sink or 0 -- user defined or first one - pulseaudio.cmd = args.cmd or string.format("pacmd list-sinks | grep -e 'index: %d' -e 'volume:' -e 'muted'", pulseaudio.sink) + pulseaudio.cmd = args.cmd or string.format("pacmd list-sinks | sed -n -e '/base volume/d' -e '/index: %d/p' -e '/volume:/p' -e '/muted:/p' | sed -n -e '/index: %d/,+2p'", + pulseaudio.sink, pulseaudio.sink) pulseaudio.widget = wibox.widget.textbox('') function pulseaudio.update() diff --git a/wiki b/wiki index f1868c3..22e0d07 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit f1868c31feab78b1898998407a597e3c06ee71ba +Subproject commit 22e0d07b582caf059aa4dd856cf213f7c027a282