Remove artist, keep it simple-n-quick

This commit is contained in:
Alex 2020-05-24 01:10:22 +02:00
parent 580b3a9bd9
commit 99abcc5467
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
1 changed files with 1 additions and 2 deletions

View File

@ -79,8 +79,7 @@ function prompt_c_mpv_mpris() {
typeset -g _cprompts_mpv
local busout="$(busctl get-property -j --no-pager --timeout=300ms --user org.mpris.MediaPlayer2.mpv /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player Metadata 2>/dev/null)"
[ -z $busout ] && return
format='((.data."xesam:artist".data[0] // empty) + " - " + (.data."xesam:title".data // empty))'
_cprompts_mpv="$(print $busout | jq -er $format)"
_cprompts_mpv="$(print $busout | jq -er '(.data."xesam:title".data // empty)')"
[ -z $_cprompts_mpv ] || p10k segment -b magenta -i '' -t "${_cprompts_mpv:0:40}$([ ${#_cprompts_mpv} -gt 40 ] && print ...)"
}
function prompt_c_todo() {