From 4d664adc0132c8d110cde257227557dd7deac48b Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Sun, 21 Feb 2016 14:45:46 +0100 Subject: [PATCH] pulseaudio: cmd switch from grep to sed #168 --- widgets/pulseaudio.lua | 3 ++- wiki | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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