From 5270fe90de704352eed6e232703c60478f5bbf5f Mon Sep 17 00:00:00 2001 From: Gokul Swami Date: Fri, 12 Feb 2021 00:17:01 -0800 Subject: [PATCH] Added artist --- signals/playerctl.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/signals/playerctl.lua b/signals/playerctl.lua index 1fa30dc..b3f6f2a 100644 --- a/signals/playerctl.lua +++ b/signals/playerctl.lua @@ -3,8 +3,9 @@ -- playing (boolean) -- bling::playerctl::album -- album_art (string) --- bling::playerctl::title +-- bling::playerctl::title_artist -- stdout (string) +-- out (string) -- bling::playerctl::info -- interval_sec (number) -- length_sec (number) @@ -52,6 +53,7 @@ echo $tmp_cover_path ']] local song_title_cmd = "playerctl metadata title" + local song_artist_cmd = "playerctl metadata artist" local song_title = "No Song Playing" awful.widget.watch(song_title_cmd, update_interval, function(_, stdout) @@ -62,7 +64,9 @@ echo $tmp_cover_path end) song_title = stdout end - awesome.emit_signal("bling::playerctl::title", stdout) + awful.spawn.easy_async_with_shell(song_artist_cmd, function(out) + awesome.emit_signal("bling::playerctl::title_artist", stdout, out) + end) end) local prog_cmd = "playerctl position"