Closed csfh closed 3 months ago
I like the idea of this. And having a curated set of default prompts to pick from too. I like mine super minimal, and leaning on zellij for path, but I think it's a great place for some personalization too. Please do explore.
If allowed to suggest an alternative, I really liked + using: https://starship.rs which looks to have similar targets with Oh My Posh, "to work with any shell".
Yeah I use starship and I think it could go very well with omakub. Specially if the themes get changed for it as well
did the same on my custom post-omakub template
curl -sS https://starship.rs/install.sh | sh
starship preset pure-preset -o ~/.config/starship.toml
did the same on my custom post-omakub template
curl -sS https://starship.rs/install.sh | sh starship preset pure-preset -o ~/.config/starship.toml
This is the uninstall:
# Locate and delete the starship binary
sh -c 'rm "$(command -v 'starship')"'
Plus removal from shell configuration
Source: https://starship.rs/faq/
I explored Starship at length, but never did come up with a prompt that felt worth the space it took up when running under Zellij where the path is in the pane. If someone wants to propose some potential prompts that don't feel redundant like that, I'd be happy to consider, though.
I don't like (force of habit probably) having to read the path in the pane, the pure implementation seems very ok to me!
If one wants to remove path:
format = '$all'
# Which is equivalent to
format = """
$username\
$hostname\
$localip\
$shlvl\
...
Can use format
and remove $directory\
Tried:
Above can be achieved with the following configuration:
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
$vcsh\
$fossil_branch\
$fossil_metrics\
$git_branch\
$git_commit\
$git_state\
$git_metrics\
$git_status\
$hg_branch\
$pijul_channel\
$docker_context\
$package\
$c\
$cmake\
$cobol\
$daml\
$dart\
$deno\
$dotnet\
$elixir\
$elm\
$erlang\
$fennel\
$gleam\
$golang\
$guix_shell\
$haskell\
$haxe\
$helm\
$java\
$julia\
$kotlin\
$gradle\
$lua\
$nim\
$nodejs\
$ocaml\
$opa\
$perl\
$php\
$pulumi\
$purescript\
$python\
$quarto\
$raku\
$rlang\
$red\
$ruby\
$rust\
$scala\
$solidity\
$swift\
$terraform\
$typst\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
$gcloud\
$openstack\
$azure\
$nats\
$direnv\
$env_var\
$crystal\
$custom\
$sudo\
$cmd_duration\
$line_break\
$jobs\
$battery\
$time\
$status\
$os\
$container\
$shell\
$character"""
# Inserts a blank line between shell prompts
add_newline = true
# Replace the '❯' symbol in the prompt with '➜'
[character] # The name of the module we are configuring is 'character'
success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
# Disable the package module, hiding it from the prompt completely
[package]
disabled = true
[line_break]
disabled = true
[battery]
full_symbol = "• "
charging_symbol = "⇡ "
discharging_symbol = "⇣ "
unknown_symbol = "❓ "
empty_symbol = "❗ "
[erlang]
symbol = "ⓔ "
[nodejs]
symbol = "[⬢](bold green) "
[pulumi]
symbol = "🧊 "
[typst]
symbol = "t "
[python]
format = "[$virtualenv]($style) "
[git_branch]
format = "[$symbol$branch(:$remote_branch)]($style)"
Going to be taking a closer look at this issue this weekend. Really appreciate the conversation.
Yeah, it's fully customizable. No need to see anything you don't like. Personally I think the most potential is in the theming aspect, specially in sync with the color scheme scripts
I'd support if anyone else wants to attempt integrating either omp or starship. The key integration point being changing along with the themes of omakub.
I can give a stab at starfhish with everything except theming. I can write here a small gap analysis of what I believe should be done.
I like what starship is doing, but I don't see any default prompt that I'd prefer to have in Omakub. So I think we should just leave this as something that people can pursue themselves. We could add a pointer to the docs, though.
I have a PR already to customize prompts but I figured it may be a lot of ground to cover for us to satisfy everyone in an easy way.
Just like mise is an all-in-one option for installing various language runtimes and compilers, Oh My Posh has the potential to do the same but for prompt. Of course with some beautiful, sane and curated defaults.
https://ohmyposh.dev