summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorMike Crute <crutem@amazon.com>2018-12-17 09:05:31 -0800
committerMike Crute <crutem@amazon.com>2018-12-17 09:05:31 -0800
commit2263dc83ab56672243b808db1401b731878b212d (patch)
tree27b08338ee896f55e788e0ca9860f3bf67ac0013 /.bashrc
parent32d781d3bc4c04bf7743241bbbce3ffbefa2da7b (diff)
downloaddotfiles-2263dc83ab56672243b808db1401b731878b212d.tar.bz2
dotfiles-2263dc83ab56672243b808db1401b731878b212d.tar.xz
dotfiles-2263dc83ab56672243b808db1401b731878b212d.zip
Keep tmux shade in sync with terminal
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index 497fa41..88316ca 100644
--- a/.bashrc
+++ b/.bashrc
@@ -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