mirror of
https://github.com/tedkulp/dotfiles
synced 2026-03-05 13:40:18 -05:00
Merge branch 'master' of github.com:tedkulp/dotfiles
This commit is contained in:
@@ -2,24 +2,111 @@
|
||||
|
||||
cd $HOME
|
||||
|
||||
# What are we packing?
|
||||
system_type=$(uname -s)
|
||||
|
||||
# Install submodules
|
||||
echo "Init submodules"
|
||||
yadm submodule update --recursive --init
|
||||
|
||||
# Link in our tmux config
|
||||
if [ ! -f "$HOME/.tmux.conf" ]; then
|
||||
ln -s -f .tmux/.tmux.conf
|
||||
fi
|
||||
|
||||
# Create $GOHOME if necessary
|
||||
if [ ! -d "$HOME/go" ]; then
|
||||
mkdir $HOME/go
|
||||
fi
|
||||
|
||||
# Update our origin URL to the git version now that we have
|
||||
# our ssh config stuff downloaded
|
||||
echo "Updating the yadm repo origin URL"
|
||||
yadm remote set-url origin "git@github.com:tedkulp/dotfiles.git"
|
||||
|
||||
# Mac Specifics
|
||||
if [ "$system_type" = "Darwin" ]; then
|
||||
|
||||
# install homebrew if it's missing
|
||||
# Install Homebrew if it's missing
|
||||
if ! command -v brew >/dev/null 2>&1; then
|
||||
echo "Installing homebrew"
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
fi
|
||||
|
||||
# Install all the stuff in Brewfile (get comfortable... have some coffee or adult beverage)
|
||||
if [ -f "$HOME/.Brewfile" ]; then
|
||||
echo "Updating homebrew bundle"
|
||||
brew bundle --global
|
||||
fi
|
||||
fi
|
||||
|
||||
# Linux Specifics
|
||||
if [ "$system_type" = "Linux" ]; then
|
||||
|
||||
# Install apt stuff
|
||||
sudo apt update -y
|
||||
sudo apt upgrade -y
|
||||
sudo apt install -y zsh software-properties-common python-dev python3-dev python3-pip urlview
|
||||
|
||||
# Install node if necessary
|
||||
if ! command -v node >/dev/null 2>&1; then
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
||||
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" # This loads nvm
|
||||
nvm install node
|
||||
fi
|
||||
|
||||
# Install rust and cargo in necessary
|
||||
if ! command -v cargo >/dev/null 2>&1; then
|
||||
curl https://sh.rustup.rs -sSf > rustup-init.sh
|
||||
chmod 755 rustup-init.sh
|
||||
./rustup-init.sh -y
|
||||
rm rustup-init.sh
|
||||
fi
|
||||
|
||||
# Install neovim if necessary
|
||||
if ! command -v nvim >/dev/null 2>&1; then
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install neovim -y
|
||||
fi
|
||||
|
||||
# Install lunarvim
|
||||
if ! command -v lvim >/dev/null 2>&1; then
|
||||
. $HOME/.cargo/env
|
||||
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)
|
||||
$HOME/.local/bin/lvim +PackerSync
|
||||
fi
|
||||
|
||||
# Install fzf if necessary
|
||||
if ! command -v fzf >/dev/null 2>&1; then
|
||||
git clone --depth 1 https://github.com/junegunn/fzf.git $HOME/.fzf
|
||||
$HOME/.fzf/install --bin --no-key-bindings --no-completion --no-update-rc
|
||||
fi
|
||||
|
||||
# Install go if necessary
|
||||
if ! command -v go >/dev/null 2>&1; then
|
||||
curl -sLk https://git.io/gobrew | sh -
|
||||
export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH"
|
||||
export GOPATH="$HOME/.gobrew/current/go"
|
||||
gobrew use 1.17
|
||||
fi
|
||||
|
||||
# Install powerline-go if necessary
|
||||
if ! command -v powerline-go >/dev/null 2>&1; then
|
||||
go install github.com/justjanne/powerline-go@latest
|
||||
fi
|
||||
fi
|
||||
|
||||
# Oh My ZSH
|
||||
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
||||
echo "Installing oh-my-zsh. Install zsh as default, but then exit out to continue."
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
git clone https://github.com/agkozak/zsh-z $HOME/.config/zsh/plugins/zsh-z
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.config/zsh/plugins/zsh-syntax-highlighting
|
||||
yadm checkout $HOME/.zshrc # We want our version
|
||||
fi
|
||||
|
||||
# Wrapping up
|
||||
echo "Don't forget to run yadm decrypt!"
|
||||
exit 0
|
||||
|
||||
2
.config/zsh/autojump.zsh
Normal file
2
.config/zsh/autojump.zsh
Normal file
@@ -0,0 +1,2 @@
|
||||
[[ -s /home/ted/.autojump/etc/profile.d/autojump.sh ]] && source /home/ted/.autojump/etc/profile.d/autojump.sh
|
||||
autoload -U compinit && compinit -u
|
||||
13
.config/zsh/fzf.zsh
Normal file
13
.config/zsh/fzf.zsh
Normal file
@@ -0,0 +1,13 @@
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == *$HOME/.fzf/bin* ]]; then
|
||||
export PATH="${PATH:+${PATH}:}$HOME/.fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "$HOME/.fzf/shell/completion.zsh" 2> /dev/null
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "$HOME/.fzf/shell/key-bindings.zsh"
|
||||
2
.config/zsh/go.zsh
Normal file
2
.config/zsh/go.zsh
Normal file
@@ -0,0 +1,2 @@
|
||||
export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH"
|
||||
export GOPATH="$HOME/.gobrew/current/go"
|
||||
2
.config/zsh/nvm.zsh
Normal file
2
.config/zsh/nvm.zsh
Normal file
@@ -0,0 +1,2 @@
|
||||
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" # This loads nvm
|
||||
1
.config/zsh/rust.zsh
Normal file
1
.config/zsh/rust.zsh
Normal file
@@ -0,0 +1 @@
|
||||
. $HOME/.cargo/env
|
||||
10
.zshrc
10
.zshrc
@@ -10,8 +10,8 @@ export ZSH="$HOME/.oh-my-zsh"
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||
# ZSH_THEME="robbyrussell"
|
||||
ZSH_THEME="cobalt2"
|
||||
ZSH_THEME="robbyrussell"
|
||||
# ZSH_THEME="cobalt2"
|
||||
|
||||
# Set list of themes to pick from when loading at random
|
||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||
@@ -73,7 +73,7 @@ fi
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(vi-mode git autojump fzf aws vscode zsh-syntax-highlighting sudo dash zsh-z)
|
||||
plugins=(vi-mode git fzf aws vscode sudo dash zsh-z zsh-syntax-highlighting)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
@@ -108,3 +108,7 @@ source $ZSH/oh-my-zsh.sh
|
||||
# [ -f ~/.config/tabtab/__tabtab.fish ]; and . ~/.config/tabtab/__tabtab.fish; or true
|
||||
|
||||
# source <("/usr/local/bin/starship" init zsh --print-full-init)
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user