Skip to content

Instantly share code, notes, and snippets.

@sooop
Created August 13, 2013 03:08
Show Gist options
  • Save sooop/6217553 to your computer and use it in GitHub Desktop.
Save sooop/6217553 to your computer and use it in GitHub Desktop.
foorbar2000 display formatting script
//begin color transition
$transition(
%list_index%
// artist name, max 13 characters and if not exist, display 'unknown'
$if(%artist%,
$if($greater($len(%artist%),12),
$left(%artist%,11)…,%artist%),
unknown)
//title
%title%,
// color codes used to transition
$rgb(46,107,66),
$rgb(216,252,131))
// display 'isplaying' flag.
$rgb(214,245,105)
$if(%isplaying%,
$tab()$rgb(214,245,105)
// calculate progress
$div($mul(%playback_time_seconds%,100),%length_seconds%)'%' playing…
// display progress
$progress(
%playback_time_seconds%,
%length_seconds%,
25,
$rgb(21,251,222)♬,
$rgb(102,204,68)▶) ,)
// some space using tab and display length of song.
$tab() %length%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment