Comments (5)
Check (and set?) vim's laststatus option
Don’t do this. If I prefer statusline not to be shown sometimes it does mean I neither want to see this nor any notification. It does not mean though that I do not want powerline to be run at all.
Check $TERM to see if the terminal supports 256 colors and optionally display an error message or notice
Not $TERM
(if we are talking about vim), but &t_Co
. I think it is more common that 256-color terminal did not receive correct &t_Co
(vim -u NONE
, for example, has 8
colors for TERM=xterm
which is default for konsole and xterm even though 256 colors work. They are properly detected only with TERM=xterm-256color
.) then vim was launched in non-256-color terminal. Thus &t_Co
is set to 256, but terminal does not claim to support this number of colors it may mean that terminal actually supports them. For me it is easier to set t_Co
then to find out where default terminal name is configured in all the terminal emulators I may use. Don’t issue any warnings if used colorscheme utilizes only first 8/16/88 colors.
Since the new plugin is Python based, it could possibly check if the font that is configured is patched, and automatically select whether to use fancy symbols or fallback symbols
Wondering how you are going to get this information out of the terminal.
…
Only if the whole thing is disablable. I don’t want to increase startup time to do things that produce no outcome: I already have plugin startup time highly increased by the script that allows parallel populating of history (histadd()
in a loop appears to be very slow in case called 20 thousand times: 0.7 seconds).
It would be better if all those checks are done only once in first session where new $TERM
was used unless there were some issues that time.
from powerline.
Allright, scratch the laststatus point. I agree that we should be careful with that one. Also you're correct about &t_Co
which we should check for vim. But what could we do with zsh/tmux themes to detect the terminal color capabilities?
Regarding the font stuff, it was just an idea I got while writing the issue, but yeah, it probably won't be possible. Would be cool if it was possible though. :)
I doubt that checking the contents of some env variables has a significant impact on startup time, but we could cache this info if it ends up delaying startup significantly.
from powerline.
But what could we do with zsh/tmux themes to detect the terminal color capabilities?
Don’t know anything about tmux, but in zsh colors work with incorrect $TERM
just like they work in vim. Won’t be an issue if it is disablable.
from powerline.
We should definitely check for Python support in vim when the plugin is loaded, I've already received a couple of e-mails and an issue from people who don't bother to read the docs and then run into errors with the python command.
from powerline.
The structure of the project has changed significantly since this issue was opened and I don't think that it will be necessary to do a lot of checks during startup. It would probably be better to add this info to the installation part of the docs.
from powerline.
Related Issues (20)
- No such file or directory (sometimes) HOT 1
- metadata-generation-failed when installing on on python 3.11/macOS 12 HOT 1
- setup fails for development version of tmux HOT 1
- Centre segments section HOT 1
- Logging test fail on python 3.8+
- Is it possible to set a highlight group for the environment variable segment? HOT 1
- Powerline doesn't working on Ubuntu 22.04.3 and bash
- Color and colorshemes override not working - gnome terminal - shell HOT 3
- powerline.segments.common.net.internal_ip HOT 2
- TMUX_VAR_RE does not use raw string, leading to SyntaxWarning with python 3.12
- powerline deprecation warning
- [feature] json schema support HOT 1
- The imp module is removed in Python 3.12 HOT 4
- Questions about Copilot + Open Source Software Hierarchy
- Questions about Copilot + Open Source Software Hierarchy
- does powerline works for csh HOT 4
- Terminal graphics don’t work correctly in Fedora 40 KDE HOT 2
- fuzzy_time segment prints "o'clock three" instead of "three o'clock" HOT 2
- Weather segment broken (Bad Yahoo Weather SSL Cert) in RHEL 9
- Apt package missing bash bindings HOT 1
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 powerline.