add code to display ruler only active window