Hello tmux users,

I'm setting up my tmux status line. I want to achieve something like the 
figure below with powerline triangles. But there are gaps between two 
window tabs and also with the status left. I want to get rid of gaps 
completely. So I set all the divider to none. But I still need to set fg 
and bg properly. Namely, make the triangle bg match the bg of the next tab. 
In order to do that, I need to know whether the next tab is active or not 
and whether it's the last tab.
```
#{?window_end_flag,#[fg=colour239#,bg=colour237],#{?#{==:#(tmux lsw -f 
'#{?window_active,1,}' -F 
'#I'),#{e|+|:#I,1}},#[fg=colour239#,bg=colour214],#[fg=colour239#,bg=colour239]}}"
```
This is what I came up with. I want to compare the index of active window 
and this window index plus 1. But this does not seem to work. It always 
uses the color setting for the false condition.

[image: 687474703a2f2f692e696d6775722e636f6d2f694f6a637a2e706e67.png]
Full config for status line if you want to give it a try:
```
set-window-option -g window-status-current-format "\
#{?window_start_flag,#[fg=colour195#,bg=colour214],#[fg=colour214#,bg=colour214]}\
#[fg=colour239, bg=colour214] #I* \
#[fg=colour239, bg=colour214, bold] #W \
#{?window_end_flag,#[fg=colour214#,bg=colour237],#[fg=colour214#,bg=colour239]}"

set-window-option -g window-status-format "\
#{?window_start_flag,#[fg=colour195#,bg=colour239],#[fg=colour239#,bg=colour239]}\
#[fg=colour223,bg=colour239] #I \
#[fg=colour223, bg=colour239] #W \
#{?window_end_flag,#[fg=colour239#,bg=colour237],#{?#{==:#(tmux lsw -f 
'#{?window_active,1,}' -F 
'#I'),#{e|+|:#I,1}},#[fg=colour239#,bg=colour214],#[fg=colour239#,bg=colour239]}}"
```
Regards,
Haodong Du

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/tmux-users/3d8a56b9-f36b-4a24-bd52-29a5efdd166an%40googlegroups.com.

Reply via email to