Merge branch 'master' of git.axenov.dev:anthony/my-env

This commit is contained in:
2024-11-22 14:38:43 +08:00
9 changed files with 230 additions and 14 deletions

64
install/lazynvim Executable file
View File

@@ -0,0 +1,64 @@
#!/bin/bash
# https://www.devas.life/effective-neovim-setup-for-web-development-towards-2024/
set -eo pipefail
trap ontrap SIGINT SIGTERM SIGSTOP
ontrap() {
echo
echo "[!] Interrupted"
exit
}
[ -z "$1" ] && version=0.10.1 || version="$1"
filedir="$HOME/install/neovim-$version"
filename="nvim-linux64.tar.gz"
filepath="$filedir/$filename"
configdir="$HOME/.config/nvim"
localdir="$HOME/.local"
echo "[*] Installing neovim v$version"
if [ -d $configdir ]; then
mv $configdir "$configdir.bak-$(date +'%Y%m%d_%H%M%S')"
fi
mkdir -p $filedir $configdir $localdir/{bin,lib,share}
if [ ! -f $filepath ]; then
echo "[*] Downloading to $filepath..."
wget -q https://github.com/neovim/neovim/releases/download/v$version/nvim-linux64.tar.gz \
-O $filepath \
--show-progress
fi
echo "[*] Unpacking: $filepath..."
tar -zxf $filepath -C $filedir
cp -rf $filedir/nvim-linux64/bin/nvim $localdir/bin/
cp -rf $filedir/nvim-linux64/lib/nvim $localdir/lib/
cp -rf $filedir/nvim-linux64/share $localdir/share
rm -rf $filedir/nvim-linux64
echo "[*] Reinit git repo..."
git clone https://github.com/LazyVim/starter \
$configdir \
--depth=1 \
--single-branch
cd $configdir
rm -rf .git
git init -q

View File

@@ -26,8 +26,8 @@ fi
# snapi gtk2-common-themes
snapi peek
snapi telegram-desktop
snapi code
# snapi telegram-desktop #todo
# snapi code # deb https://github.com/microsoft/vscode/issues/221836
snapi skype
snapi dbeaver-ce
# snapi mysql-workbench-community

18
install/vscode Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
##makedesc: VSCode deb-package
source `dirname $0`/../helpers || exit 255
title
mkdir -p "$HOME/install"
download "https://code.visualstudio.com/docs/?dv=linux64_deb" \
"$HOME/install/vscode.deb" && \
sudo dpkg -i "$HOME/install/vscode.deb"
[ $? = 0 ] && {
echo
success "VSCode installed"
vscode --version
echo
}