Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set region captions to list all windows on active (focused) screen region, and only the title for other regions. For example:

caption always "%?%F %w %: %n*%t %?"

should display something like this:

1 Bash  2*Vim  3 Ipython      |  3*Ipython

However, the full list is displayed on both regions. Why does this happen and how can I fix it?

share|improve this question

It happens because the %? *first part* %:%? will evaluate to true if one or more %escapes evaluates to a non-empty string. In your example %w expands to a list, making the first part true regardless of the %F modifier.

The closest I can get to circumventing this "flaw" is below, but it only gives the active and inactive regions different colors, not different content.

caption always '%?%F%{rk}%:%{wk}%n %?%F%:(%t) %?  %?'
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .