Configure WezTerm (and fix color issues with tmux)

This commit is contained in:
Peter Cai 2022-08-15 18:01:37 -04:00
parent 29a8c73a7c
commit ed3fe5cce1
3 changed files with 11 additions and 7 deletions

View File

@ -9,14 +9,10 @@ alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
# Execute tmux in Alacritty
if [ "$TERM" == "alacritty" ]; then
if [[ "$TERM" == "alacritty" || "$TERM_PROGRAM" == "WezTerm" ]]; then
exec tmux
fi
# Set TERM to screen-256color inside tmux
# (Needs tmux.conf changes)
[[ $TMUX != "" ]] && export TERM="screen-256color"
# SSH without checking or adding host keys to known_hosts
# Useful for cloud server rescue environment & installation
alias sshtmp="ssh -o 'UserKnownHostsFile /dev/null' -o 'StrictHostKeyChecking no'"

View File

@ -1,5 +1,6 @@
# Pretend to be screen-256color
set-option -g default-terminal "screen-256color"
# Force 256color terminal (with true color capabilities)
set-option -g default-terminal "tmux-256color"
set -as terminal-features ",xterm-256color:RGB"
# Allow mouse input (to switch window / panes)
set -g mouse on

View File

@ -0,0 +1,7 @@
local wezterm = require("wezterm")
return {
color_scheme = "Gruvbox Dark",
font = wezterm.font("FiraCode Nerd Font Mono"),
font_size = 10.5,
enable_tab_bar = false, -- I use tmux
}