maint: tmux status checks

This commit is contained in:
Matthew Ryan Dillon 2021-02-27 13:33:26 -07:00
parent 14b3b6a5c0
commit cdd4082fb8
4 changed files with 29 additions and 2 deletions

21
check_status.sh Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env zsh
local a="main" b="pingo/main"
local base=$( git merge-base $a $b )
local aref=$( git rev-parse $a )
local bref=$( git rev-parse $b )
if [[ $(git diff --stat) != '' ]]; then
echo 'dotfiles: dirty'
exit
fi
if [[ $aref == "$bref" ]]; then
echo ''
elif [[ $aref == "$base" ]]; then
echo 'dotfiles: needs a pull'
elif [[ $bref == "$base" ]]; then
echo 'dotfiles: needs a push'
else
echo 'dotfiles diverged'
fi

View file

@ -56,3 +56,8 @@
rebase = true
[init]
defaultBranch = main
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true

View file

@ -29,7 +29,7 @@ set -g status-justify centre
set -g status-left-length 50
set -g status-right-length 140
set -g status-left '#[fg=green]#H#[default] session:#S'
set -g status-right '#[fg=white,bg=default]%a %l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d'
set -g status-right '#[fg=black,bg=colour119]#(cd ~/.password-store && ./check_status.sh)#[default] #[fg=black,bg=colour215]#(cd ~/.dotfiles && ./check_status.sh)#[default] #[fg=white,bg=default]%a %l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d'
set-option -g renumber-windows on
set -sg escape-time 0

View file

@ -26,5 +26,6 @@
"python.defaultInterpreterPath": "~/.conda/envs/q2dev/bin/python",
"python.terminal.activateEnvInCurrentTerminal": true,
"python.languageServer": "Microsoft",
"git.enabled": false
"git.enabled": false,
"liveshare.authenticationProvider": "GitHub"
}