From 3349bd567a9fe27792ee0196024a7b80c41e0f24 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 8 Jul 2021 18:07:50 -0400 Subject: [PATCH] bash sensible --- bash.sh | 10 ++++++++++ bash/.bash_aliases | 35 +++++++++++++++++++++++++++++++++++ init.sh | 11 ++++++----- 3 files changed, 51 insertions(+), 5 deletions(-) create mode 100755 bash.sh create mode 100644 bash/.bash_aliases diff --git a/bash.sh b/bash.sh new file mode 100755 index 0000000..d5385d0 --- /dev/null +++ b/bash.sh @@ -0,0 +1,10 @@ +#!/bin/bash +#download sensible bash if it doesnt exist +if [ ! -f ~/.sensible.bash ]; then + wget -O "$HOME/.sensible.bash" https://raw.githubusercontent.com/mrzool/bash-sensible/master/sensible.bash +fi + +#inject source line into bashrc +if ! grep -q ".sensible.bash" "$HOME/.bashrc"; then + echo "source \"\$HOME/.sensible.bash\"" >> "$HOME/.bashrc" +fi diff --git a/bash/.bash_aliases b/bash/.bash_aliases new file mode 100644 index 0000000..1d3a100 --- /dev/null +++ b/bash/.bash_aliases @@ -0,0 +1,35 @@ +#Readability aliases +if which exa > /dev/null; then + alias lss='exa -alh' +else + alias lss='ls -alh --color=auto' +fi +alias mount='mount |column -t' +alias df='df -H -x squashfs -x tmpfs -x devtmpfs' +alias bat=batcat +alias ncdu='ncdu --color dark' + +#Shell Function aliases +alias dirs="dirs -v" +alias h='history' +alias jb='jobs -l' +alias reload=". ~/.bashrc" + +#shortcuts aliases +alias please="sudo !!" +alias ping='ping -c 5' +alias ax="chmod a+x" +alias wmip="curl icanhazip.com" + +#git aliases +alias gitS='git status' +alias gitL='git log' +alias gitD='git diff' +alias gitC='git commit -a' + +#Apt aliases +alias aptup="sudo apt update && sudo apt full-upgrade" +alias aptrm="sudo apt autoremove && sudo apt autoclean" + +#ssh aliases +alias sagent="eval `ssh-agent`" diff --git a/init.sh b/init.sh index 43b0d08..72c6e92 100755 --- a/init.sh +++ b/init.sh @@ -10,16 +10,17 @@ else exit 1 fi -#setup prezto +#setup shell +bash bash.sh echo "Select which shell to configure and use: zsh/fish/bash"; read -r answer if [[ $answer = "zsh" ]] || [[ $answer = "z" ]]; then echo "Initializing Prezto" zsh prezto.zsh - chsh -s /bin/zsh + chsh -s /usr/bin/zsh elif [[ $answer = "fish" ]] || [[ $answer = "f" ]]; then echo "Installing Oh-My-Fish" bash fish.sh - chsh -s /bin/fish + chsh -s /usr/bin/fish else echo "Guess we're sticking with default bash then..." fi @@ -27,10 +28,10 @@ fi #create symlinks using stow mkdir ~/.ssh echo "Stowing Configs" +stow bash stow tmux -#Add Tmux themes +#init TMP git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm - git clone https://github.com/wfxr/tmux-power.git "$HOME/stevset/tmux/t-theme" stow vim stow prezto stow config