diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 13c6970..2e2f8e3 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -4,7 +4,7 @@ # terminal emulator super + Return - xfce4-terminal + alacritty # web browser (firefox) super + alt + b diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4e5f6c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ \ No newline at end of file diff --git a/.zshrc b/.zshrc index e2ca723..9554e4c 100644 --- a/.zshrc +++ b/.zshrc @@ -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 diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..7636a21 --- /dev/null +++ b/install.sh @@ -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!" diff --git a/scripts/shell/aliases.sh b/scripts/shell/aliases.sh index b6073f9..b15139f 100644 --- a/scripts/shell/aliases.sh +++ b/scripts/shell/aliases.sh @@ -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'