by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Christo Kotze
@onaforeignshore
How is left_ws, middle_ws and right_ws determined on Next?
Christo Kotze
@onaforeignshore
Can't find anywhere that they are declared, only where they are used
Javier Fernández
@WyRe
hi everyone, when I'm on tty and your theme is sourced LC_CTYPE is not set, and I think that's wrong, I don't know if that is a misconfigured theme or is an upstream bug
how can I figure out?
I think it could be an upstream bug, cause when I remove all config options from my .zshrc but I keep the powerlevel9k source I still get that blank LC_CTYPE in tty
I'm using Arch Linux, I was talking about this with Arch Linux people in IRC and they say this is not normal, LC_CTYPE should be set even in tty
Roman Perepelitsa
@romkatv

@WyRe You mentioned that if you DO source powerlevel9k, then LC_CTYPE is not set. What happens if you DON'T source powerlevel9k? Is LC_CTYPE set in this case?

they say this is not normal

If you are talking about LC_CTYPE environment variable, it's absolutely normal and very common for it to not be defined whether you are in a TTY or not. Unless you explicitly set LC_CTYPE somewhere (most people don't do this), it won't be defined.

Javier Fernández
@WyRe
@romkatv obviously I do. When I don't source p9k the locale output is fine, and LC_CTYPE is defined. With p10k I have not this issue
yes, I'm talking about LC_CTYPE env var. And people in #archlinux freenode channel do say this is wrong
you can see here how we generate the locale in Arch https://wiki.archlinux.org/index.php/Locale
Roman Perepelitsa
@romkatv

@WyRe

With p10k I have not this issue

Thanks, this is useful to know. Curious, why do you care about p9k then?

And people in #archlinux freenode channel do say this is wrong

What exactly do they say is wrong? It's definitely not wrong nor unexpected to have undefined LC_CTYPE. It is, in fact, undefined on archlinux by default. It's easy to test. Let's spin up arch and see what we get.

% docker run -it --rm archlinux/base bash
[root@c2ef4adaec6c /]# echo ${LC_CTYPE:-not set}
not set
[root@c2ef4adaec6c /]# echo ${LANG:-not set}
en_US.UTF-8
[root@c2ef4adaec6c /]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

As you can see, LANG is defined while LC_CTYPE isn't. I keep it this way and I suspect that most users do the same.

However, what archlinux does is moot. If powerlevel9k is unsetting LC_CTYPE, it's a bug in powerlevel9k because it's obviously not supposed to change environment variables. You can easily verify this by typing zsh -f, then echo $LC_CTYPE, source path/to/powerlevel9k.zsh-theme and another echo $LC_CTYPE.

Javier Fernández
@WyRe
@romkatv well, I don't know too much about env vars, but yes, they say something like LC_CTYPE is not explicitly set but it takes its value from LANG
the point is ... when I use p9k in a tty the 'locale' output shows a LC_CTYPE empty
Roman Perepelitsa
@romkatv

@WyRe

well, I don't know too much about env vars, but yes, they say something like LC_CTYPE is not explicitly set but it takes its value from LANG

If they mean LC_CTYPE category of locale, this is obviously true (not just on archlinux but everywhere).

the point is ... when I use p9k in a tty the 'locale' output shows a LC_CTYPE empty

So the environment variable LC_CTYPE does not get unset by powerlevel9k but LC_CTYPE category of locale does? Can you verify it by typing the following, one command at a time?

  1. zsh -f
  2. locale | grep LC_CTYPE
  3. source path/to/powerlevel9k.zsh-theme
  4. locale | grep LC_CTYPE

If (2) and (4) produce different output, open a bug against powerlevel9k. It's unlikely to get any attention but it shouldn't affect you because you know about the existence of powerlevel10k, which, according to your earlier comment, doesn't have this bug.

Javier Fernández
@WyRe

@romkatv when I do your steps (2) and (4) does produce the same output, but if I do

  1. Comment source line inside .zshrc
  2. Go to tty3, login and locale | grep LC_CTYPE
  3. source path/to/powerlevel9k.zsh-theme
  4. locale | grep LC_CTYPE

then I get a different output in (2) and (4); in fact the output in (4) is empty.

Roman Perepelitsa
@romkatv
@WyRe OK.
mike-k0
@mike-k0
Is there a way to copy the contents of the zsh terminal with it coming out cleanly? Currently get weird ? symbols, guess it's kind of because of the glyphs I have on my font
Roman Perepelitsa
@romkatv

@mikek2

Is there a way to copy the contents of the zsh terminal with it coming out cleanly?

There is, but it's not easy. If you want your prompt to look decent once you copy-paste it, you need to restrict the choice of glyphs to those found in most fonts. Absolutely avoid glyphs with code points from Private Use Area (from U+E000 to U+F8FF) as those are by definition font-specific and non-portable. The triangles in your prompt (U+E0B0) fall within Private Use Area, so they turn into question marks or some other weird thing when viewed with most fonts. Also try to limit the use of emojis. For example, ⚙ (Gear Emoji, U+2699) that's used by Powerlevel9k as a "compatible" (a.k.a. portable) glyph is missing from many modern terminal fonts.

