Better RGB support

prenix
Geoffrey Frogeye 2021-07-04 11:48:00 +02:00
parent 97d8d3d0b4
commit c2d3ccb779
Signed by: geoffrey
GPG Key ID: C72403E7F82E6AD8
5 changed files with 31 additions and 4 deletions

View File

@ -15,14 +15,14 @@
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
env:
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use `alacritty` if it is
# available, otherwise `xterm-256color` is used.
TERM: xterm-256color
#TERM: xterm-256color
window:
# Window dimensions (changes require restart)

View File

@ -47,4 +47,15 @@ then
fi
ssh -t "$@" "$(cat "${CACHE_DIR}/cmd")"
# To keep until https://github.com/openssh/openssh-portable/commit/f64f8c00d158acc1359b8a096835849b23aa2e86
# is merged
function _ssh {
if [ "${TERM}" = "alacritty" ]
then
TERM=xterm-256color ssh "$@"
else
ssh "$@"
fi
}
alias ssh='_ssh'
_ssh -t "$@" "$(cat "${CACHE_DIR}/cmd")"

View File

@ -50,4 +50,16 @@ _colored_ls() {
alias ll="_colored_ls"
alias la="_colored_ls -a"
# To keep until https://github.com/openssh/openssh-portable/commit/f64f8c00d158acc1359b8a096835849b23aa2e86
# is merged
function _ssh {
if [ "${TERM}" = "alacritty" ]
then
TERM=xterm-256color ssh "$@"
else
ssh "$@"
fi
}
alias ssh='_ssh'
## FUNCTIONS

View File

@ -119,7 +119,7 @@ then
else
# Start regular SSH agent if not already started
SSH_ENV="$HOME/.ssh/environment"
SSH_ENV="$HOME/.ssh/agent"
start_agent() {
ssh-agent > "${SSH_ENV}"

View File

@ -13,6 +13,10 @@ set -g mouse off
# https://superuser.com/a/1007721
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
# Inform tmux that alacritty supports RGB
# (because for some reason terminfo doesn't?)
set -ga terminal-overrides ',alacritty*:RGB'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'