Add installalacritty script
This commit is contained in:
parent
0912c908b0
commit
679986a1af
|
@ -0,0 +1,38 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Clone or update alacritty to $HOME/dev/alacritty, build and install to $HOME/bin
|
||||||
|
# Note: run from ZSH in a different terminal emulator.
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if ! [ -x "$(command -v cargo)" ]; then
|
||||||
|
echo "Install Rust toolchain first"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p $HOME/dev $HOME/bin
|
||||||
|
destdir=$HOME/dev/alacritty
|
||||||
|
if [ -d $destdir ]; then
|
||||||
|
echo "Updating alacritty..."
|
||||||
|
cd $destdir
|
||||||
|
git pull --rebase
|
||||||
|
else
|
||||||
|
echo "Cloning alacritty..."
|
||||||
|
cd $HOME/dev
|
||||||
|
git clone -q https://github.com/alacritty/alacritty.git alacritty
|
||||||
|
fi
|
||||||
|
cd $destdir
|
||||||
|
echo "Building alacritty..."
|
||||||
|
cargo build --release
|
||||||
|
echo "Installing alacritty..."
|
||||||
|
cp $destdir/target/release/alacritty $HOME/bin/alacritty
|
||||||
|
|
||||||
|
if [ -z "$ZDOTDIR" ]; then
|
||||||
|
echo "WARNING: ZDOTDIR blank so not installing ZSH completions"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing ZSH completions..."
|
||||||
|
funcdir=$ZDOTDIR/functions
|
||||||
|
mkdir -p $funcdir
|
||||||
|
cp $destdir/extra/completions/_alacritty $funcdir/_alacritty
|
||||||
|
echo "Done"
|
|
@ -6,13 +6,15 @@ set -e
|
||||||
mkdir -p $HOME/dev
|
mkdir -p $HOME/dev
|
||||||
destdir=$HOME/dev/vim
|
destdir=$HOME/dev/vim
|
||||||
if [ -d $destdir ]; then
|
if [ -d $destdir ]; then
|
||||||
|
echo "Updating vim..."
|
||||||
cd $destdir
|
cd $destdir
|
||||||
git pull --rebase
|
git pull --rebase
|
||||||
else
|
else
|
||||||
|
echo "Cloning vim..."
|
||||||
cd $HOME/dev
|
cd $HOME/dev
|
||||||
git clone -q https://github.com/vim/vim.git vim
|
git clone -q https://github.com/vim/vim.git vim
|
||||||
fi
|
fi
|
||||||
cd $HOME/dev/vim
|
cd $destdir
|
||||||
./configure --prefix=$HOME/local --enable-rubyinterp --enable-luainterp --enable-python3interp --with-features=huge --enable-multibyte --enable-gui=gtk2 --with-x
|
./configure --prefix=$HOME/local --enable-rubyinterp --enable-luainterp --enable-python3interp --with-features=huge --enable-multibyte --enable-gui=gtk2 --with-x
|
||||||
make -j6
|
make -j6
|
||||||
make install
|
make install
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
installalacritty
|
2
zshrc
2
zshrc
|
@ -92,7 +92,7 @@ fi
|
||||||
setxkbmap -option caps:none
|
setxkbmap -option caps:none
|
||||||
|
|
||||||
# Set zshfunctions dir as per https://github.com/alacritty/alacritty/blob/master/INSTALL.md#shell-completions
|
# Set zshfunctions dir as per https://github.com/alacritty/alacritty/blob/master/INSTALL.md#shell-completions
|
||||||
fpath+=${ZDOTDIR:-~}/.zsh_functions
|
fpath+=${ZDOTDIR:-~}/functions
|
||||||
|
|
||||||
# fzf configuration
|
# fzf configuration
|
||||||
export KEYTIMEOUT=2
|
export KEYTIMEOUT=2
|
||||||
|
|
Loading…
Reference in New Issue