diff --git a/functions b/functions index afd88f1..c24953c 100644 --- a/functions +++ b/functions @@ -20,6 +20,22 @@ function insert-sudo { zle -U "sudo " } +function true-colors { + awk 'BEGIN{ + s="/\\/\\/\\/\\/\\"; s=s s s s s s s s; + for (colnum = 0; colnum<77; colnum++) { + r = 255-(colnum*255/76); + g = (colnum*510/76); + b = (colnum*255/76); + if (g>255) g = 510-g; + printf "\033[48;2;%d;%d;%dm", r,g,b; + printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b; + printf "%s\033[0m", substr(s,colnum+1,1); + } + printf "\n"; + }' +} + function port-forward { if [ $# -lt 2 ]; then echo Usage: port-forward HOST LOCAL_PORT \[REMOTE_PORT\] diff --git a/tmux.conf b/tmux.conf index d675b64..b759615 100644 --- a/tmux.conf +++ b/tmux.conf @@ -3,6 +3,7 @@ bind-key r source-file ~/.tmux.conf \; display-message " ✱ ~/.tmux.conf is rel # 256 colors set -g default-terminal "screen-256color" +set-option -ga terminal-overrides ",xterm-256color:Tc" # double tap for back and forth bind-key C-b last-window