Compare commits

...

7 Commits

10 changed files with 41 additions and 21 deletions

View File

@@ -18,6 +18,9 @@ export XDG_RUNTIME_DIR="$HOME/.local/run"
# Paths
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$HOME/.local/go/bin:$XDG_DATA_HOME/cargo/bin:$PATH"
source "$DOTFILES/config/exports"
source "$DOTFILES/config/functions"
source "$DOTFILES/config/alias"
x-load-configs
# shellcheck source=../config/fzf/fzf.bash
@@ -32,4 +35,4 @@ x-have rbenv && {
}
eval "$(starship init bash)"
source $DOTFILES/config/alias
source "$DOTFILES/config/alias"

View File

@@ -101,4 +101,4 @@ TMUX_WINDOW_NAME_PLUGIN="$DOTFILES/config/tmux/plugins/tmux-window-name/scripts/
}
eval "$(starship init zsh)"
source $DOTFILES/config/alias
source "$DOTFILES/config/alias"

View File

@@ -2,9 +2,6 @@
# shellcheck source="../scripts/shared.sh"
# shellcheck disable=1091,2139
# Be nice
alias please="sudo "
# Color the grep output
alias grep="grep --color"
@@ -32,7 +29,7 @@ alias sl="ls"
alias lsd="ls -lF | grep '^d'"
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias x-ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'"
@@ -49,9 +46,6 @@ alias flush="dscacheutil -flushcache"
# Update locatedb
alias updatedb="sudo /usr/libexec/locate.updatedb"
# Always return full history
alias history="history 1"
# tmux: automatically attach or create session with name 'main'
alias tmux='tmux new-session -A -s main'
# tmux: attach or create new session
@@ -134,12 +128,6 @@ ssh-docker()
docker exec -it "$@" bash
}
# All the dig info
digga()
{
dig +nocmd "$1" any +multiline +noall +answer
}
# Rector project to php version 8.2 by default.
rector()
{

View File

@@ -7,6 +7,7 @@
# Antigen configuration
# https://github.com/zsh-users/antigen/wiki/Configuration
export ADOTDIR="$XDG_DATA_HOME/antigen"
export ANTIGEN_CACHE="$XDG_CACHE_HOME/antigen"
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env bash
#
# shell functions
set -euo pipefail

View File

@@ -19,6 +19,9 @@ VERSION_NVM="v0.39.5"
export DOTFILES="$HOME/.dotfiles"
# shellcheck source=./../../scripts/shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
source "$DOTFILES/config/exports"
source "$DOTFILES/config/alias"
source "$DOTFILES/config/functions"
# Loads configs for better installation experience
x-load-configs
@@ -152,6 +155,8 @@ function section_install
nvm)
msg "Installing nvm..."
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash
git checkout "$DOTFILES/base/zshrc"
git checkout "$DOTFILES/base/bashrc"
$0 install nvm-latest
msg_yay "nvm installed!"
;;
@@ -161,7 +166,8 @@ function section_install
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
fi
nvm install --lts --latest-npm --default
git checkout "$DOTFILES/base/*"
git checkout "$DOTFILES/base/zshrc"
git checkout "$DOTFILES/base/bashrc"
msg_yay "latest lts node installed!"
;;
npm)

View File

@@ -2,18 +2,29 @@
# Install cargo/rust packages.
#
# shellcheck source=shared.sh
source "$HOME/.dotfiles/config/exports"
source "$HOME/.dotfiles/config/alias"
source "$HOME/.dotfiles/config/functions"
source "$HOME/.dotfiles/scripts/shared.sh"
msg "Starting to install rust/cargo packages"
! x-have cargo && {
msg "cargo could not be found. installing cargo with rustup.rs"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y
}
source "$CARGO_HOME/env"
! x-have rustup && {
msg_err "rustup could not be found. Aborting..."
exit 1
}
rustup default system
packages=(
"cargo-cache"
# starship.rs
"starship"
# An incremental parsing system for programming tools
@@ -58,4 +69,5 @@ x-have bob && {
bob use stable && x-path-append "$XDG_DATA_HOME/bob/nvim-bin"
}
msg_done "All next steps done!"
msg_run "Removing cargo cache"
cargo cache --autoclean

View File

@@ -24,10 +24,13 @@ else
# Update the repo
msg_run "Starting to update $TLDR_GIT"
git -C "$TLDR_TEMP_DIR" reset --hard origin/main
git -C "$TLDR_TEMP_DIR" pull -q \
git -C "$TLDR_TEMP_DIR" pull -q --depth 2 \
&& msg_done "Updated $TLDR_GIT"
fi
msg_run "Removing non-english translation files"
rm -rf "$TLDR_TEMP_DIR/pages.*"
# Fetch the destination directory from cheat defined directories.
TLDR_CHEAT_DEST="$(cheat -d | grep tldr | head -1 | awk '{print $2}')"

View File

@@ -50,4 +50,8 @@ x-have git-profile && {
}
echo ""
msg_run "Clearing go cache"
go clean -cache -modcache
msg_ok "Done"

View File

@@ -37,3 +37,8 @@ done
msg_run "Upgrading all global packages"
npm -g --no-progress --no-timing --no-fund outdated
npm -g --no-timing --no-fund upgrade
msg_run "Cleaning up npm cache"
npm cache verify
npm cache clean --force
npm cache verify