bash sensible

This commit is contained in:
Stefen Auris 2021-07-08 18:07:50 -04:00
parent 0abd078269
commit 3349bd567a
3 changed files with 51 additions and 5 deletions

10
bash.sh Executable file
View file

@ -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

35
bash/.bash_aliases Normal file
View file

@ -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`"

11
init.sh
View file

@ -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