Update bash aliases and settings

+ Fix gitmux
master
Shaun Reed 2 years ago
parent 903e81aad4
commit c2e4e04a18

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

@ -115,4 +115,3 @@ if ! shopt -oq posix; then
. /etc/bash_completion
fi
fi
. "$HOME/.cargo/env"

1
.gitignore vendored

@ -1,3 +1,4 @@
.bash_secrets
.idea/
.config/Code/Backups/*
.config/Code/*Cache*/*

@ -103,7 +103,7 @@ set -g status-right "#[fg=colour235,bg=colour233,bold]#[fg=colour240,bg=colo
# Window status
set -g window-status-format '#(/home/kapper/go/bin/gitmux #{pane_current_path})'
# set -g window-status-format " #I:#W#F (TMUX OTHER STATUS) #(pwd | sed -e "s|.*/\(.*/.*\)|\1|") "
set -g window-status-current-format '#(/home/kapper/go/bin/gitmux #{pane_current_path})'
set -g window-status-current-format '#(/home/$USER/go/bin/gitmux #{pane_current_path})'
#set -g window-status-current-format "#[fg=colour255,bg=colour233]#[fg=colour100,nobold] #(whoami)@#H #[fg=colour255,bg=colour233,nobold]"
# #{pane_current_path}

@ -22,7 +22,7 @@ set clipboard+=unnamed
" Allows true colors in vim (> 8 bit colors)
" :help termguicolors
set termguicolors
"set termguicolors
" Custom formatting based on filetype
" :help autocmd

@ -67,3 +67,11 @@ source ~/.bashrc
```
### Gitmux
To enable the gitmux status bar in tmux sessions
```bash
sudo apt install golang-go
go install github.com/arl/gitmux@latest
```

Loading…
Cancel
Save