Files
dotfiles/.termrc

52 lines
1.3 KiB
Plaintext

# Load personal aliases
source "$HOME/.aliases"
# Load tmux aliases if found
if [ -e $HOME/.tmux/.tmux-aliases ] ; then
source $HOME/.tmux/.tmux-aliases
fi
# Fix linker errors with gtk3 -- removed since I nuked gtk-nocsd
#export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0
echo -e '\e[34m [termrc] Config reloaded\e[0m'
# Add Rust crates to path
#export PATH=$PATH:$HOME/.cargo/bin
# Usual env vars
export EDITOR=/usr/bin/vim
export LANG="en_US.UTF-8"
export LANGUAGE="en_US.UTF-8"
# Decompress raw zlib files (.dat)
zlibd() (printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" | cat - "$@" | gzip -dc)
# Run WSL-specific inits
if [ -n "$WSLENV" ] ; then
printf '\e[34m [termrc] Running on WSL\e[0m\n'
# Load SSH keychain
/usr/bin/keychain -q --nogui $HOME/.ssh/id_rsa
source "$HOME/.keychain/$HOST-sh"
# Enable entr workaround for incomplete inotify support on WSL
export ENTR_INOTIFY_WORKAROUND=1
# Connect serial console port if found
if [ -z "$_SERIAL_INIT" ] ; then
source "$HOME/.usbipd"
echo "Connecting serial port... (device $USB_SERIAL_HWID)"
usbipd.exe wsl attach --hardware-id $USB_SERIAL_HWID
if [ $? -eq 0 ]; then
echo "Serial port connected"
usbipd.exe wsl list
export _SERIAL_INIT=1
else
echo "Unable to connect serial port (device $USB_SERIAL_HWID)"
fi
fi
fi