ohmyzsh / ohmyzsh

🙃 A delightful community-driven (with 2,400+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.
https://ohmyz.sh
MIT License
172.6k stars 25.83k forks source link

Highlight current theme in use with omz tool #9540

Closed leoheck closed 2 years ago

leoheck commented 3 years ago

omz theme list could mark the current theme in use, so it is easier to set it back to the previous one while experimenting with new themes. Or at least one command to do that would be nice, lets say omz theme current

SukkaW commented 3 years ago

echo $ZSH_THEME will show the current theme you are using. But it might be a good idea to add omz theme current.

leoheck commented 3 years ago

For instance, if you do the omz theme list the default theme could be in another color or with a small mark at the end like this

Here, for instance, I am indicating that 3den* is the theme in use.

Custom themes:
example

Built-in themes:
3den*           gallois         nicoulaj
adben           garyblessington     norm
af-magic        gentoo          obraun
afowler         geoffgarside        peepcode
agnoster        gianu           philips
alanpeabody     gnzh            pmcgee
amuse           gozilla         pygmalion
apple           half-life       pygmalion-virtualenv
arrow           humza           random
aussiegeek      imajes          re5et
avit            intheloop       refined
awesomepanda        itchy           rgm
bira            jaischeema      risto
blinks          jbergantine     rixius
bureau          jispwoso        rkj
candy           jnrowe          rkj-repos
candy-kingdom       jonathan        robbyrussell
clean           josh            sammy
cloud           jreese          simonoff
crcandy         jtriley         simple
crunch          juanghurtado        skaro
cypher          junkfood        smt
dallas          kafeitu         Soliah
darkblood       kardan          sonicradish
daveverwer      kennethreitz        sorin
dieter          kiwi            sporty_256
dogenpunk       kolo            steeef
dpoggi          kphoen          strug
dst         lambda          sunaku
dstufft         linuxonly       sunrise
duellj          lukerandall     superjarin
eastwood        macovsky        suvash
edvardm         maran           takashiyoshida
emotty          mgutz           terminalparty
essembeh        mh          theunraveler
evan            michelebologna      tjkirch
fino            mikeh           tjkirch_mod
fino-time       miloshadzic     tonotdo
fishy           minimal         trapd00r
flazz           mira            wedisagree
fletcherm       mlh         wezm
fox         mortalscumbag       wezm+
frisk           mrtazz          wuffers
frontcube       murilasso       xiong-chiamiov
funky           muse            xiong-chiamiov-plus
fwalch          nanotech        ys
gallifrey       nebirhos        zhann
leoheck commented 3 years ago

Actually, I am using something else. But this is not even listed there.

➜ echo $ZSH_THEME 
spaceship

So, is it possible to have these 3rdparty themes integrated into this command as well?

By the way, I installed this by following the instructions here. https://github.com/denysdovhan/spaceship-prompt

Maybe the instructions are not in compliance with the current OMZ.

mcornella commented 3 years ago

So, is it possible to have these 3rdparty themes integrated into this command as well?

We can only check for themes installed inside $ZSH_CUSTOM, doing otherwise is impossible. If you followed the oh-my-zsh instructions it should appear in omz theme list, under the Custom themes section.


I like the subtle way to indicate used theme. This shouldn't be that hard to implement, I'll give it a shot soon.

ttrezren commented 3 years ago

Is there a way to display which theme is currently displayed when the $ZSH_THEME value is "random"? I'm using random to audition a few themes.

mcornella commented 3 years ago

The random theme should display the chosen theme on startup, unless you set the ZSH_THEME_RANDOM_QUIET setting. You can echo $RANDOM_THEME any other time to check.

This should be checked by the CLI tool as well though. Mental note.

leoheck commented 3 years ago

Now my spaceship theme is being shown there, but it looks like something is not right there. There is this example, and the text on the right is not for the example I guess. image

mcornella commented 3 years ago

Looks like one is a symlink to the other. example is a theme file that has nothing in it.

leoheck commented 3 years ago

Ah, so this is the meaning! Got it, thanks.