From 65c11c94b2e21138397730643ebefed960065c01 Mon Sep 17 00:00:00 2001 From: "John F. Mercer" Date: Fri, 20 Oct 2023 21:53:13 -0400 Subject: [PATCH] minor tweaks --- .../run_onchange_before_10_installs.sh.tmpl | 20 +++++++++++++++++-- zsh/exports.zsh | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.chezmoiscripts/linux/run_onchange_before_10_installs.sh.tmpl b/.chezmoiscripts/linux/run_onchange_before_10_installs.sh.tmpl index 3f5bdda..202cb0b 100644 --- a/.chezmoiscripts/linux/run_onchange_before_10_installs.sh.tmpl +++ b/.chezmoiscripts/linux/run_onchange_before_10_installs.sh.tmpl @@ -56,9 +56,13 @@ source "$HOME/.cargo/env" # install delta cargo install git-delta -# # install lazygit +# install lazygit LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') -curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" +if [[ $(arch) == "x86_64" ]]; then + curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" +else + curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_arm64.tar.gz" +fi tar xf lazygit.tar.gz lazygit sudo install lazygit /usr/local/bin rm -rf "$HOME"/lazygit* @@ -70,4 +74,16 @@ sudo apt -y install expect {{ end }} +# Remove packages +packages=("nano") + +for pkg in "${packages[@]}"; do + # Check if package is installed + if command -v "$pkg" >/dev/null 2>&1; then + echo "$pkg is installed. Removing it now." + sudo apt remove -y "$pkg" + fi +done + + {{- end -}} diff --git a/zsh/exports.zsh b/zsh/exports.zsh index 9e230af..a2903e3 100644 --- a/zsh/exports.zsh +++ b/zsh/exports.zsh @@ -1,4 +1,5 @@ -export EDITOR="vim" +export VISUAL="vim" +export EDITOR="$VISUAL" export SHELL=$(which zsh) export ANSIBLE_NOCOWS=1 export TERM="xterm-256color"