Browse Source

Better RGB support

master
Geoffrey Frogeye 5 months ago
parent
commit
c2d3ccb779
Signed by: geoffrey GPG Key ID: C72403E7F82E6AD8
  1. 4
      config/alacritty/alacritty.yml.j2
  2. 13
      config/scripts/bsh
  3. 12
      config/shell/commonrc
  4. 2
      config/shell/shenv
  5. 4
      config/tmux/tmux.conf

4
config/alacritty/alacritty.yml.j2

@ -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)

13
config/scripts/bsh

@ -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")"

12
config/shell/commonrc

@ -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

2
config/shell/shenv

@ -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}"

4
config/tmux/tmux.conf

@ -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'

Loading…
Cancel
Save