diff options
author | Urbain Vaes <urbain@vaes.uk> | 2015-06-25 11:36:04 +0100 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2015-06-25 11:36:04 +0100 |
commit | f4012c9c1bdfa6fda187dc943c408f69f5aedb0e (patch) | |
tree | eb86d09d8e1f3d33f2490e46a65faf76815076ce | |
parent | e2d48b806e0e9719abbee2efff2d1af739979b94 (diff) |
Add code snippets for good tmux colors
-rw-r--r-- | tmux.conf | 3 | ||||
-rw-r--r-- | zshrc | 27 |
2 files changed, 19 insertions, 11 deletions
@@ -1,4 +1,7 @@ # set -g default-terminal "screen-256color" +set -g default-terminal screen +if "[[ ${TERM} =~ 256color || ${TERM} == fbterm ]]" 'set -g default-terminal screen-256color' + set -g mode-mouse on set -g mouse-resize-pane on set -g mouse-select-pane on @@ -10,8 +10,8 @@ ENABLE_CORRECTION="true" # Dots for completion COMPLETION_WAITING_DOTS="true" -# Plugins -plugins=(vi-mode git ubuntu tmux) +# Plugins (add tmux?) +plugins=(vi-mode git ubuntu) # Source oh-my-zsh source $ZSH/oh-my-zsh.sh @@ -64,7 +64,7 @@ alias purge='sudo apt-get purge' alias push='git push origin master' alias pushs='git push --recurse-submodules=check' alias remove='sudo apt-get autoremove' -alias tmux="TERM=screen-256color-bce tmux" +# alias tmux="TERM=screen-256color-bce tmux" alias update='sudo apt-get update' alias upgrade='sudo apt-get upgrade' alias v='vim' @@ -95,8 +95,6 @@ bindkey '^N' history-beginning-search-forward # Crontab jobs crontab ~/.crontab -TERM=xterm-256color -# TERM=rxvt-unicode-256color fancy-ctrl-z () { if [[ $#BUFFER -eq 0 ]]; then @@ -122,12 +120,19 @@ fshow() { [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh # Set programmer dvorak -xrdb ~/.Xresources -# setxkbmap -layout us -variant dvp +# xrdb ~/.Xresources + +TERM=xterm-256color + +if [[ -n ${TMUX} && -n ${commands[tmux]} ]];then + case $(tmux showenv TERM 2>/dev/null) in + *256color) ;& + TERM=fbterm) + TERM=screen-256color ;; + *) + TERM=screen + esac +fi # Load external scripts source ~/github/fzf-marks/fzf-marks.zsh -source ~/github/z/z.sh -source ~/github/fzf-extras/fzf-extras.sh -source ~/github/fzf-extras/fzf-extras.zsh - |