change directories layout, better manager of layouts (not only one)

I want add this functionality, for multiple layout, the old not help me,
I think this may help