Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Make Tmux-gitbar styles/colors optional #30

Open
arl opened this issue Aug 7, 2016 · 2 comments
Open

Make Tmux-gitbar styles/colors optional #30

arl opened this issue Aug 7, 2016 · 2 comments

Comments

@arl
Copy link
Owner

arl commented Aug 7, 2016

Copy paste from issue #28, created by @adrianluff:

(Additionally), the current TMGB behavior requires duplicate, manual configuration of colors and styles in TMGB. This makes it unfriendly for use with plugins like vim-tmuxline. Further TMGB enhancement is possible by making TMGB colors and styles optional. I tested this by simply commenting two lines in tmux-gitbar.sh:

#tmux set-window-option "status-$TMGB_STATUS_LOCATION-style" "$TMGB_STYLE" > /dev/null
#tmux set-window-option "status-$TMGB_STATUS_LOCATION-length" 180 > /dev/null

This is only a partial solution but it allows the TMGB information to be combined with the user's existing tmux colorscheme or theme more easily.

An ideal implementation of this issue would have a conf file setting to enable or disable both of these enhancements rather than my hack-y solutions. Here's an example of what these changes allow.

image

@arl
Copy link
Owner Author

arl commented Aug 7, 2016

@adrianluff
It would be indeed very nice if tmux-gitbar would for allow seemless integration with vim-tmuxline, as with any other plugins or tools, while remaining usable, as it is now, with no needed user configuration in order to work on a vanilla installation. I like very much your idea of having a setting in the generated conf file.

What you propose is:
the current settings would remain the default, whereas if TGMB_NOSTYLE (for example) is set and equals to 1 in tmux-gitbar.conf the git bar would be rendered with no styles at all.

I'm wondering if there isn't even a simpler solution:
Did you try to set the TMGB_STYLE variable to the empty string in your tmux-gitbar.conf? If that is not enough, I guess it's because vim-tmuxline really needs to have the style not touched.

@adrianluff
Copy link

Setting readonly TMGB_STYLE='' in the tmux-gitbar.conf seems to work nicely for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants