浏览代码

Add playerctl support (#1475)

Cyril Raffatelli 5 年之前
父节点
当前提交
298d75665a
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      neofetch

+ 6 - 0
neofetch

@@ -501,6 +501,7 @@ disk_percent="on"
 # mpd
 # muine
 # netease-cloud-music
+# playerctl
 # pogo
 # pragha
 # qmmp
@@ -2656,6 +2657,7 @@ get_song() {
         "muine"
         "netease-cloud-music"
         "plasma-browser-integration"
+        "playerctl"
         "pogo"
         "pragha"
         "qmmp"
@@ -2791,6 +2793,10 @@ get_song() {
                     awk -F'"' 'BEGIN {RS=" entry"}; /"artist"/ {a=$4} /"album"/ {b=$4}
                     /"title"/ {t=$4} END {print a " \n" b " \n" t}')"
         ;;
+        
+        "playerctl"*)
+            song="$(playerctl metadata --format '{{ artist }} \n{{ album }} \n{{ title }}')"
+         ;;
 
         *) mpc &>/dev/null && song="$(mpc -f '%artist% \n%album% \n%title%' current)" || return ;;
     esac