feat: symlink dotfiles
commit
c600f80335
|
@ -0,0 +1,5 @@
|
|||
After installation
|
||||
|
||||
- Set `gitconfig_work` to your work email address
|
||||
- Set up `.ssh/config` to use 1Password SSH Keys
|
||||
- Provide `authToken` for work npm registry in `.npmrc`
|
|
@ -0,0 +1,28 @@
|
|||
[user]
|
||||
name = James Spencer
|
||||
email = james@jmes.tech
|
||||
|
||||
[alias]
|
||||
yolo = "!f() { git add -A . && git commit -m $1 && git push -f origin main; }; f"
|
||||
|
||||
[apply]
|
||||
whitespace = nowarn
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
||||
[core]
|
||||
excludesFile = ~/.gitignore_global
|
||||
editor = code --wait
|
||||
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[gpg "ssh"]
|
||||
program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[includeIf "gitdir:~/work/"]
|
||||
path = ~/.gitconfig_work
|
|
@ -0,0 +1,3 @@
|
|||
[user]
|
||||
name = James Spencer
|
||||
email = work@company.com
|
|
@ -0,0 +1,2 @@
|
|||
.DS_Store
|
||||
.vscode
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
# Save the current working directory
|
||||
DIR=$(pwd)
|
||||
|
||||
# TODO: Pretty colours (from holman)
|
||||
|
||||
# Go to the home directory
|
||||
cd ~
|
||||
|
||||
# Begin Symlinks
|
||||
echo "Linking dotfiles..."
|
||||
|
||||
LINKS='zshrc
|
||||
gitconfig
|
||||
gitconfig_work
|
||||
gitignore_global
|
||||
npmrc'
|
||||
|
||||
echo
|
||||
for L in $LINKS; do
|
||||
# check if the LINK exists, back up the existing version
|
||||
if [[ -e ".$L" ]]; then
|
||||
echo "Backing up .$L"
|
||||
mv ".$L" ".$L.backup"
|
||||
fi
|
||||
|
||||
echo "Linking .$L"
|
||||
ln -s "$DIR/$L" ".$L"
|
||||
done
|
||||
echo
|
||||
|
||||
echo "Done linking dotfiles."
|
||||
# End Symlinks
|
|
@ -0,0 +1 @@
|
|||
//registry.npmjs.org/:_authToken={$insert_your_token_here}
|
|
@ -0,0 +1,27 @@
|
|||
export ZSH="$HOME/.oh-my-zsh"
|
||||
export EDITOR="code --wait"
|
||||
|
||||
ZSH_THEME="robbyrussell"
|
||||
|
||||
plugins=(git zsh-syntax-highlighting)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Begin Aliases
|
||||
alias gc="git commit"
|
||||
alias gfp="git fetch && git pull"
|
||||
alias mkdir = "mkdir -p"
|
||||
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias .3='cd ../../../'
|
||||
alias .4='cd ../../../../'
|
||||
alias .5='cd ../../../../..'
|
||||
alias .6='cd ../../../../../..'
|
||||
# End Aliases
|
||||
|
||||
autoload -U promptinit; promptinit
|
||||
prompt pure
|
||||
|
||||
export VOLTA_HOME="$HOME/.volta"
|
||||
export PATH="$VOLTA_HOME/bin:$PATH"
|
Loading…
Reference in New Issue