New prompt

This commit is contained in:
Ian Keane 2025-06-28 11:20:12 -04:00
parent 6f38b9f2bc
commit d7285aa85d

View file

@ -52,20 +52,155 @@ This file contains all configurations across all my machines. Well, most of them
** TODO Autojump ** TODO Autojump
** TODO Atuin ** TODO Atuin
** Fish ** Fish
OMF must be installed separately (nix package for this is broken) Fish shell configuration using starship prompt.
- =curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish=
- =omf install pie= *** Main Configuration
- remove fortune line from .local/share/omf/themes/pie/fish_greeting.fish
#+begin_src fish :tangle ~/.config/fish/config.fish #+begin_src fish :tangle ~/.config/fish/config.fish
fish_vi_key_bindings fish_vi_key_bindings
omf theme pie
# Initialize starship prompt
starship init fish | source
#+end_src #+end_src
*** Mode Prompt
Disable default mode indicator since starship handles it
#+begin_src fish :tangle ~/.config/fish/functions/fish_mode_prompt.fish #+begin_src fish :tangle ~/.config/fish/functions/fish_mode_prompt.fish
function fish_mode_prompt function fish_mode_prompt
end end
#+end_src #+end_src
*** Starship Prompt
Configure the starship prompt appearance and behavior
#+begin_src toml :tangle ~/.config/starship.toml
# Multi-line prompt with project context
format = """
[╭─](bold blue) $directory\
$fill\
$git_branch$git_status$kubernetes$python$nodejs$rust$golang$docker_context
[╰─](bold blue)$character"""
# Add fill module for right alignment
[fill]
symbol = " "
style = "bold blue"
# Directory display with single-letter truncation
[directory]
style = "bold white"
truncation_length = 1
truncate_to_repo = true
fish_style_pwd_dir_length = 1
format = "[$path]($style)"
# Command prompt character
[character]
success_symbol = "[](bold green)"
error_symbol = "[](bold red)"
vimcmd_symbol = "[](bold green)"
# Git branch display
[git_branch]
format = "[$symbol$branch]($style)"
style = "bold purple"
symbol = " " # Git branch symbol
# Git status indicators
[git_status]
format = '([\[$ahead_behind$staged$modified$deleted\]]($style) )'
style = "bold cyan"
# Repository status compared to remote
ahead = "⇡${count}" # Local repo has ${count} commits not pushed to remote
behind = "⇣${count}" # Remote has ${count} commits not in local repo
diverged = "⇕⇡${ahead_count}⇣${behind_count}" # Local and remote have diverged
# Working tree status
staged = "+${count}" # Number of staged files
modified = "!${count}" # Number of files with unstaged changes
deleted = "✘${count}" # Number of deleted files
untracked = "" # Hide untracked files indicator (was "?${count}")
# Note: Other git status symbols available but hidden for cleaner display:
# conflicted = "✖" # Merge conflicts
# stashed = "≡" # Stashed changes
# renamed = "»" # Renamed files
# Kubernetes context
[kubernetes]
format = '[$symbol$context( \($namespace\))]($style) '
style = "bold blue"
symbol = "☸ "
disabled = true # Default to disabled
detect_files = ["k8s", "kubernetes", "k3d.yaml", "kubeconfig.yaml"] # Only show in directories with these files
# Python environment
[python]
format = '[$symbol$virtualenv]($style) '
style = "bold yellow"
symbol = "🐍 "
# Node.js
[nodejs]
format = '[$symbol($version )]($style)'
style = "bold green"
symbol = "⬢ "
# Rust
[rust]
format = '[$symbol($version )]($style)'
style = "bold red"
symbol = "🦀 "
# Docker
[docker_context]
format = '[$symbol$context]($style) '
style = "bold blue"
symbol = "🐋 "
# Golang
[golang]
format = '[$symbol($version )]($style)'
style = "bold cyan"
symbol = "Go "
#+end_src
error_symbol = "[](red)"
vimcmd_symbol = "[](green)"
# Git branch display
[git_branch]
format = "[$branch]($style)"
style = "bright-black"
# Git status indicators
[git_status]
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)"
style = "cyan"
conflicted = "✖"
untracked = "+"
modified = "!"
staged = "+"
renamed = "»"
deleted = "✘"
stashed = "≡"
# Command duration
[cmd_duration]
min_time = 500
format = "[$duration]($style) "
# Username display
[username]
show_always = false
style_user = "white bold"
style_root = "red bold"
# Hostname display
[hostname]
ssh_only = true
format = "[$hostname]($style) "
trim_at = "-"
style = "bold dimmed green"
#+end_src
** Tmux ** Tmux
#+begin_src txt :tangle ~/.config/tmux/tmux.conf #+begin_src txt :tangle ~/.config/tmux/tmux.conf
# Required for yazi # Required for yazi