Chrysostomus / manjaro-zsh-config

Zsh configuration package for manjaro
MIT License
124 stars 52 forks source link

Improve prompt #30

Closed romkatv closed 2 years ago

romkatv commented 2 years ago
  1. Generate a new p10k config with additional features and fixes from upstream.
  2. Allow users to customize prompt with p10k configure.
  3. Always use powerlevel10k. This gives users functionally the same prompt everywhere. Prompt differs among terminals only in presentation.
  4. Don't fork. Forking is slow.
  5. Use more robust detection of terminal capabilities.
  6. Always use zsh-autosuggestions and ensure that its style is within the terminal's capabilities.

Disclaimer: I'm the owner of https://github.com/romkatv/powerlevel10k.

yochananmarqos commented 2 years ago

@romkatv Thanks! I've applied this as a patch to our package with manjaro-zsh-config 0.21-2. It's is now available in the Manjaro unstable branch.

romkatv commented 2 years ago

That was fast! Thanks.

Chrysostomus commented 2 years ago

Thank you very much for the contribution, it is always a pleasure to work with the upstream!

romkatv commented 2 years ago

I just realized I introduced a bug here: USE_POWERLINE=false is no longer respected. https://github.com/Chrysostomus/manjaro-zsh-config/pull/31 fixes it. Sorry about that. I've tested it better this time.

yochananmarqos commented 2 years ago

Received some feedback on the forum. Not sure why it would have prompted him to reconfigure, it didn't for me.

romkatv commented 2 years ago

Received some feedback on the forum. Not sure why it would have prompted him to reconfigure, it didn't for me.

Ouch. Thanks for tagging me. I've asked for more info on the forum. At this point I don't have a theory what might have caused p10k configure to trigger.

Falav commented 2 years ago

Dump provided: dump.tar.gz

romkatv commented 2 years ago

@Falav Thanks! I reproduced this issue with your files. (For context: I've asked Falav in https://forum.manjaro.org/t/issues-with-latest-manjaro-zsh-config-update/90405/6?u=romkatv to post this dump here.)

@yochananmarqos Somehow updating this package resulted in the following structure:

/usr
└── share
    └── zsh
        └── p10k.zsh
            └── p10k.zsh

The leaf p10k.zsh has the same content as https://github.com/Chrysostomus/manjaro-zsh-config/blob/b6990f0b78d7610c84f494395fc7889f9f8a1e34/p10k.zsh. Why is it at /usr/share/p10k.zsh/p10k.zsh rather than /usr/share/p10k.zsh?

I also just realized that p10k-portable.zsh needs to be added to https://github.com/Chrysostomus/manjaro-zsh-config/blob/master/PKGBUILD. Can you do that or do you want me to send a PR?

romkatv commented 2 years ago

@yochananmarqos I think this change broke it. The trailing p10k.zsh needs to be removed from that line. Also, as I mentioned in the previous comment, p10k-portable.zsh needs to be installed alongside p10k.zsh.

pheiduck commented 2 years ago

@yochananmarqos I think this change broke it. The trailing p10k.zsh needs to be removed from that line. Also, as I mentioned in the previous comment, p10k-portable.zsh needs to be installed alongside p10k.zsh.

MR is created on gitlab: https://gitlab.manjaro.org/packages/community/manjaro-zsh-config/-/merge_requests/4/diffs

yochananmarqos commented 2 years ago

@romkatv Oops.

@pheiduck Thanks for fixing it. 0.21-5 is pushed to unstable now.

Falav commented 2 years ago

Following the forum thread, I tried to update to 0-22.2 version, but as my file /usr/share/p10k.zsh was already existing, the update aborted. Maybe a next version could handle a replacement/overwrite of an existing file.

yochananmarqos commented 2 years ago

@Falav Instruct Pacman to overwrite it or remove it manually first, that's not the job of a package manager.

Chrysostomus commented 2 years ago

Did you create file yourself, or did the package do that?

Falav commented 2 years ago

Between the initial restores, not sure... I'll do that, my zsh folder does not reflect the standard user one, now.