Comments (16)
For both the tmux
issue and the st
one solution is to set TERM
to xterm-256color
, urxvt-256color
also seemed to work for me. This can be done at compile time when building st
using this method https://wiki.archlinux.org/index.php/St#Term or by running export TERM='xterm-256color'
. The compile time way seems to be the recommended way for st
. Note that both basic and 256 colors should be supported.
Please update this thread if you still have issues or if you find a better way.
from cli-visualizer.
My initial guess is that tmux doesn't support 256 colors. Could you try with a different color scheme? The color scheme can be defined in the colors directory, usually under ~/.config/vis/colors/
. The config option colors.scheme
can be used to set the color scheme.
For example, copy the file copying the colorscheme blue to ~/.config/vis/colors/blue
then set colors.scheme=blue
.
from cli-visualizer.
Both tmux and st have support for 256 color, and I have my terminfo set to tmux-256color
which is the correct one for such a thing (available since ncurses 6).
In addition, I tried changing the color scheme to basic_colors and I still got the blank screen.
from cli-visualizer.
Does it work with st
without tmux
?
Also if you're willing to debig some more, could you try checking out this branch git checkout always_enable_colors
and building again. This branch always enables colors even if the terminal claims to not support it.
from cli-visualizer.
Yesterday, it did not work in st
even when not under tmux
. But in a terminal where it does work, it stops working under tmux
. If these should be separated to two separate issues, that's fine :)
I will checkout that branch and give it a shot! No joy in st
. If it matters, no bars are showing up whatsoever, it's a completely blank screen.
from cli-visualizer.
Would you mind pulling the branch always_enable_colors
another time. I've made one other change to always enable 256 colors. So far I've been unable to reproduce this with tmux
, it is working with the latest arch linux packages.
from cli-visualizer.
All right, I have an update. First, it seems I may have made a foolish mistake earlier and passed ENABLE_PULSE=1
after make
instead of before. However, after having changed it, vis
still produces no visible output in st
.
However, after making sure to pass it as an environment variable, the same thing happens: it works in terminals other than st
, but not inside tmux
and it does not work in st
at all.
from cli-visualizer.
@dpayne, so the issue then is that vis
is incompatible with both terminfos tmux-256color and st-256color?
from cli-visualizer.
So the actual issue is pretty annoying. vis
uses ncurses, which in turn uses $TERM
to figure out what colors are supported and how to output them since different terminals have different escape codes. So for example when tmux
is run without setting $TERM
, vis
still works it is just that all the colors are either black or transparent. You can see this if you set your terminal to transparent, then some sections of the bars will show up black and some clear. It is harder to say what exactly is going on with st
, but I imagine something very similar is going on.
The two solutions I see are either stop using ncurses
or have the user set the $TERM
variable, both solutions are terrible with the second being slightly less so. If I removed ncurses
there would be even more issues with various terminals since ncurses
handles a lot of the peculiarities of some terminals. I really do not like that the user has to set a shell variable, but the alternative of abandoning ncurses
is not going to happen anytime soon.
from cli-visualizer.
Well, actually, it sounds like you have an implicit dependency on xterm/urxvt's terminfo. $TERM
declares the terminfo to use, but I have it set (I just have it set to tmux-256color
when in tmux
and st-256color
when in st
without tmux
).
Note that both of these terminfos support 256 colors. It seems rather that you may be calling the escapes from xterm/urxvt rather than querying the set terminfo to see which escapes to use. (I have not yet looked at your code, but since the workaround is to just set TERM=xterm-256color
, that seems most likely.)
from cli-visualizer.
I do not use $TERM
anywhere in the code, however ncurses
does. From the docs http://linux.die.net/man/3/ncurses
TERM
Denotes your terminal type. Each terminal type is distinct, though many are similar.
The current version of ncurses
does not recognize tmux-256color
or st-256color
so it assumes a default that clearly does not work.
from cli-visualizer.
Which version of ncurses
are you referring to? The latest version (at least on Arch) provides both tmux-256color
and st-256color
. See below:
$ pacman -Qi ncurses|grep Version
Version : 6.0-4
$ pacman -Ql ncurses|grep -e 'st-256color' -e 'tmux-256color'
ncurses /usr/share/terminfo/s/st-256color
ncurses /usr/share/terminfo/t/tmux-256color
from cli-visualizer.
You are right. I was using a custom version of ncurses
but the latest version appears to have it, but I still see the same issue. However this just makes the issue more perplexing. vis
does not use terminfo directly in any way, it always goes through ncurses
.
from cli-visualizer.
I will take a look at the code this weekend and see if I cannot figure out what may be going on. Thank you for your time, regardless!
from cli-visualizer.
Could you run tput colors
with tmux
and in st
?
On my system, with tmux
I get 8
even though 256 colors should be supported. After running export TERM='xterm-256color'
, tput colors
shows 256
and vis
will show all colors. Again, thanks for all the work investigating this; this is definitely an issue just one I do not see a good solution to. Please update this thread or open another issue if you find a better solution.
from cli-visualizer.
tput colors
shows 256
in both tmux
and st
. You may have 8
showing up because tmux
does not default to using tmux-256color
, but that is what I have it set to use.
from cli-visualizer.
Related Issues (20)
- Aborted (core dumped) error
- Crash upon open HOT 8
- Aborted, core dumped HOT 8
- Turn off moving average AGC in SpectrumTransformer
- Improvement: Smooth Spectrum look using Unicode Characters
- Mac Os monterey Installation failure HOT 2
- option for hiding output when no audio is playing
- error in 'readme' images
- non-256 color in tmux with the -2 argument
- no display from $ sudo vis? HOT 1
- Changing the resolution / font of the lorenz visualizer?
- [MacOS] The $ZSH folder already exists when trying to run ./install.sh
- how to uninstall this? HOT 1
- I got blank screen on Ubuntu HOT 4
- Looks very dark in Kitty HOT 6
- Use `XDG_CONFIG_DIRS` as fallback to `XDG_CONFIG_HOME`
- no uninstall script
- Bars not moving HOT 2
- Logarithimic frequency spectrum
- Can't get to work on raspberry pi, ubuntu, alsa?
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 cli-visualizer.