From b3e6b7e818d91a9c4f436543b381d252131e876d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 19 Jun 2018 08:59:14 +1000 Subject: [PATCH] song: Added mpc_args to specify arguments for mpc. Closes #1033 --- neofetch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index ede14397..db9aeed8 100755 --- a/neofetch +++ b/neofetch @@ -474,6 +474,12 @@ song_format="%artist% - %album% - %title%" # off: 'Song: The Fratellis - Costello Music - Chelsea Dagger' song_shorthand="off" +# 'mpc' arguments (specify a host, password etc). +# +# Default: '' +# Example: mpc_args=(-h HOST -P PASSWORD) +mpc_args=() + # Text Colors @@ -2348,7 +2354,7 @@ get_song() { } case "${player/*\/}" in - "mpd"* | "mopidy"*) song="$(mpc -f '%artist% \n %album% \n %title%' current)" ;; + "mpd"* | "mopidy"*) song="$(mpc -f '%artist%\n%album%\n%title%' current "${mpc_args[@]}")" ;; "mocp"*) song="$(mocp -Q '%artist \n %album \n %song')" ;; "google play"*) song="$(gpmdp-remote current)" ;; "rhythmbox"*) song="$(rhythmbox-client --print-playing-format '%ta \n %at \n %tt')" ;;