Skip to content

Instantly share code, notes, and snippets.



Last active Sep 15, 2020
What would you like to do?
Display Deezer played track in tmux powerline segment
# Display current played track by Deezer Application
generate_segmentrc() {
read -d '' rccontents << EORC
echo "${rccontents}"
run_segment() {
infos=$(osascript -e '
if application "Deezer" is running then
tell application "Deezer"
local ttitle
local tartist
if (player state = playing) then
set ttitle to (get title of loaded track)
set tartist to (get artist of loaded track)
ttitle & " - " & tartist
end if
end tell
end if')
if [ ! -z "$infos" ]
infos=`echo $infos | sed -e 's/(.*)//g' | sed -e 's/ */ /g'`
echo "$infos"
return 0
return 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment