Minor updates; add install.sh which already feels bloated

This commit is contained in:
Tommy Harris 2020-12-18 09:51:56 -07:00
parent 4875882d04
commit f6a9929f44
Signed by: tobraha
GPG Key ID: 93769A4F97AE33E9
5 changed files with 77 additions and 3 deletions

View File

@ -4,7 +4,7 @@
# terminal emulator
super + Return
xfce4-terminal
alacritty
# web browser (firefox)
super + alt + b

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*~

3
.zshrc
View File

@ -99,9 +99,10 @@ source $ZSH/oh-my-zsh.sh
# alias ohmyzsh="mate ~/.oh-my-zsh"
# load aliases, functions, exports
source $HOME/scripts/shell/exports.sh 2>/dev/null
source $HOME/scripts/shell/aliases.sh 2>/dev/null
source $HOME/scripts/shell/functions.sh 2>/dev/null
source $HOME/scripts/shell/exports.sh 2>/dev/null
# Load zsh-syntax-highlighting; should be last
source $ZSH/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null

69
install.sh Executable file
View File

@ -0,0 +1,69 @@
#!/bin/bash
# emacs/spacemacs
echo "Setting up emacs/spacemacs..."
# only create the link if it either doesn't exist or is not a link
if ! [[ -e ~/.spacemacs ]] || ! [[ -L ~/.spacemacs ]]; then
echo " --> linking .spacemacs to home"
ln -sf $PWD/.spacemacs ~/.spacemacs
else
echo " --> .spacemacs is already linked!"
fi
echo " --> setting up spacemacs folder (.emacs.d)"
if ! [[ -d $HOME/.emacs.d ]] ; then
printf "\nNo .emacs.d folder found - downloading spacemacs...\n"
git clone https://github.com/syl20bnr/spacemacs $HOME/.emacs.d
elif [[ -d ~/.emacs.d ]] && ! [[ -e ~/.emacs.d/spacemacs.mk ]] ; then
printf "\n.emacs.d present, but not spacemacs. Let's get it.\n\n"
echo " --> renaming .emacs.d to .emacs.d.old"
mv ~/.emacs.d ~/.emacs.d.OLD
git clone https://github.com/syl20bnr/spacemacs $HOME/.emacs.d
else
echo "Spacemacs already present! Skipping download."
fi
# zsh
echo ; echo "Setting up zsh"
# only create the link if it either doesn't exist or is not a link
if ! [[ -e ~/.zshrc ]] || ! [[ -L ~/.zshrc ]]; then
echo " --> backing up and linking .zshrc to home"
cp ~/.zshrc ~/.zshrc.bak 2>/dev/null
ln -sf $PWD/.zshrc ~/.zshrc
else
echo " --> .zshrc is already linked!"
fi
echo " --> setting up plugins and linked files..."
echo " --> setting up oh-my-zsh"
if ! [[ -d ~/.oh-my-zsh ]]; then
echo " --> no oh-my-zsh - cloning..."
git clone https://github.com/ohmyzsh/ohmyzsh ~/.oh-my-zsh
else
echo " --> oh-my-zsh folder already exists"
fi
echo " --> setting up zsh-syntax-highlighting..."
if ! [[ -d ~/.oh-my-zsh/plugins/zsh-syntax-highlighting ]]; then
echo " --> cloning zsh-syntax-highlighting..."
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
else
echo " --> zsh-syntax-highlighting already installed!"
fi
echo "Adding functions, aliases, and exports..."
echo " --> creating ~/scripts/shell"
mkdir -p ~/scripts/shell
echo " --> linking files..."
ln -sf $PWD/scripts/shell/aliases.sh ~/scripts/shell/aliases.sh
ln -sf $PWD/scripts/shell/functions.sh ~/scripts/shell/functions.sh
ln -sf $PWD/scripts/shell/exports.sh ~/scripts/shell/exports.sh
echo "Sourcing ~/.zshrc"
source ~/.zshrc
echo ; echo "Done!"

View File

@ -7,7 +7,10 @@ alias se="sudo -e"
alias readme='pandoc README.md | lynx -stdin'
alias bd='base64 -d'
alias em='emacs -nw'
alias ogh="$BROWSER https://github.com/tobraha"
alias ogh="$BROWSER -P Ambitions https://github.com/tobraha &"
alias ffa="$BROWSER -P Ambitions & "
alias ffc="$BROWSER -P Charles-IT & "
alias fft="$BROWSER -P Tommy & "
alias datto='ssh partner@partner-ssh.datto.com'
alias bpytop='git -C $HOME/repo/bpytop pull --rebase > /dev/null 2>&1 ; $HOME/repo/bpytop/bpytop.py'