From 3734821eb510a85997f8f623a69b161012f42a83 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 2 Apr 2018 07:42:22 +1000 Subject: [PATCH] general: Added option to manually specify music player. Closes #934 --- config/config.conf | 39 +++++++++++++++++++++++++++++++++++++++ neofetch | 7 +++++++ 2 files changed, 46 insertions(+) diff --git a/config/config.conf b/config/config.conf index aadbf825..de542872 100644 --- a/config/config.conf +++ b/config/config.conf @@ -348,6 +348,45 @@ disk_subtitle="mount" # Song +# Manually specify a music player. +# +# Default: 'auto' +# Values: 'auto', 'player-name' +# Flag: --music_player +# +# Available values for 'player-name': +# +# Google Play +# Spotify +# amarok +# audacious +# banshee +# bluemindo +# clementine +# cmus +# deadbeef +# deepin-music +# elisa +# exaile +# gnome-music +# guayadeque +# iTunes$ +# juk +# lollypop +# mocp +# mopidy +# mpd +# pogo +# pragha +# qmmp +# quodlibet +# rhythmbox +# spotify +# tomahawk +# xmms2d +# yarock +music_player="auto" + # Print the Artist and Title on separate lines # # Default: 'off' diff --git a/neofetch b/neofetch index bd1f2ccf..a720ff37 100755 --- a/neofetch +++ b/neofetch @@ -1560,6 +1560,10 @@ get_song() { -e "xmms2d" \ -e "yarock")" + [[ "$music_player" && "$music_player" != "auto" ]] && \ + player="$music_player" + + get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. # This function saves us using the same command throughout the function. @@ -4637,6 +4641,8 @@ INFO: --ip_host url URL to query for public IP --song_shorthand on/off Print the Artist/Title on separate lines + --music_player player-name Manually specify a player to use. + Available values are listed in the config file --install_time on/off Enable/Disable showing the time in Install Date output. --install_time_format 12h/24h Set time format in Install Date to be 12 hour or 24 hour. @@ -4822,6 +4828,7 @@ get_args() { "--shell_version") shell_version="$2" ;; "--ip_host") public_ip_host="$2" ;; "--song_shorthand") song_shorthand="$2" ;; + "--music_player") music_player="$2" ;; "--install_time") install_time="$2" ;; "--install_time_format") install_time_format="$2" ;; "--cpu_temp")