What is this
Posh2K is a prompt for oh-my-posh, it works on all shells, has multiple segments with aesthetically pleasing colors.
Inspiration
Most of my workflow is based on the command line, recently I had to use a Windows system for some work and was really displeased by the CLI experience.
So, I needed a prompt that can work across shells and has support for different segments and Posh2K was born.
Prerequisites
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of oh-my-posh
Getting Posh2K
To get Posh2K, follow these steps:
git clone https://github.com/2kabhishek/Posh2K
# for Powershell, add this to $Profile
oh-my-posh init pwsh --config ~/PATH_TO_DIR/Posh2K/posh2k.omp.json | Invoke-Expression
# for Zsh, add this to ~/.zshrc
eval "$(oh-my-posh init zsh --config ~/PATH_TO_DIR/Posh2K/posh2k.omp.json)"
# for Bash, add this to ~/.bashrc
eval "$(oh-my-posh init bash --config ~/PATH_TO_DIR/Posh2K/posh2k.omp.json)"
# for Fish, add this to ~/config/fish/config.fish
oh-my-posh init fish --config ~/PATH_TO_DIR/Posh2K/posh2k.omp.json | source
# for nu shell, run
oh-my-posh init nu --config ~/PATH_TO_DIR/Posh2K/posh2k.omp.json
source ~/oh-my-posh.nu
# for cmd, install Clink, then add this
load(io.popen('oh-my-posh init cmd --config ~/PATH_TO_DIR/Posh2K/posh2k.omp.json'):read("*a"))()
Repo
2KAbhishek / posh2k
Universal prompt for Power users πͺπ
What is this
posh2k is a prompt for oh-my-posh, it works on all shells, has multiple segments with aesthetically pleasing colors.
Inspiration
Most of my workflow is based on the command line, recently I had to use a Windows system for some work and was really displeased by the CLI experience.
So, I needed a prompt that can work across shells and has support for different segments and posh2k was born.
Prerequisites
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of oh-my-posh
Getting posh2k
To get posh2k, follow these steps:
git clone https://github.com/2kabhishek/posh2k
# for Powershell, add this to $Profile
oh-my-posh init pwsh --config ~/PATH_TO_DIR/posh2k/posh2k.omp.json | Invoke-Expression
# for Zsh, add this to ~/.zshrc
eval "$(oh-my-posh init zsh --config ~/PATH_TO_DIR/posh2k/posh2k.omp.json)"
# for Bash, add this to
β¦Hit the οΈβ€οΈ button if you found this useful.
Follow me on Twitter | Linkedin | Instagram to stay in touch.
Top comments (17)
Honestly, after using this for quite a while, this is REALLY AWESOME. Because sometimes when the branch is master or main, I can just glance up to the terminal to see which branch I have to commit to, making this extremely useful. Thanks!
yup, you also get indicators for language versions, env settings and even much more if you customize custom sections, sky is the limit!
I assume you don't run this. But where do you add this thing? πππ πΆβπ«οΈ
I am using cmd, installed clink, installed oh-my-posh, but have no idea where to add this line of code
You are right, I don't use cmd/clink but it should have options to write configs in lua
AH I THINK I GOT IT
oh no actually windows 11 can't really change anuthing to settings π± lmao I think I'm going to die wait a sec need to do more digging
the code below is incomprehensible to my knowledge
erm... ok one question for you, where did you actually get the line of code for clink and cmd? To add it? (in which case, I am saying, if you have any documentation maybee it's better to link it on the readme hehehehudhfedhe ok sorry I'll do more digging)
ohmyposh.dev/docs/installation/prompt ah I see, I guess I am dumb as heck to not read the official docimentation after all
No worries, glad you figured it out
Also I'd suggest not to use CMD unless you really have to, Powershell is much better comparatively
agreed. But my main terminal at the time was cmd, but switching over wasn't that bad lol.
Hey, may I know how do you connect your spotify?
Sadly I have only been able to make it work on windows.
Just by using the Spotify app.
so you have a windows computer and a macos pc? I think that explains it. Thanks!
OOOOhhh fancy π₯
Thanks man! I hope you tried it