Enable true colors

This commit is contained in:
Andrew Tomaka 2017-08-30 21:18:04 -04:00
parent fdd2d39ebb
commit fbc528da5f
No known key found for this signature in database
GPG key ID: C78D1A81582BAC86
2 changed files with 17 additions and 0 deletions

View file

@ -20,6 +20,22 @@ function insert-sudo {
zle -U "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 { function port-forward {
if [ $# -lt 2 ]; then if [ $# -lt 2 ]; then
echo Usage: port-forward HOST LOCAL_PORT \[REMOTE_PORT\] echo Usage: port-forward HOST LOCAL_PORT \[REMOTE_PORT\]

View file

@ -3,6 +3,7 @@ bind-key r source-file ~/.tmux.conf \; display-message " ✱ ~/.tmux.conf is rel
# 256 colors # 256 colors
set -g default-terminal "screen-256color" set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# double tap for back and forth # double tap for back and forth
bind-key C-b last-window bind-key C-b last-window