mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-21 11:17:13 +00:00
song: Better splitting.
This commit is contained in:
5
neofetch
5
neofetch
@@ -2490,10 +2490,7 @@ get_song() {
|
|||||||
|
|
||||||
# Display Artist, Album and Title on separate lines.
|
# Display Artist, Album and Title on separate lines.
|
||||||
if [[ "$song_shorthand" == "on" && "$song" ]]; then
|
if [[ "$song_shorthand" == "on" && "$song" ]]; then
|
||||||
artist="${song/ ‡*}"
|
LC_ALL="$sys_locale" IFS="‡" read -r artist album song <<< "$song"
|
||||||
album="${song#*‡ }"
|
|
||||||
album="${album% ‡*}"
|
|
||||||
song="${song/*‡}"
|
|
||||||
|
|
||||||
[[ "$(trim "$artist")" ]] && prin "Artist" "$artist"
|
[[ "$(trim "$artist")" ]] && prin "Artist" "$artist"
|
||||||
[[ "$(trim "$album")" ]] && prin "Album" "$album"
|
[[ "$(trim "$album")" ]] && prin "Album" "$album"
|
||||||
|
|||||||
Reference in New Issue
Block a user