mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-15 16:37: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.
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user