tmux: Check if a window is visible in some active session -


suppose have tmux session 3 windows looking @ window 0. format variable window_active 1 window 0, , 0 other windows. create second grouped session tmux new-session -t 0 , point @ window 2. in session, window_active 1 window 1, , 0 other windows (the first session unchanged).

i want formatting variable 1 if window active in attached session. so, if call variable window_used, in example, have following behavior:

           window 0   window 1  window 2 session 0  active     used      nothing session 1  used       active    nothing 

if detach session 1, should have:

           window 0   window 1  window 2 session 0  nothing    active    nothing 

based on reading tmux manpage, variable doesn't exist. maybe can manually shell script it?

update: tried shell-scripting latest git version of tmux (which interpolates format variables before passing them command); however, output of shell "lags" before gets tmux (since tmux doesn't invoke them synchronously), it's not usable purpose.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -