![]() I appreciate the work everyone is doing here. My input is just one anecdote, so take it with a grain of salt. Why turn the prompt into a junk drawer of missing features when Warp could actually add them natively? Beyond git and language/framework info, what else do people need to know? Googling around for custom prompts, it seems like it boils down to knowing who you are (username) and where you are (directory, git status, host name/address). My point is, custom prompts are historically a first recourse for plugging holes in terminal functionality. Its visibility could even be toggled by the user. This compatibility info could live somewhere else in the UI, e.g. Perhaps a custom prompt isn’t needed at all. Here’s what my Starship prompt looks like: The output cannot be rendered anywhere without that font. I don’t even use the nerd fonts, which hack a proliferation of ephemeral technology icons into some ostensibly less used Unicode characters. That’s the only reason I still use Starship. Super stoked about speaking at #KubeCon EU in May □įrom Monitoring to Observability: Left Shift your SLOs with ChaosĬome and say hi, in person □ #o11ylove only thing I need out of a custom prompt beyond git info is some language/framework compatibility info. One step further to my KubeCon EU talk in May 2022 :-) You can find the full configuration in my dotfiles project.Ī clear terminal representation is helpful for workshops and live demos during talks, allowing participants to follow more easily. Also, when the command returned an error which is reflected with printing the exit code.Ĭommands can also take a while to execute (or to study the git diff output), which is represented with the 10s and 4s yellow text in the screenshot. If there are uncommitted changes, the prompt looks different. Command syntax highlighting (this is new for me too).Time (a good reminder that it's too late □).Typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION=$'' Typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 Typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 Second, uncomment the POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION variable and set its value to the GitLab FontAwesome icon in hex format $''. Typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( Fill it with the most important segments. # The list of segments shown on the left. p10k.zsh configuration file.įirst, uncomment the os_icon in the POWERLEVEL9K_LEFT_PROMPT_ELEMENTS variable: $ vim $HOME/.p10k.zsh Since I only use macOS, I decided to look for an alternative default icon: The GitLab Tanuki which I found available in the NerdFonts cheatsheet.Ĭopying the hex code, and reading about the correct syntax for setting the OS_ICON variable helped modify the. I liked the context separator line, and colorful blocks in the interface. I went with Light Rainbow theme to see how it goes. In case you closed it, run the following command: p10k configure Customizing my theme was a breeze, really. Powerlevel10k has an awesome wizard which walks you through the steps, and also shows different UI examples. The first run of Powerlevel10k also prompts with the configuration wizard described next. $ git clone -depth=1 $/themes/powerlevel10k The environment variable is automatically set after installing Oh-My-ZSH. Next, clone the theme into the $ZSH_CUSTOM/themes directory. Double-click them to install, and navigate into the iTerm2 preferences into Preferences > Profiles > Text > Font and search for MesloLGS NF in the dropdown. Powerlevel10kįollow the installation instructions and download the font files. I'm using a Brewfile to manage the installation. Install additional ZSH goodies with Homebrew for auto-completion and syntax highlighting: $ brew install zsh-completions zsh-syntax-highlighting If you haven't installed Oh-My-ZSH yet, follow the documentation and my dotfiles customizations and aliases. In this blog post, we'll walk through Oh-My-ZSH, Powerlevel10k, and its installation and configuration, including an icon override and more. ![]() Recently I came around Powerlevel10k and wanted to try it, mainly because it has an "instant prompt" feature - I had experienced slow loading times with pyenv and rbenv. I have been using the Spaceship prompt with Oh-My-ZSH for a while, but never really bothered with changing the configuration. Terminal integrations and themes help with a clear UX, CLI command details, and information on the current versions, name, and path, for example showing the Git branch or not-committed changes.
0 Comments
Leave a Reply. |