Enable true colors
This commit is contained in:
parent
fdd2d39ebb
commit
fbc528da5f
2 changed files with 17 additions and 0 deletions
16
functions
16
functions
|
@ -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\]
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue