arl / tmux-gitbar

Git in your tmux status bar
GNU General Public License v3.0
170 stars 16 forks source link

Git status bar not showing automatically #61

Closed damien-biasotto closed 4 years ago

damien-biasotto commented 5 years ago

Hi,

I can't make tmux-gitbar display automatically. I have to invoke it manually. Running tmux using Konsole Version 18.08.0

I reckon I'm asking for trouble since I installed it using TPM, so I updated my conf as stated in the docs, but the status bar does not show unless I'm calling update-gitbar.

❯ tmux -V                                                                                                                                                                                                                                                                                                        
tmux 2.7-rc
❯ echo $SHELL                                                                                                                                                                                                                                                                                                   
/run/current-system/sw/bin/zsh

Here is my .tmux.conf

❯ cat ~/.tmux.conf                                                                                                                                                                                                                                                                                               
set -g base-index 1

# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on

set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000

setw -g mode-keys vi
setw -g mouse on
setw -g monitor-activity on
set -g status-justify centre

bind-key v split-window -h
bind-key s split-window -v

bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5

bind-key M-j resize-pane -D
bind-key M-k resize-pane -U
bind-key M-h resize-pane -L
bind-key M-l resize-pane -R

# Vim style pane selection
bind h select-pane -L
bind j select-pane -D 
bind k select-pane -U
bind l select-pane -R

# Use Alt-vim keys without prefix key to switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D 
bind -n M-k select-pane -U
bind -n M-l select-pane -R

# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

# Shift arrow to switch windows
bind -n S-Left  previous-window
bind -n S-Right next-window

# No delay for escape key press
set -sg escape-time 0

# Reload tmux config
bind r source-file ~/.tmux.conf

# THEME
set -g status-bg black
set -g status-fg white
set -g window-status-current-bg white
set -g window-status-current-fg black
set -g window-status-current-attr bold
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami) '
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-sidebar'
#set -g @plugin 'arl/tmux-gitbar'

TMUX_GITBAR_DIR="/home/damien/.tmux/plugins/tmux-gitbar"
set -g status-right-length 100

source-file "/home/damien/.tmux/plugins/tmux-gitbar/tmux-gitbar.tmux"

run -b '/home/damien/.tmux/plugins/tpm/tpm'

My ~/.zshrc

#Zplug
export ZPLUG_HOME=~/.zplug
source $ZPLUG_HOME/init.zsh

zplug clear

zplug "mafredri/zsh-async", from:github, defer:0
zplug "lib/completion", from:oh-my-zsh
zplug "zsh-users/zsh-syntax-highlighting", from:github, defer:3
zplug "sindresorhus/pure", use:pure.zsh, from:github, as:theme

zplug "rupa/z", use:z.sh

zplug load

if ! zplug check --verbose; then
    printf "Install zplug plugins? [y/N]: "
    if read -q; then
        echo; zplug install
    fi
fi

alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'

export LOCAL_IP=172.18.0.1

#VirtualEnv
export WORKON_HOME=/home/damien/Python/Envs/
VIRTUAL_ENV_PATH=`whereis virtualenvwrapper.sh | awk '{print $2}'`

#Path
NPM_PACKAGES=/home/damien/.npm-packages
PATH=$NPM_PACKAGES/bin:$PATH

unset MANPATH # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"

export EDITOR=vim

# tabtab source for serverless package
# uninstall by removing these lines or running `tabtab uninstall serverless`
[[ -f /home/damien/.npm-packages/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.zsh ]] && . /home/damien/.npm-packages/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.zsh
# tabtab source for sls package
# uninstall by removing these lines or running `tabtab uninstall sls`
[[ -f /home/damien/.npm-packages/lib/node_modules/serverless/node_modules/tabtab/.completions/sls.zsh ]] && . /home/damien/.npm-packages/lib/node_modules/serverless/node_modules/tabtab/.completions/sls.zsh

NB: I had to comment the plugin declaration in ~/.tmux.conf because tpm was returning an error.

arl commented 5 years ago

Hi Damien

Are you on bash/zsh/fish? Can you share your tmux.conf?

On Thu, 13 Dec 2018, 02:00 Damien Biasotto <notifications@github.com wrote:

Hi,

