mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +00:00
update notification for clementine
This commit is contained in:
parent
9b581a882f
commit
1eed0f458c
@ -131,6 +131,8 @@ class PTMNotify:
|
||||
title = "N\\A"
|
||||
if (len(commands.getoutput("pgrep amarok")) > 0):
|
||||
player = "amarok"
|
||||
elif (len(commands.getoutput("pgrep clementine")) > 0):
|
||||
player = "clementine"
|
||||
elif (len(commands.getoutput("pgrep mpd")) > 0):
|
||||
player = "mpd"
|
||||
elif (len(commands.getoutput("pgrep qmmp")) > 0):
|
||||
@ -141,6 +143,10 @@ class PTMNotify:
|
||||
artist = commands.getoutput("qdbus org.kde.amarok /Player GetMetadata 2> /dev/null | grep albumartist: | cut -c14-")
|
||||
album = commands.getoutput("qdbus org.kde.amarok /Player GetMetadata 2> /dev/null | grep album: | cut -c8-")
|
||||
title = commands.getoutput("qdbus org.kde.amarok /Player GetMetadata 2> /dev/null | grep title: | cut -c8-")
|
||||
elif (player == "clementine"):
|
||||
artist = commands.getoutput("qdbus org.mpris.clementine /Player GetMetadata 2> /dev/null | grep albumartist: | cut -c14-")
|
||||
album = commands.getoutput("qdbus org.mpris.clementine /Player GetMetadata 2> /dev/null | grep album: | cut -c8-")
|
||||
title = commands.getoutput("qdbus org.mpris.clementine /Player GetMetadata 2> /dev/null | grep title: | cut -c8-")
|
||||
elif (player == "mpd"):
|
||||
output = commands.getoutput("echo 'currentsong\nclose' | curl --connect-timeout 1 -fsm 3 telnet://localhost:6600 2> /dev/null")
|
||||
for line in output.split("\n"):
|
||||
|
Loading…
Reference in New Issue
Block a user