In case you or others still need this:
function dname()
{
local current_display = fe.displays[fe.list.display_index];
return current_display.name;
}
You can use this function as a Magic Token so it will be updated like one:
local print_display = fe.add_text( "Display: [!dname]", x, y, w, h );
Mind the "!" before the function's name. It marks custom Magic Tokens.