Comments (31)
Which version of tmux
and tmux-gitbar
do you use?
A quite similar issue was already reported and fixed, see #13
In case you are using a version pre 1.0.0, you should update it, just be aware of the very light breaking change , described in the README
Thanks for reporting.
from tmux-gitbar.
I just pulled from master today after discovering the project. Which is awesome by the way.
I am running tmux 2.0
from tmux-gitbar.
It does only happen outside of git working directories as mentioned in #13
from tmux-gitbar.
Ok so in this case I confirm the issue and will investigate.
Could you please attach here you tmux.conf
or copy paste it please.?
For the rest, you have the default settings right, default tmux-gitbar.conf
?
from tmux-gitbar.
yes default tmux-gitbar.conf
Below is my tmux.conf. Pretty simple, I have kinda just used the same configuration with minor tweaks that I made a year ago when I first discovered tmux. Don't make fun of any stupidities lol.
unbind C-b
unbind [
unbind p
unbind o
unbind l
unbind u
unbind o
unbind i
unbind j
unbind k
unbind l
set -g prefix C-a
bind C-a send-prefix
set -sg escape-time 1
set -sg base-index 1
set -g default-terminal "screen-256color"
setw -g mode-keys vi
setw -g pane-base-index 1
bind = split-window -h
bind - split-window -v
bind R source-file ~/.tmux.conf \; display "Reloaded!"
bind Escape copy-mode
bind p paste-buffer
bind o choose-buffer
bind -t vi-copy 's' begin-selection
bind -t vi-copy 'c' copy-selection
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
bind l pipe-pane -o "cat >>~/Desktop/tmux_log.txt" \; display "Toggled logging to Desktop"
bind -r j resize-pane -L 10
bind -r l resize-pane -R 10
bind -r u resize-pane -U 10
bind -r o resize-pane -D 10
bind i swap-pane -U
bind k swap-pane -D
source-file "$HOME/.tmux-gitbar/tmux-gitbar.tmux"
EDIT: Aha! Thanks for pointing out the triple tick.
from tmux-gitbar.
When inside tmux, could you please show me the output of:
echo $TERM
from tmux-gitbar.
~$ echo $TERM
screen-256color
bad colour: fg=white,bg=black
bad colour: fg=white,bg=black
~$
from tmux-gitbar.
Thanks for your help in resolving this issue.
Still when inside tmux, you have the default green status bar, right?
And if you run this, what happens:
tmux set -g status-bg black
from tmux-gitbar.
I have the default green.
When running
tmux set -g status-bg black
The status bar changes to grey but the bad colour output continues.
from tmux-gitbar.
The status bar changes to grey but the bad colour output continues.
Yes but it should change to black, not grey.
I suspect a color configuration problem of your tmux.conf
, your terminal configuration, or environment variables (through .bashrc
).
I also have this line in my tmux.conf
, I'm on Ubuntu with gnome-terminal, guake works fine also, as other terminals I tried:
set -g default-terminal "screen-256color"
Maybe this could help?
- http://superuser.com/questions/399296/256-color-support-for-vim-background-in-tmux
- http://unix.stackexchange.com/questions/1045/getting-256-colors-to-work-in-tmux
Now I remember having problems myself to set the tmux color configuration myself.
I have this line in my .bashrc
though:
export TERM=xterm-256color
Sorry to not be clearer about that but I found the correct setting after some trial and errors and don't remember which one finally worked!
from tmux-gitbar.
Sorry but the tmux-gitbar status bar is displayed correctly when inside a working tree?
from tmux-gitbar.
Yes it works correctly inside a working tree.
I added
export TERM=xterm-256color
to my .bashrc. Something I had before but not on my new installation. I have also tried suggestions in those posts, but the issue persists. Perhaps I'll keep poking around.
from tmux-gitbar.
I've tried other terminals, but I still get the error.
I tried removing
set -g default-terminal "screen-256color"
but it still didn't work.
Is it worth mentioning that the first time the error is thrown it actually reads:
bad colour: fg=white,bg=black,bright
bad colour: fg=white,bg=black,bright
And then all subsequent errors are just
bad colour: fg=white,bg=black
bad colour: fg=white,bg=black
from tmux-gitbar.
Ok. Update me if you find anything so that I can fix or update the README.
I'll keep looking as well for a way to reproduce.
Le 9 mars 2016 19:05, "aizimmer" [email protected] a รฉcrit :
I've tried other terminals, but I still get the error.
I tried removing
set -g default-terminal "screen-256color"
but it still didn't work.
Is it worth mentioning that the first time the error is thrown it actually
reads:bad colour: fg=white,bg=black,bright
bad colour: fg=white,bg=black,brightAnd then all subsequent errors are just
bad colour: fg=white,bg=black
bad colour: fg=white,bg=blackโ
Reply to this email directly or view it on GitHub
#23 (comment)
.
from tmux-gitbar.
Ha okay so I was cruising around different ways of specifying colors in tmux, and landed on trying colorXXX notation.
So for example in my tmux-gitbar.conf I set
readonly TMGB_BG_COLOR='color232'
readonly TMGB_FG_COLOR='color255'
What happened is the inverse of the bug. The functionality of your script isn't changed and I still get live updates to the working tree. But now outside of a working tree the errors go away, except inside a working directory I get
bad colour: color255
bad colour: color232
And then when leaving the working directory I get the one time
bad colour: bright
bad colour: bright
I think you were right before in that this is a versioning issue. What version of tmux do you run?
from tmux-gitbar.
Further information.
Using hex notation in my .tmux.conf produces correct colors (i.e. "#000000" for black). But then the bad colour error becomes
bad colour: fg=colour231,bg=colour16
bad colour: fg=colour231,bg=colour16
OUTSIDE of working trees.
I believe tmux dropped the English spelling "colour" in 1.9 for the American spelling "color". Though using hex is backwards compatible.
EDIT: This is with hex notation in both .tmux.conf and tmux-gitbar.conf. Changing tmux-gitbar.conf back to defaults produces the original error.
from tmux-gitbar.
Ok I found something...the issue is with the save_statusbar amd reset_statusbar functions, and it might be out of your control.
Maybe I'm just being too lazy to find it but where do you set that "TMGB_STATUS_LOCATION" variable. Because I see you are also explicitly following it with 'fg' or 'bg'
from tmux-gitbar.
Interesting
It's tested on tmux 2.1 built from source and 1.9 from ubuntu standard apt
repo.
I'll look into that
Don't think I've time tonight tough
Thanks for the update
Le 9 mars 2016 20:42, "aizimmer" [email protected] a รฉcrit :
Ha okay so I was cruising around different ways of specifying colors in
tmux, and landed on trying colorXXX notation.So for example in my tmux-gitbar.conf I set
readonly TMGB_BG_COLOR='color232'
readonly TMGB_FG_COLOR='color255'What happened is the inverse of the bug. The functionality of your script
isn't changed and I still get live updates to the working tree. But now
outside of a working tree the errors go away, except inside a working
directory I getbad colour: color255
bad colour: color232And then when leaving the working directory I get the one time
bad colour: bright
bad colour: brightI think you were right before in that this is a versioning issue. What
version of tmux do you run?โ
Reply to this email directly or view it on GitHub
#23 (comment)
.
from tmux-gitbar.
TMGB_STATUS_LOCATION is set in tmux-gitbar.conf
Le 9 mars 2016 21:36, "Aurelien RAINONE" [email protected] a
รฉcrit :
Interesting
It's tested on tmux 2.1 built from source and 1.9 from ubuntu standard
apt repo.
I'll look into that
Don't think I've time tonight tough
Thanks for the updateLe 9 mars 2016 20:42, "aizimmer" [email protected] a รฉcrit :
Ha okay so I was cruising around different ways of specifying colors in
tmux, and landed on trying colorXXX notation.So for example in my tmux-gitbar.conf I set
readonly TMGB_BG_COLOR='color232'
readonly TMGB_FG_COLOR='color255'What happened is the inverse of the bug. The functionality of your
script isn't changed and I still get live updates to the working tree. But
now outside of a working tree the errors go away, except inside a working
directory I getbad colour: color255
bad colour: color232And then when leaving the working directory I get the one time
bad colour: bright
bad colour: brightI think you were right before in that this is a versioning issue. What
version of tmux do you run?โ
Reply to this email directly or view it on GitHub.
from tmux-gitbar.
TMGB_STATUS_LOCATION is set in tmux-gitbar.conf
Oh duh, ha.
Well the issue appears to be reset_statusbar getting bad data from save_statusbar. I am able to work around the issue by switching off readonly on TMGB_OUTREPO_FG_COLOR and TMGB_OUTREPO_BG_COLOR. And then in the reset_statusbar function explicity setting them to "default"
from tmux-gitbar.
Thanks a lot get to the bottom of this. Still, I'm not sure I understand why. Looking at tmux changelogs I found nothing of interest.
I'll compile tmux 2.0 and try to reproduce, I'll hopefully be able to provide a backward-forward compatible fix, as I'd not like to have to add some code switches, depending on the version of tmux
from tmux-gitbar.
I am unsure but the tmux built-in 'default' might actually represent whatever is in the user's rc file. Which could in theory make the whole save_statusbar function unnecessary.
Though I am speaking entirely from speculation, as it is working for me sure enough, but I can't verify backwards compatibility.
from tmux-gitbar.
I am unsure but the tmux built-in 'default' might actually represent whatever is in the user's rc file. Which could in theory make the whole save_statusbar function unnecessary.
For the style attribute, or fg
and bg
: default
means the default color of your terminal. It's not what is in the user rc file.
from tmux-gitbar.
From tmux changelogs:
Deprecated Changes
- The various foo-{fg,bg,attr} commands have been deprecated and replaced
with equivalent foo-style option instead. Currently this is still
backwards-compatible, but will be removed over time.
So I came up with this PR #24 (not merged for now) that replaces this deprecated syntax. It hopefully will fix the issue you have ๐
If you happen to have the time to pull it and see if that fixes the issue, I'd be eternally grateful!
Didn't have the time to try on a tmux v2.0
from tmux-gitbar.
Will do
from tmux-gitbar.
๐
from tmux-gitbar.
Looks good so far. Well done my friend
from tmux-gitbar.
๐ Good news!
I'll use this branch myself at home, on tmux 1.9
and tomorrow at work, where I've got tmux 2.1
.
If you and I do not see some any problems after having used it, I'll merge this into master.
Thanks again for your contribution, my way to reward you is a comment line in the source code!
14d8290 ๐
๐
from tmux-gitbar.
I just compiled 2.1 on my work computer (where I've been tinkering) and am not seeing any issues so far. I'll defer to your best judgment though, for more in depth testing.
from tmux-gitbar.
Ha ok, well done!
There's not so much to test honestly, but tinkering with different sessions, paths (in/out of git), trying with different tmux status string configurations (tmux.conf)
tmux-gitbar has a unit-test suite, but that doesn't include yet this kind of tests. However I'm currently working on a integration test suite that work with a VT100 terminal emulator, with colors! When this will be ready, all of this will be automatically testable. But for now, let's wait until tomorrow and I'll merge this if nothing hapens.
from tmux-gitbar.
I merged #24
from tmux-gitbar.
Related Issues (20)
- How does tmux-gitbar would take advantage of tmux v2.3 HOT 2
- Takes no effect after installation HOT 1
- tmux-gitbar.conf needs to exist outside the repo HOT 6
- Tmux 2.3 problem HOT 15
- Show when a rebase, bisect, am is in progress? HOT 3
- Gitbar is squashed in to rightmost 14 characters HOT 3
- Add length limitation on the branch+remote string, or the whole bar
- No bar on tmux 2.1. HOT 12
- Problem when on a tag in detached state
- Symbols in Bash on Ubuntu on Windows don't work HOT 7
- Some errors occur when update-gitbar called in the initial git directory HOT 3
- Garbage output in freshly created repo with 0 commits
- unknown option: status-right-style HOT 5
- Bug when reading a newly created repo HOT 8
- Still read Git status when .tmgbignore
- Does not work in zsh HOT 5
- Doesnโt work with ZSH HOT 6
- Git status bar not showing automatically HOT 7
- Git information not showing up after reloading tmux config HOT 6
- Still having zsh issue HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmux-gitbar.