Replace ps pipeline for pactl with single pkill command (#123)

Co-authored-by: Peter Lyons <pete.lyons@mailchimp.com>
This commit is contained in:
Peter Lyons 2020-10-27 09:39:42 -06:00 committed by GitHub
parent caca49e3fa
commit 8bf5d2e606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ local volume_script = [[
-- Kill old pactl subscribe processes
awful.spawn.easy_async_with_shell("ps x | grep \"pactl subscribe\" | grep -v grep | awk '{print $1}' | xargs kill", function ()
awful.spawn.easy_async({"pkill", "--full", "--uid", os.getenv("USER"), "^pactl subscribe"}, function ()
-- Run emit_volume_info() with each line printed
awful.spawn.with_line_callback(volume_script, {
stdout = function(line)