diff options
author | Mike Crute <crutem@amazon.com> | 2018-12-17 09:05:31 -0800 |
---|---|---|
committer | Mike Crute <crutem@amazon.com> | 2018-12-17 09:05:31 -0800 |
commit | 2263dc83ab56672243b808db1401b731878b212d (patch) | |
tree | 27b08338ee896f55e788e0ca9860f3bf67ac0013 /.bashrc | |
parent | 32d781d3bc4c04bf7743241bbbce3ffbefa2da7b (diff) | |
download | dotfiles-2263dc83ab56672243b808db1401b731878b212d.tar.bz2 dotfiles-2263dc83ab56672243b808db1401b731878b212d.tar.xz dotfiles-2263dc83ab56672243b808db1401b731878b212d.zip |
Keep tmux shade in sync with terminal
Diffstat (limited to '.bashrc')
-rw-r--r-- | .bashrc | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -369,6 +369,14 @@ function tm | |||
369 | fi | 369 | fi |
370 | 370 | ||
371 | if $tmux has-session -t "$1" &>/dev/null; then | 371 | if $tmux has-session -t "$1" &>/dev/null; then |
372 | # Set status-line color to match terminal background shade | ||
373 | # These are duplicated in ~/.tmux.conf | ||
374 | if [[ "$TERM_BG_SHADE" == "light" ]]; then | ||
375 | $tmux set-option -t "$1" -g status-bg colour255 | ||
376 | elif [[ "$TERM_BG_SHADE" == "dark" ]]; then | ||
377 | $tmux set-option -t "$1" -g status-bg colour234 | ||
378 | fi | ||
379 | |||
372 | exec $tmux attach -t "$1" | 380 | exec $tmux attach -t "$1" |
373 | return | 381 | return |
374 | fi | 382 | fi |