undo logic fix that was bad

This commit is contained in:
Gokul Swami 2021-02-16 21:21:29 -08:00
parent e881b660b6
commit a92a0d60ec
1 changed files with 8 additions and 6 deletions

View File

@ -81,19 +81,21 @@ echo "$tmp_cover_path"
-- Follow title -- Follow title
awful.spawn.easy_async_with_shell( awful.spawn.easy_async_with_shell(
"ps x | grep \"playerctl metadata\" | grep -v grep | awk '{print $1}' | xargs kill", function() "ps x | grep \"playerctl metadata\" | grep -v grep | awk '{print $1}' | xargs kill",
function()
awful.spawn.with_line_callback(song_follow_cmd, { awful.spawn.with_line_callback(song_follow_cmd, {
stdout = function(line) stdout = function(line)
local album_path = "" local album_path = ""
awful.spawn.easy_async_with_shell(art_script, function(out) awful.spawn.easy_async_with_shell(art_script, function(out)
-- Get album path -- Get album path
album_path = out:gsub('%\n', '') album_path = out:gsub('%\n', '')
end)
-- Get title and artist -- Get title and artist
local artist = line:match('artist_(.*)title_') local artist = line:match('artist_(.*)title_')
local title = line:match('title_(.*)') local title = line:match('title_(.*)')
awesome.emit_signal("bling::playerctl::title_artist_album", awesome.emit_signal(
title, artist, album_path) "bling::playerctl::title_artist_album", title,
artist, album_path)
end)
end end
}) })
end) end)