I can't make tmux-gitbar display automatically. I have to invoke it manually.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/arl/tmux-gitbar/issues/61, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdF6qp03-rmSB5JY7OB4bTyAz9xLhLuks5u4abHgaJpZM4ZQu09 .

damien-biasotto commented 5 years ago

Hi Aurelien,

I actually did, but you can't see it in the email notification because I accidentally submited the incomplete issue first.

I"m using zsh:

❯ zsh --version                                                                                                                                                                                                               ~/Repositories
zsh --version
zsh 5.6.2 (x86_64-pc-linux-gnu)

I actually did it again … Damn Slack shortcuts ;p

arl commented 5 years ago

Ok. I see. Only bash is supported, however check out https://github.com/arl/tmux-gitbar/issues/60 for a shell-agnostic solution.

On Thu, 13 Dec 2018, 07:02 Damien Biasotto <notifications@github.com wrote:

Hi Aurelien,

I actually did, but you can't see it in the email notification because I accidentally submited the incomplete issue first.

I"m using zsh:

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arl/tmux-gitbar/issues/61#issuecomment-446852494, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdF6rMZhQNgtaulYVceqm9P_hkr7Y4Kks5u4e2EgaJpZM4ZQu09 .

damien-biasotto commented 5 years ago

Sweet, I 'll give it a try

On Thu, 13 Dec. 2018, 5:10 pm Aurélien Rainone <notifications@github.com wrote:

Ok. I see. Only bash is supported, however check out https://github.com/arl/tmux-gitbar/issues/60 for a shell-agnostic solution.

On Thu, 13 Dec 2018, 07:02 Damien Biasotto <notifications@github.com wrote:

Hi Aurelien,

I actually did, but you can't see it in the email notification because I accidentally submited the incomplete issue first.

I"m using zsh:

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arl/tmux-gitbar/issues/61#issuecomment-446852494, or mute the thread < https://github.com/notifications/unsubscribe-auth/AAdF6rMZhQNgtaulYVceqm9P_hkr7Y4Kks5u4e2EgaJpZM4ZQu09

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arl/tmux-gitbar/issues/61#issuecomment-446853985, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaSKXhMxpg3KJjQsUVEuu6Jz5JZ6kCJks5u4e9ugaJpZM4ZQu09 .

dhoss commented 5 years ago

I'm actually seeing something like this as well, but I haven't tried calling update-gitbar.

I'm running under bash on high sierra.

bash version: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17) Copyright (C) 2007 Free Software Foundation, Inc.

tmux version: tmux 2.7

.tmux.conf:

# remap prefix to Control + a
set -g prefix C-a
# bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
unbind C-b

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

set -g @continuum-restore 'on'

source-file "$HOME/.tmux-gitbar/tmux-gitbar.tmux"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
arl commented 5 years ago

Hey Devin Can you create a new issue where you explain exactly what you're seeing ( for reference for the others) as it may be a different issue. Can you kindly explain the problem and re-add the info you added to that issue. Thanks

On Mon, 4 Feb 2019, 21:35 Devin Austin <notifications@github.com wrote:

I'm actually seeing something like this as well, but I haven't tried calling update-gitbar.

I'm running under bash on high sierra.

bash version: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17) Copyright (C) 2007 Free Software Foundation, Inc.

tmux version: tmux 2.7

.tmux.conf: `# remap prefix to Control + a set -g prefix C-a bind 'C-a C-a' to type 'C-a'

bind C-a send-prefix unbind C-b

set -g @plugin https://github.com/plugin 'tmux-plugins/tpm' set -g @plugin https://github.com/plugin 'tmux-plugins/tmux-sensible' set -g @plugin https://github.com/plugin 'tmux-plugins/tmux-resurrect' set -g @plugin https://github.com/plugin 'tmux-plugins/tmux-continuum'

set -g @continuum-restore 'on'

source-file "$HOME/.tmux-gitbar/tmux-gitbar.tmux" Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)

run '~/.tmux/plugins/tpm/tpm'`

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arl/tmux-gitbar/issues/61#issuecomment-460402774, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdF6vxWBfdPUgwv_pmmDTsCmrMsg7cbks5vKJlzgaJpZM4ZQu09 .

dhoss commented 5 years ago

@arl done, thanks!