Compare commits
6 Commits
298b7fd400
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
731b3a6efe
|
|||
| dff6d5ea31 | |||
| 22c132cc57 | |||
| 46da64f7ed | |||
| 76aaedc3f9 | |||
| 33871aa910 |
@@ -5,8 +5,15 @@
|
|||||||
required = true
|
required = true
|
||||||
[user]
|
[user]
|
||||||
name = Stephen Parkinson
|
name = Stephen Parkinson
|
||||||
email = smp827@gmail.com
|
email = stephen@smpark.in
|
||||||
|
signingkey = ~/.ssh/id_ed25519.pub
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
[pull]
|
[pull]
|
||||||
rebase = false
|
rebase = false
|
||||||
|
[gpg]
|
||||||
|
format = ssh
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
|
[tag]
|
||||||
|
gpgsign = true
|
||||||
|
|||||||
60
setup.sh
60
setup.sh
@@ -1,44 +1,38 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
OSTYPE=$(uname -s)
|
echo "Install Homebrew? [y/n]"
|
||||||
|
read homebrew
|
||||||
if [ "$OSTYPE" = "Linux" ]; then
|
if [ "$homebrew" = "y" ]; then
|
||||||
echo "Package manager: "
|
|
||||||
read packm
|
|
||||||
if [ "$packm" = "apt" ]; then
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install coreutils vim zsh jq python3 -y
|
|
||||||
sudo apt upgrade -y
|
|
||||||
elif [ "$packm" = "yum" ]; then
|
|
||||||
sudo yum update
|
|
||||||
sudo yum install coreutils vim zsh jq python3 -y
|
|
||||||
elif [ "$packm" = "pacman" ]; then
|
|
||||||
sudo pacman -Syu
|
|
||||||
sudo pacman -Sy coreutils vim zsh jq python3
|
|
||||||
else
|
|
||||||
echo "Unknown package manager, continuing..."
|
|
||||||
fi
|
|
||||||
elif [ "$OSTYPE" = "Darwin" ]; then
|
|
||||||
mkdir ~/Developer
|
|
||||||
echo "Install Homebrew? [y/n]"
|
|
||||||
read homebrew
|
|
||||||
if [ "$homebrew" = "y" ]; then
|
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
echo "Restore from Brewfile? [y/n]"
|
echo "Restore from Brewfile? [y/n]"
|
||||||
read bundle
|
read bundle
|
||||||
if [ "$bundle" = "y" ]; then
|
if [ "$bundle" = "y" ]; then
|
||||||
brew bundle install --file=
|
echo "Available Brewfiles:"
|
||||||
|
ls ~/dotfiles/brew/
|
||||||
|
echo "Brewfile name: "
|
||||||
|
read brewfile
|
||||||
|
brew bundle install --file=~/dotfiles/brew/"$brewfile"
|
||||||
else
|
else
|
||||||
brew install coreutils fastfetch vim zsh jq python3 zsh-autosuggestions zsh-syntax-highlighting
|
brew install coreutils fastfetch vim zsh jq python3
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clone zsh plugins
|
||||||
|
PLUGIN_DIR="$HOME/.zsh/plugins"
|
||||||
|
mkdir -p "$PLUGIN_DIR"
|
||||||
|
if [ ! -d "$PLUGIN_DIR/zsh-autosuggestions" ]; then
|
||||||
|
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions "$PLUGIN_DIR/zsh-autosuggestions"
|
||||||
|
fi
|
||||||
|
if [ ! -d "$PLUGIN_DIR/zsh-syntax-highlighting" ]; then
|
||||||
|
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting "$PLUGIN_DIR/zsh-syntax-highlighting"
|
||||||
|
fi
|
||||||
|
|
||||||
# silence login message
|
# silence login message
|
||||||
touch ~/.hushlogin
|
touch ~/.hushlogin
|
||||||
|
|
||||||
# remove common files and symlink new files
|
# remove common files and symlink new files
|
||||||
rm -r ~/.zshrc ~/.vimrc ~/.tmux.conf ~/.zsh.d ~/.gitconfig ~/.gitignore_global
|
rm -f ~/.zshrc ~/.vimrc ~/.tmux.conf ~/.gitconfig ~/.gitignore_global
|
||||||
|
rm -rf ~/.zsh.d
|
||||||
mkdir ~/.zsh.d
|
mkdir ~/.zsh.d
|
||||||
ln -s ~/dotfiles/zsh/aliases ~/.zsh.d/aliases
|
ln -s ~/dotfiles/zsh/aliases ~/.zsh.d/aliases
|
||||||
ln -s ~/dotfiles/zsh/functions ~/.zsh.d/functions
|
ln -s ~/dotfiles/zsh/functions ~/.zsh.d/functions
|
||||||
@@ -49,9 +43,13 @@ ln -s ~/dotfiles/git/gitignore_global ~/.gitignore_global
|
|||||||
ln -s ~/dotfiles/tmux/tmux.conf ~/.tmux.conf
|
ln -s ~/dotfiles/tmux/tmux.conf ~/.tmux.conf
|
||||||
ln -s ~/dotfiles/vim/vimrc ~/.vimrc
|
ln -s ~/dotfiles/vim/vimrc ~/.vimrc
|
||||||
|
|
||||||
echo "Change shell to zsh? [y/n]"
|
mkdir -p ~/Developer
|
||||||
read shell
|
|
||||||
if [ "$shell" = "y" ]; then
|
if command -v chsh &>/dev/null && command -v zsh &>/dev/null; then
|
||||||
chsh -s /bin/zsh
|
echo "Change shell to zsh? [y/n]"
|
||||||
|
read shell
|
||||||
|
if [ "$shell" = "y" ]; then
|
||||||
|
chsh -s "$(command -v zsh)"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
# Git
|
|
||||||
alias gcl='git clone'
|
|
||||||
alias gp='git push'
|
|
||||||
alias gs='git status'
|
|
||||||
|
|
||||||
# ls
|
# ls
|
||||||
alias ll='ls -lah'
|
alias ll='ls -lah'
|
||||||
alias l='ls -CF'
|
alias l='ls -CF'
|
||||||
|
|||||||
23
zsh/zshrc
23
zsh/zshrc
@@ -60,16 +60,19 @@ fi
|
|||||||
|
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
# set up iterm integration
|
# set up iterm integration
|
||||||
source ~/.iterm2_shell_integration.zsh
|
[[ -f ~/.iterm2_shell_integration.zsh ]] && source ~/.iterm2_shell_integration.zsh
|
||||||
# source homebrew
|
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
||||||
# plugins
|
|
||||||
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
||||||
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Added by LM Studio CLI (lms)
|
# Homebrew (macOS: /opt/homebrew, Linux: /home/linuxbrew/.linuxbrew)
|
||||||
export PATH="$PATH:/Users/smparkin/.cache/lm-studio/bin"
|
if [[ -x /opt/homebrew/bin/brew ]]; then
|
||||||
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
|
elif [[ -x /home/linuxbrew/.linuxbrew/bin/brew ]]; then
|
||||||
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
|
fi
|
||||||
|
|
||||||
# Created by `pipx` on 2025-02-08 01:15:05
|
# Plugins (cloned into ~/.zsh/plugins by setup.sh)
|
||||||
export PATH="$PATH:/Users/smparkin/.local/bin"
|
PLUGIN_DIR="$HOME/.zsh/plugins"
|
||||||
|
[[ -f "$PLUGIN_DIR/zsh-autosuggestions/zsh-autosuggestions.zsh" ]] && \
|
||||||
|
source "$PLUGIN_DIR/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||||
|
[[ -f "$PLUGIN_DIR/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]] && \
|
||||||
|
source "$PLUGIN_DIR/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||||
|
|||||||
Reference in New Issue
Block a user