Merge branch 'main' of https://github.com/jim-fx/.dotfiles into main
This commit is contained in:
commit
d380ebc6b4
@ -111,11 +111,3 @@ if ! shopt -oq posix; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
alias vim='nvim'
|
||||
|
||||
[[ -s "/home/jim/.gvm/scripts/gvm" ]] && source "/home/jim/.gvm/scripts/gvm"
|
||||
|
@ -26,6 +26,7 @@ source $HOME/.dotfiles/configs/zsh/aliases.sh
|
||||
## LOADING PROGRAMS
|
||||
export PATH="$PATH:$HOME/.yarn/bin"
|
||||
export PATH="$PATH:$HOME/.local/bin"
|
||||
export PATH="$PATH:$HOME/bin"
|
||||
|
||||
## GO STUFF
|
||||
export GOROOT="/usr/local/bin/go"
|
||||
@ -40,7 +41,6 @@ if [ -s "$HOME/.pyenv" ]; then
|
||||
eval "$(pyenv init -)"
|
||||
fi
|
||||
|
||||
|
||||
#Java version manager
|
||||
export SDKMAN_DIR="$HOME/.sdkman"
|
||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
@ -55,5 +55,8 @@ export SDKMAN_DIR="$HOME/.sdkman"
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.dotfiles/configs/.p10k.zsh.
|
||||
[[ ! -f ~/.dotfiles/configs/.p10k.zsh ]] || source ~/.dotfiles/configs/.p10k.zsh
|
||||
# The next line updates PATH for the Google Cloud SDK.
|
||||
if [ -f '/home/coder/downloads/google-cloud-sdk/path.zsh.inc' ]; then . '/home/coder/downloads/google-cloud-sdk/path.zsh.inc'; fi
|
||||
|
||||
# The next line enables shell command completion for gcloud.
|
||||
if [ -f '/home/coder/downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/coder/downloads/google-cloud-sdk/completion.zsh.inc'; fi
|
||||
|
@ -3,3 +3,4 @@ source $(dirname "$0")/functions/fx.zsh;
|
||||
source $(dirname "$0")/functions/start.zsh;
|
||||
source $(dirname "$0")/functions/wp.zsh;
|
||||
source $(dirname "$0")/functions/y.zsh;
|
||||
source $(dirname "$0")/functions/fp.zsh;
|
29
configs/zsh/functions/fp.zsh
Normal file
29
configs/zsh/functions/fp.zsh
Normal file
@ -0,0 +1,29 @@
|
||||
#Helps stop processes which use ports
|
||||
|
||||
function fp(){
|
||||
|
||||
PORT=$1;
|
||||
|
||||
if [ "$(which lsof)" = "lsof not found" ]; then
|
||||
echo "lsof not installed"
|
||||
else
|
||||
PIDS="$(lsof -t -i:$PORT)"
|
||||
|
||||
AMOUNT=$(wc -w<<<$PIDS);
|
||||
|
||||
if [ $AMOUNT = 0 ]; then
|
||||
|
||||
echo "No processes use port $PORT";
|
||||
|
||||
else
|
||||
|
||||
echo "Killing $AMOUNT process(es) using port $PORT";
|
||||
|
||||
echo "$PIDS" | while IFS= read -r pid ; do
|
||||
kill -9 $pid;
|
||||
done
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
11
setup.sh
11
setup.sh
@ -9,10 +9,14 @@ cd "$(dirname "$0")"
|
||||
echo "-- welcome to my setup script --"
|
||||
echo "-- installing prerequesits (git, curl) --"
|
||||
|
||||
INTERACTIVE=$(tty -s && echo "true" || echo "false")
|
||||
|
||||
if [ $INTERACTIVE = "true" ]; then
|
||||
if [ "$(prompt " - do you want to continue")" != "yes" ]; then
|
||||
echo " alllrighty then, byyye"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
@ -32,7 +36,10 @@ OPTIONS_LABELS=("zsh + oh-my-zsh" "Neovim" "Direnv" "Go Version Manager" "Node V
|
||||
for i in "${!OPTIONS_VALUES[@]}"; do
|
||||
OPTIONS_STRING+="${OPTIONS_VALUES[$i]} (${OPTIONS_LABELS[$i]});"
|
||||
done
|
||||
|
||||
if [ $INTERACTIVE = "true" ]; then
|
||||
multiselect SELECTED "$OPTIONS_STRING"
|
||||
fi
|
||||
|
||||
# Variables
|
||||
INST_ZSH=${SELECTED[0]}
|
||||
@ -42,6 +49,10 @@ INST_GVM=${SELECTED[3]}
|
||||
INST_NVM=${SELECTED[4]}
|
||||
INST_SDKM=${SELECTED[5]}
|
||||
|
||||
if [ $INTERACTIVE = "false" ]; then
|
||||
INST_ZSH=true
|
||||
fi
|
||||
|
||||
echo "-----------------------------------"
|
||||
|
||||
echo -e "-- installing programs --"
|
||||
|
Loading…
Reference in New Issue
Block a user