-
-
Notifications
You must be signed in to change notification settings - Fork 525
Add Starship Prompt Configuration to Replace Powerlevel10k Theme #514
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
Conversation
restore p10k load script
This should save up time loading it
|
updated and rebased |
|
I'm still learning starship. I want to copy the p10k look. I want to prove that starship can be customized this far. |
ofc it can! which p10k look you trying to recreate ? update: *any specific looks ? |
how dynamic ? XD
cehck out https://starship.rs/advanced-config/ |
|
wtw the gist is linked you is not updated i started working on it before you sent these screenshots! |
Already on it. It is called transient prompt. . And I don't think I can do this on my own. I am dumb. 😉. I don't know if we needed this https://github.com/akinomyoga/ble.sh, but it looks like this is bash? Edit2: Also so the time on the right side is called secondary prompt. Edit: I drafted it for now, I might accidentally click the merge. |
bruh!! we've seen your work! NEVER say that
yea transient prompt is popular! # .zshrc
eval "$(starship init zsh)"
set-long-prompt() { PROMPT=$(starship prompt) }
precmd_functions=(set-long-prompt)
set-short-prompt() {
if [[ $PROMPT != '%# ' ]]; then
PROMPT=$(starship module character)
zle .reset-prompt
fi
}
zle-line-finish() { set-short-prompt }
zle -N zle-line-finish
trap 'set-short-prompt; return 130' INTthis should work! |
XD what do you mean "accidentally" starship is 10k times better than p10k 😁😁 |
|
|
I felt like I will add Oh-my-posh too(soon ). I usually use OMP on my Raspi and some servers because of the bright colors by default.
|
well I personally rather write |
|
I suggest keeping at least 2, config files so that we can use them for a per-window-styling via export STARSHIP_CONFIG=~/.config/starship/xxxx.tomland I added docs for it in
yup! don't style it! nither in main |
oki |
I think update: I might have stolen |
function STARSHIP_TRANSIENT_PROMPT {
set-long-prompt() { PROMPT=$(starship prompt) }
precmd_functions=(set-long-prompt)
set-short-prompt() {
if [[ $PROMPT != '%# ' ]]; then
PROMPT=$(starship module character)
zle .reset-prompt
fi
}
zle-line-finish() { set-short-prompt }
zle -N zle-line-finish
trap 'set-short-prompt; return 130' INT
}
function NO_STARSHIP_TRANSIENT_PROMPT {
set-long-prompt() { PROMPT=$(starship prompt) }
precmd_functions=(set-long-prompt)
set-short-prompt() {
if [[ $PROMPT != '%# ' ]]; then
PROMPT=$(starship module character)
fi
}
zle-line-finish() { set-short-prompt }
zle -N zle-line-finish
trap 'set-short-prompt; return 130' INT
}
this way instead of long block of code in zshrc you can just add a one-liner. Can we add this fucntionsin zshenv? |
|
good job bro 😁
?? and this is getting too long do you want to continue on discord LOL ?! |
It's almost ready. ahha my laptop is lagging so won't open discord for now.
Yeah, if this is a good approach. so that in your # Starship's transient prompt
# NO_STARSHIP_TRANSIENT_PROMPT # Disable transient prompt |
it certainly is, so functions in .zshenv and |
Yup, I think so. |
|
wait @kRHYME7 where in if command -v starship &> /dev/null; then
eval "$(starship init zsh)"
export STARSHIP_CACHE=~/.starship/cache
export STARSHIP_CONFIG=~/.config/starship/starship.toml
function STARSHIP_TRANSIENT_PROMPT {
set-long-prompt() { PROMPT=$(starship prompt) }
precmd_functions=(set-long-prompt)
set-short-prompt() {
if [[ $PROMPT != '%# ' ]]; then
PROMPT=$(starship module character)
zle .reset-prompt
fi
}
zle-line-finish() { set-short-prompt }
zle -N zle-line-finish
trap 'set-short-prompt; return 130' INT
}
function NO_STARSHIP_TRANSIENT_PROMPT {
set-long-prompt() { PROMPT=$(starship prompt) }
precmd_functions=(set-long-prompt)
set-short-prompt() {
if [[ $PROMPT != '%# ' ]]; then
PROMPT=$(starship module character)
fi
}
zle-line-finish() { set-short-prompt }
zle -N zle-line-finish
trap 'set-short-prompt; return 130' INT
}
fi
right? and I'll get ridof lualine preset! P.S : |
|
And here we are chatting like in Discord. 🤣 |
|
Well I give up LOL
I tried to modify to : function starship_transient_prompt {
local enabled=$1
set-long-prompt() {
PROMPT=$(starship prompt)
}
precmd_functions=(set-long-prompt)
set-short-prompt() {
if [[ $PROMPT != '%# ' ]]; then
PROMPT=$(starship module character)
if [[ $enabled == true ]]; then
zle .reset-prompt
fi
fi
}
zle-line-finish() { set-short-prompt }
zle -N zle-line-finish
trap 'set-short-prompt; return 130' INT
}
# starship_transient_prompt true
# starship_transient_prompt false to avoid calling it twice in case of I'll update the rest, tho :) |
|
so to keep you updated, starship_transient_prompt() {
local enabled=${1:-true}
if [[ "$enabled" == "true" ]]; then
set-long-prompt() { PROMPT=$(starship prompt) }
precmd_functions=(set-long-prompt)
set-short-prompt() {
if [[ $PROMPT != '%# ' ]]; then
PROMPT=$(starship module character)
zle .reset-prompt
fi
}
zle-line-finish() { set-short-prompt }
zle -N zle-line-finish
trap 'set-short-prompt; return 130' INT
#WARN: I HATE BASH! REMOVE THIS LINE WHEN YOU'RE DONE TESTING
echo "Transient prompt enabled"
else
typeset -f set-long-prompt >/dev/null && unset -f set-long-prompt
typeset -f set-short-prompt >/dev/null && unset -f set-short-prompt
precmd_functions=("${(@)precmd_functions:#set-long-prompt}")
zle -D zle-line-finish 2>/dev/null
trap - INT
PROMPT=$(starship prompt)
#WARN: I HATE BASH! X2 REMOVE THIS LINE WHEN YOU'RE DONE TESTING
echo "Transient prompt disabled"
fi
}
I seems to be working! but honestly! I feel like the code block in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the Powerlevel10k theme with new Starship prompt configurations, offering a range of customizable styles and simplified prompt initialization.
- Added multiple Starship configuration files (including starship.toml and powerline.toml) with customized formatting for various modules.
- Updated prompt initialization in shell configuration to support dynamic paths and refined visual elements.
Reviewed Changes
Copilot reviewed 2 out of 7 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Configs/.config/starship/starship.toml | Main Starship configuration with custom modules and formatting options |
| Configs/.config/starship/powerline.toml | Alternative prompt configuration mimicking Powerline style |
Files not reviewed (5)
- Configs/.zshenv: Language not supported
- Scripts/pkg_core.lst: Language not supported
- Scripts/pkg_extra.lst: Language not supported
- Scripts/restore_cfg.lst: Language not supported
- Scripts/restore_cfg.psv: Language not supported
kRHYME7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your patience @prime-run
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the existing Powerlevel10k theme with new Starship prompt configurations and updates the corresponding configuration files to enhance and simplify the shell prompt setup for Zsh.
- Introduces several new Starship configuration files (starship.toml, powerline.toml, etc.).
- Updates prompt initialization in .zshrc and disables outdated Powerlevel10k initialization in .zshenv.
Reviewed Changes
Copilot reviewed 2 out of 7 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Configs/.config/starship/starship.toml | New Starship prompt configuration with various modules and formatting options |
| Configs/.config/starship/powerline.toml | New Powerline-style configuration using Starship prompt sections |
Files not reviewed (5)
- Configs/.zshenv: Language not supported
- Scripts/pkg_core.lst: Language not supported
- Scripts/pkg_extra.lst: Language not supported
- Scripts/restore_cfg.lst: Language not supported
- Scripts/restore_cfg.psv: Language not supported









Pull Request
Description
This pull request introduces updates to the configuration files to enhance the shell prompt experience using straship (#491). The following changes are included:
New Starship Prompt Configurations:
brackets.tomlheavy-right.tomllualine.tomlpowerline.tomlstarship.tomlReplacement of Powerlevel10k Theme:
STARSHIP_CACHEandSTARSHIP_CONFIGare now supported.Updates to
.zshrc:Improvements to
.zshenv:Benefits:
Type of change
Please put an
xin the boxes that apply:Checklist
Please put an
xin the boxes that apply:Screenshots
Additional context