diff --git a/config/alacritty/alacritty.yml.j2 b/config/alacritty/alacritty.yml.j2 index c40e2ce..6f9cea6 100644 --- a/config/alacritty/alacritty.yml.j2 +++ b/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) diff --git a/config/scripts/bsh b/config/scripts/bsh index 875429e..306e6a6 100755 --- a/config/scripts/bsh +++ b/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")" diff --git a/config/shell/commonrc b/config/shell/commonrc index 87f1762..a0bf99e 100644 --- a/config/shell/commonrc +++ b/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 diff --git a/config/shell/shenv b/config/shell/shenv index 0ee3fc0..d28d5f0 100644 --- a/config/shell/shenv +++ b/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}" diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index 1eb28a4..bca3ae4 100644 --- a/config/tmux/tmux.conf +++ b/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'