Skip to content

Commit 9279765

Browse files
codekilncursoragent
andcommitted
docs: Add tiered focus visibility techniques to tmux pane border page
Stack multiple signals (color, background dimming, arrows, labels) for progressively stronger pane focus indication in dense layouts. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 0433711 commit 9279765

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

pages/tmux___Q___How can I put a thick border around the focused pane%3F.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,88 @@
3232
- ### Requirements
3333
- `heavy` and `double` border styles require UTF-8 support in your terminal
3434
- If UTF-8 is not supported, tmux falls back to standard ACS line drawing
35+
- ## Going Further: Making Focus Impossible to Miss
36+
- Heavy borders alone are still pretty subtle, especially in dense multi-pane layouts. Thick lines alone don't change enough visual contrast.
37+
- For **"impossible to miss" focus**, stack multiple signals:
38+
- border weight
39+
- strong color contrast
40+
- background fill change
41+
- title/status cue
42+
- optionally dim *inactive* panes instead of highlighting the active one
43+
- That last trick (dim others) is dramatically more legible.
44+
- ### Tier 1 — Strong border + high-contrast color
45+
- Much louder than basic `fg=green`:
46+
- ~~~
47+
set -g pane-border-lines heavy
48+
49+
# inactive = dark gray
50+
set -g pane-border-style fg=colour238
51+
52+
# active = neon
53+
set -g pane-active-border-style fg=colour46,bold
54+
~~~
55+
- Bright green (`colour46`) or yellow (`colour226`) pops much harder than `green`.
56+
- ### Tier 2 — Fill the entire active pane background (huge improvement)
57+
- This is the first *actually obvious* solution.
58+
- Change the **pane background**, not just the border:
59+
- ~~~
60+
# dim inactive panes
61+
set -g window-style fg=colour245,bg=colour234
62+
63+
# brighten active pane
64+
set -g window-active-style fg=colour255,bg=colour236
65+
~~~
66+
- Effect:
67+
- everything else looks muted
68+
- active pane looks "lit"
69+
- This is far more perceptible than borders alone.
70+
- Most people who try this never go back.
71+
- ### Tier 3 — Add explicit focus markers (arrows)
72+
- Adds directional cues:
73+
- ~~~
74+
set -g pane-border-indicators both
75+
~~~
76+
- Gives arrows + color hint on the border edges.
77+
- Helpful when panes are small.
78+
- ### Tier 4 — Big "FOCUS" tag in the border (very obvious)
79+
- tmux lets you show text in the active border:
80+
- ~~~
81+
set -g pane-border-format "#{?pane_active,#[bold fg=black bg=colour46] ACTIVE #[default], }"
82+
~~~
83+
- You literally get `ACTIVE` on the focused pane's border. Zero ambiguity.
84+
- ### Tier 5 — Extreme (best for dense layouts)
85+
- Combine dimming + bright border + title:
86+
- ~~~
87+
set -g pane-border-lines heavy
88+
set -g pane-border-style fg=colour238
89+
set -g pane-active-border-style fg=colour226,bold
90+
91+
set -g window-style fg=colour245,bg=colour234
92+
set -g window-active-style fg=colour255,bg=colour236
93+
94+
set -g pane-border-indicators both
95+
96+
set -g pane-border-format "#{?pane_active,#[bold fg=black bg=colour226] ● ACTIVE #[default], }"
97+
~~~
98+
- This gives you:
99+
- dim others
100+
- bright yellow border
101+
- arrows
102+
- literal "● ACTIVE" label
103+
- It's almost impossible to lose track of focus.
104+
- ### Bonus: focus flash when switching panes
105+
- A quick flash on selection for nice UX:
106+
- ~~~
107+
bind -n C-h select-pane -L \; display-message "◀"
108+
bind -n C-j select-pane -D \; display-message "▼"
109+
bind -n C-k select-pane -U \; display-message "▲"
110+
bind -n C-l select-pane -R \; display-message "▶"
111+
~~~
112+
- Small directional feedback helps muscle memory.
113+
- ### Practical recommendation
114+
- For dense layouts (lots of panes, codespaces, tmux nested in browser): start with **Tier 2 + Tier 5 combo** (dim inactive + bright border + label).
115+
- Borders alone just don't carry enough signal.
116+
- That combo makes the active pane visually dominant without being garish.
35117
- ## My Notes
36118
- Add to `~/.tmux.conf` and reload with `tmux source-file ~/.tmux.conf`
37119
- Or test live with `prefix + :` then type the set command

0 commit comments

Comments
 (0)