song: Better splitting.

master
Dylan Araps 8 years ago
parent acd4c84614
commit b6f0460b35
  1. 5
      neofetch

@ -2490,10 +2490,7 @@ get_song() {
# Display Artist, Album and Title on separate lines.
if [[ "$song_shorthand" == "on" && "$song" ]]; then
artist="${song/ ‡*}"
album="${song#*‡ }"
album="${album% ‡*}"
song="${song/*‡}"
LC_ALL="$sys_locale" IFS="‡" read -r artist album song <<< "$song"
[[ "$(trim "$artist")" ]] && prin "Artist" "$artist"
[[ "$(trim "$album")" ]] && prin "Album" "$album"

Loading…
Cancel
Save