Update bash aliases and settings

+ Fix gitmux
This commit is contained in:
2022-07-16 16:09:20 -04:00
parent 903e81aad4
commit c2e4e04a18
6 changed files with 53 additions and 7 deletions

View File

@@ -1,8 +1,10 @@
# Aliases to use the correct python version
# + Because python doesn't know how to update.. :')
alias python3='python3.9'
alias pip3='python3.9 -m pip'
# For Rust stuff, uncomment this line
#. "$HOME/.cargo/env"
# Alias to restart plasmashell for Kubuntu Plasma session
alias kapp-plasmashell='sudo pkill plasmashell && plasmashell --replace &> /dev/null &'
# Alias to clear swap
alias kapp-swap='sudo swapoff -a && sudo swapon -a'
alias kapp-git='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"'
alias kapp-update='sudo apt update -y && sudo apt upgrade -y && sudo apt upgrade --fix-broken --fix-missing --auto-remove'
@@ -33,4 +35,40 @@ if [ -f ~/.bash_secrets ]; then
. ~/.bash_secrets
fi
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux
fi
# Set the default terminal to use konsole, with Kapper profile
# + Execute tmux on start
#export TERMINAL='konsole --profile Kapper -e tmux'
# Less colors for man pages
export PAGER=less
default=$(tput sgr0)
red=$(tput setaf 1)
green=$(tput setaf 2)
purple=$(tput setaf 5)
orange=$(tput setaf 9)
# Begin blinking
export LESS_TERMCAP_mb=$red
# Begin bold
export LESS_TERMCAP_md=$orange
# End mode
export LESS_TERMCAP_me=$default
# End standout-mode
export LESS_TERMCAP_se=$default
# Begin standout-mode - info box
export LESS_TERMCAP_so=$purple
# End underline
export LESS_TERMCAP_ue=$default
# Begin underline
export LESS_TERMCAP_us=$green
# Allow mouse wheel movement for less output (manpages, diffs)
export LESS='--mouse --wheel-lines 2'
# Set additional flags for less
# + -R for raw control characters
# + -w to highlight first unread line when jumping N>1 lines down
# + -#2 to shift 2 columns horizontally when right / left arrow is pressed
export LESS="$LESS -R -w -#2"