There is a command for this, but it's undocumented because it was sort of taken out but not entirely

Code:
//window -d @test | setlayer 128 @test


command is: /setlayer <0-255> <@window>

See this thread to read why it was 'removed'