Browse Source

add git and path

master
Efertone 8 months ago
parent
commit
b162fe0f7b
Signed by: efertone GPG Key ID: 07AB750DDFD9EE50
  1. 16
      get-path
  2. 9
      status-second

16
get-path

@ -0,0 +1,16 @@
#!/bin/bash
p=${1:-$(pwd)}
cd $p
if [ -d ".git" ]; then
basename $(git rev-parse --show-toplevel)
else
if [[ $p = $HOME ]]; then
echo "~$(whoami)"
else
echo ${p/${HOME}\//}
fi
fi

9
status-second

@ -3,11 +3,12 @@
function left() {
line=''
line=$line'#[fg=colour243,bg=colour235]'
line=$line'#[fg=colour149,bg=colour235]'
line=$line' #(~/.tmux/get-path #{pane_current_path})'
line=$line' #(gitmux "#{pane_current_path}") '
#line=$line' #{pane_current_path} '
line=$line'#[fg=colour235,bg=default,nobold]'
echo $line
}
@ -20,7 +21,9 @@ function right() {
#spotyBackground=colour133
#spotyStyle="#[fg=${spotyBackground}]#[fg=${spotyTextColor}, bg=${spotyBackground}, nobold]"
spotyStyle="#[fg=${spotyTextColor}, bg=${spotyBackground}, nobold]"
spotyFlags="--tmux-color-bar-fg=${spotyBarColor} --tmux-color-text-fg=${spotyTextColor}"
spotyFlags="--tmux-color-bar-fg=${spotyBarColor}"
spotyFlags="${spotyFlags} --tmux-color-text-fg=${spotyTextColor}"
spotyFlags="${spotyFlags} --first-artist --max-length-total=80"
if ps aux | grep -i '[z]oom' 2>&1 > /dev/null; then
line=$line' #[fg=colour124]#[fg=colour15, bg=colour124, nobold] Zoom is running '

Loading…
Cancel
Save