bash sensible
This commit is contained in:
parent
0abd078269
commit
3349bd567a
3 changed files with 51 additions and 5 deletions
10
bash.sh
Executable file
10
bash.sh
Executable 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
35
bash/.bash_aliases
Normal 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
11
init.sh
|
@ -10,16 +10,17 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#setup prezto
|
#setup shell
|
||||||
|
bash bash.sh
|
||||||
echo "Select which shell to configure and use: zsh/fish/bash"; read -r answer
|
echo "Select which shell to configure and use: zsh/fish/bash"; read -r answer
|
||||||
if [[ $answer = "zsh" ]] || [[ $answer = "z" ]]; then
|
if [[ $answer = "zsh" ]] || [[ $answer = "z" ]]; then
|
||||||
echo "Initializing Prezto"
|
echo "Initializing Prezto"
|
||||||
zsh prezto.zsh
|
zsh prezto.zsh
|
||||||
chsh -s /bin/zsh
|
chsh -s /usr/bin/zsh
|
||||||
elif [[ $answer = "fish" ]] || [[ $answer = "f" ]]; then
|
elif [[ $answer = "fish" ]] || [[ $answer = "f" ]]; then
|
||||||
echo "Installing Oh-My-Fish"
|
echo "Installing Oh-My-Fish"
|
||||||
bash fish.sh
|
bash fish.sh
|
||||||
chsh -s /bin/fish
|
chsh -s /usr/bin/fish
|
||||||
else
|
else
|
||||||
echo "Guess we're sticking with default bash then..."
|
echo "Guess we're sticking with default bash then..."
|
||||||
fi
|
fi
|
||||||
|
@ -27,10 +28,10 @@ fi
|
||||||
#create symlinks using stow
|
#create symlinks using stow
|
||||||
mkdir ~/.ssh
|
mkdir ~/.ssh
|
||||||
echo "Stowing Configs"
|
echo "Stowing Configs"
|
||||||
|
stow bash
|
||||||
stow tmux
|
stow tmux
|
||||||
#Add Tmux themes
|
#init TMP
|
||||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
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 vim
|
||||||
stow prezto
|
stow prezto
|
||||||
stow config
|
stow config
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue