Powerlevel10k breaks virtual console prompt

I’ve wanted the virtual consoles to look like my regular terminal, so I read a bit about zsh, Konsole and powerlevel10k.

Using p10k configure created ~/.p10k and changed ~/.zshrc to source it.
(Its largely similar to /usr/share/zsh/p10k.zsh - except for the segment separators and prompt newlines)

As zsh - unlike bash - by default loads .zshrc for login sessions that is also applied to the virtual console.

Basically what I wanted.
But because if the limited font of the virtual console the prompt isn’t rendered properly - it’s all the wrong special characters, not at all looking like a prompt should… (At least I assume that’s the cause from what I’ve read)

Google and the forums search didn’t turn up anything regarding this - which I found a bit strange, given that this is indicated to be the way to customize p10k on Manjaro here.
Surely others must have had this behaviour?

With what I’ve found, getting the virtual console to render a rainbow style prompt correctly seems impossible due to the font limitations of the virtual console. Can anyone confirm this or point me in the right direction?

So the only solution I currently can think of is setting some variable in .zprofile - which is only processed for login shells - and having .zshrc ignore config sections based on that variable.
But that feels rather hacky. Is there a better way of having a custom prompt for my terminals, while having another for the virtual console?

Hi @jaramo,

From what I’ve read, this isn’t really possible. From https://www.reddit.com/r/archlinux/comments/ba4gw2/how_do_i_get_glyphsicons_on_a_console_only/ :

assuming console = tty, this probably wont be possible. unix console’s are relics of a bygone era when screens weren’t drawn using pixels, but instead printed line by line to a teleprinter or “tele-type” machine which printed the output line by line on paper.

the tl;dr for your question is that the fonts used in it aren’t fonts like the ones you use in X. Instead, they’re a set of 256 (or 512 if you only want to use 8 colors instead of 16) special pre-compiled glyphs that draw directly on the vga framebuffer. The memory space available to these is super limited, and as such you cannot “add characters” without removing others from Code page 437 - Wikipedia or whatever your code page is.

see: Linux console - ArchWiki for the full explanation

So I’d say, just remove all your customizations…

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.