mike-k0
@mike-k0
Well I don't actually want the glyphs and stuff to copy over
I'd be fine if those emojis or images came out as blanks or something
mike-k0
@mike-k0
Basically like once it gets copied to the clipboard anything that isn't ascii or something would be gotten rid of
I guess... a filter
Roman Perepelitsa
@romkatv
@mikek2 Are you asking for help writing a script to remove non-ascii symbols from your clipboard? It shouldn't be difficult and it's doesn't require any knowledge of powerlevel9k or zsh. Or am I misunderstanding what you are saying?
mike-k0
@mike-k0
Well, originally I was just interested in being able to copy what was in my terminal to say a file to share with someone else (for example). Due to the font I'm using that would result in unintended ? symbols being pasted over. It looks like a scenario where non-ASCII characters aren't copied over should theoretically work...
I already use a plugin in a text editor (Sublime Text 3) that removes non-ascii characters on selection, I was just wondering if I could somehow skip that step altogether.
François Loupias
@fralps

Hi there,

I have a problem with the display of arrows

Syphdias
@Syphdias
@fralps Could you go into a bit more detail? If you are talking about a missalignment of the segment separator it is usually the font that is at fault. If you don't see the the proper symbols it can be the font selection of your terminal as well or a wrongly set locale. Did you search in the open and closed issues for your problem?
Hebgbs
@Hebgbs
Awww, @romkatv why'd you delete your own config from the wiki?
Roman Perepelitsa
@romkatv
@Hebgbs I deleted Pure Power config because Lean style in the configuration wizard is better. Unlike Pure Power, Lean doesn't work with p9k
Hebgbs
@Hebgbs
Understandable. (But the innuendo in it was top notch.)
Adam Ben-David
@AdamBD
hi all can you customize the delimeters in this prompt?
i want to remove the full colored blocks and go with something more minimal looking
Joseph Campos
@Thutm
Yeah you are able to customize most everything. There are a whole list of configs on the README: https://github.com/Powerlevel9k/powerlevel9k/wiki/show-off-your-config
A lot of the “minimal” prompts have blank delimiters or just use spaces there.
Also if you set the segment “background” to “clear” that will help minify things a bit.
Joseph Campos
@Thutm
Just an FYI those sample configurations are probably a little old, and may have references to older env variables. Most var’s were shortened to P9K_ at one point.
Joseph Campos
@Thutm
There is an example
image.png
Joseph Campos
@Thutm
Anyone use the pyenv segment? Wanting to get some feedback before I look into extending that segments functionality… So, generally when i’m outside of a git repo I usually don’t need to display py version so having it ignore ‘system’ verison is fine. When i’m in a git repo though I usually like to see what py version i’m at, even if its the same as the system version. I was thinking of either adding a flag that would always display py version if your inside a git repo. Or just always display version set in .python-version file if exists. I usually always lock my git repo’s to a version (even if its same as system) so just overriding version display with if .python-version is okay for me.
Ben Hilburn
@bhilburn
@/all - Hi everyone! This probably isn't a surprise to many, but I have just marked P9k as deprecated and unmaintained. I'm very proud of what P9k achieved, and it's legacy continues in @romkatv's incredible work on P10k. If you haven't already, please migrate to P10k. Happy hacking :)
Santiago
@Guisanpea
Happy to see that you have done a good job. You can be proud for making a tool that a lot of people have used for thousand of hours :)
Joseph Campos
@Thutm
@bhilburn Sad to see it go. Thanks for all the fish!
Roman Perepelitsa
@romkatv
Picking up the torch. Humbled and honored.
Roman Perepelitsa
@romkatv

@Thutm There are several additional options in p10k for pyenv. This might work for you:

POWERLEVEL9K_PYENV_SOURCES=(shell local)
POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=true
POWERLEVEL9K_PYENV_SHOW_SYSTEM=true

This will display the output of pyenv version-name if and only if there is .python-version in the current directory or above, or PYENV_VERSION is set.

Joseph Campos
@Thutm
ah, thanks!
Clarence "Sparr" Risher
@sparr
before running p10k configure, the default prompt included git status for my ~ (which is a git repo). after, I get git status in my prompt for any other git repo, but not for ~. What might have caused this change?
Roman Perepelitsa
@romkatv
@sparr See faq. In the future please either file an issue against powerlevel10k or ask on powerlevel10k gitter. Powerlevel9k and powerlevel10k are two independent projects.
Clarence "Sparr" Risher
@sparr
oh. I did scroll up and see other discussion of p10k before asking here
Clarence "Sparr" Risher
@sparr
sorry