From c2e4e04a18933a02941916d3708c2262a366b9d3 Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sat, 16 Jul 2022 16:09:20 -0400 Subject: [PATCH] Update bash aliases and settings + Fix gitmux --- .bash_aliases | 46 ++++++++++++++++++++++++++++++++++++++++++---- .bashrc | 1 - .gitignore | 1 + .tmux.conf | 2 +- .vimrc | 2 +- README.md | 8 ++++++++ 6 files changed, 53 insertions(+), 7 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index 8ea3606..3027c3b 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -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" diff --git a/.bashrc b/.bashrc index 15177f2..b488fcc 100644 --- a/.bashrc +++ b/.bashrc @@ -115,4 +115,3 @@ if ! shopt -oq posix; then . /etc/bash_completion fi fi -. "$HOME/.cargo/env" diff --git a/.gitignore b/.gitignore index cf5d1fd..304b2cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.bash_secrets .idea/ .config/Code/Backups/* .config/Code/*Cache*/* diff --git a/.tmux.conf b/.tmux.conf index 3405b01..649e54c 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -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} diff --git a/.vimrc b/.vimrc index f660542..3971478 100644 --- a/.vimrc +++ b/.vimrc @@ -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 diff --git a/README.md b/README.md index 4138d5c..2c70757 100644 --- a/README.md +++ b/README.md @@ -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 +```