-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use in P9K Theme? #12
Comments
|
Hi, Am an noob to zsh and powerline themes. I stumbled over https://github.com/ryanoasis/powerline-extra-symbols and wanted to know how can i setup the Fire/Flame theme. This is my current terminal view: I am on oh my zsh, powerline10k and nerd font/hack. Your help is much appreciated! Thanks, |
I used prezto, but I believe the line I posted above
goes in your |
@badummtss @Hub-K Did that fix it for you guys? You might also want to set |
Nop, i tried using it with no avail.
is there any preconditions or steps i need to do/install to make this thing work. From what i understand, patched fonts like Hacker Font Regular by NerdFonts should include those separators. |
Alrighty. First off, p10k uses I will need a ton of info to tell what's going wrong. Please bear with me and paste all of this in, I don't know where the problem is, so I'll need to make sure everything is up-to-date and configured correctly.
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\UE0C0'
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\UE0C2'
POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\UE0C1'
POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\UE0C3' Rember to write the file to disk (save it) before looking for a change. In addition, you'll need to open a new terminal window, as Overall tips that led me to ask for this:
Also, disclaimer, I'm not the maintainer (of any of the involved projects), I just happen to have some experience with the subject at hand. |
|
Hm. iTerm is certainly doing a better job of rendering your prompt, but neither of them are picking up on your config. Did you try restarting your computer? Also, you might try moving the Oooh! What if -- do you have a |
Yes, that is definitely a step in the right direction. If so, what you're going to want to do is open that file and make all of your edits there. The comments explain things pretty well and I've been able to customize mine just with the comments and the find feature of my editor. Plus, you won't have any If not, keep making the adjustments in your But as for making the prompt look exactly like the maintainers, I'll tag him for you. And in case he doesn't have a definitive answer (this was like several months ago, if not more, that he made the picture), here are some ideas: for i in {0..255}; do print -Pn "%${i}F${(l:3::0:)i}%f " ${${(M)$((i%8)):#7}:+$'\n'}; done to generate your colormap. For me, the firey-est colors are 001, 005, 003, 009, 124, 160, 196, 226. That might be different for you. POWERLEVEL9K_DIR_BACKGROUND
POWERLEVEL9K_OS_ICON_BACKGROUND and perhaps POWERLEVEL9K_TIME_BACKGROUND
POWERLEVEL9K_STATUS_OK_BACKGROUND to those colors. Along with any others that might show up from time to time, such as: POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND
POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND And a whole ton of other possible segments. Like so many, it boggles the mind how this theme could possibly have been written. POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\UE0C0'
POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\UE0C2' and you'll have more fire! Next, you'll need to fork p10k. You'll have to remember to keep to up to date with regular rebases or merges (or make a regularly run script [i.e. via So now you have a fork and know where the directory segment is coming from internally. Then you'll need to take that text that's getting shipped off to the directory segment and intercept it with some pipes. These should pipe it through some commands to find any forward slashes and replace them with the fire character. My *nix-command-line-fu is very google-reliant, so I'm not sure what commands you'd need to do this. I wouldn't know until I tried. Sound like a lot of work? It certainly is. Unless someone publishes their config, trying to replicate it is gonna be hard. |
You are awesome @extremepayne, Here is my config:
Remaining issues:
Thanks a million |
Thanks!
Try adding a space. Before the Unicode, I think. You also might want one afterward on the left side.
So figure out what the segment is called. In this case, it's both COMMAND_EXECUTION_TIME and TIME. Then change Also, I see you've got a transparent background--iTerm2 has a specific setting to make powerline characters look better with transparency. "Keep background colors opaque" in profiles. See if you like it. Lastly, and I should have mentioned this earlier, the docs that led me to be so knowledgeable about powerlevel9k/10k are here: https://github.com/Powerlevel9k/powerlevel9k/blob/master/README.md#prompt-customization |
@extremepayne you are a genius, thanks for helping and bearing with me through all the process, u da b3st. |
This should work: # User-define prompt segment: my_fire_dir.
# It's a good idea to prefix your segments with `my_` to
# avoid clashes with future versions of powerlevel10k.
function prompt_my_fire_dir() {
emulate -L zsh
local split_path=(${(s:/:)${(%):-%~}//\%/%%})
(( $#split_path )) || split_path+=/
if (( $#split_path == 1)); then
p10k segment -s SOLO -b 160 -f 255 -t $split_path
return
fi
p10k segment -s FIRST -b 209 -f 255 -t $split_path[1]
shift split_path
while (( $#split_path > 1 )); do
p10k segment -s EVEN -b 202 -f 255 -t $split_path[1]
shift split_path
(( $#split_path > 1 )) || break
p10k segment -s ODD -b 209 -f 255 -t $split_path[1]
shift split_path
done
p10k segment -s LAST -b 160 -f 255 -t $split_path[1]
}
typeset -g POWERLEVEL9K_MY_FIRE_DIR_LEFT_SEGMENT_SEPARATOR='\uE0C0'
typeset -g POWERLEVEL9K_MY_FIRE_DIR_{LAST,SOLO}_{LEFT_SEGMENT_SEPARATOR,LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL}='\uE0C0'
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(my_fire_dir) If you've never used Some details about |
I playing with zsh, because of changing my terminal from bash to zsh.
I found this in https://medium.com/@oldwestaction/beautifying-your-terminal-with-zsh-prezto-powerlevel9k-9e8de2023046.
But i have no idea how to use it.
I like the flames and want to use them in my theme.
At the moment it looks like this:
i want to change alle the left sided indicators with it, but i can't found a solution for it (trying out some fonts, without success.
I hope someone can help me out...
The text was updated successfully, but these errors were encountered: