2020-09-26 17:17:43 +00:00
|
|
|
local REPLY
|
|
|
|
zstyle -s ':custom:prompts:mpv' socket REPLY
|
|
|
|
[ -S $REPLY ] && zsocket $REPLY 2>/dev/null || return
|
2020-10-24 11:41:04 +00:00
|
|
|
_cprompts_mpv[2]="${${$(\
|
|
|
|
print -u $REPLY '{ "command": ["get_property", "media-title"] }' && \
|
|
|
|
read -eEu $REPLY \
|
2021-01-11 20:30:59 +00:00
|
|
|
)#*\"data\"([:blank:])#:([:blank:])#\"}%%(\"~\\\")*}"
|
2020-09-26 17:17:43 +00:00
|
|
|
exec {REPLY}>&-
|
|
|
|
[ -z $_cprompts_mpv[2] ] || p10k segment -b magenta -i '' -t "${_cprompts_mpv[2]}"
|