From d7285aa85db01e24e2328d2e446a62ca3e6fe251 Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Sat, 28 Jun 2025 11:20:12 -0400 Subject: [PATCH] New prompt --- dotfiles.org | 147 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 141 insertions(+), 6 deletions(-) diff --git a/dotfiles.org b/dotfiles.org index da36f26..4b0a154 100644 --- a/dotfiles.org +++ b/dotfiles.org @@ -52,20 +52,155 @@ This file contains all configurations across all my machines. Well, most of them ** TODO Autojump ** TODO Atuin ** Fish -OMF must be installed separately (nix package for this is broken) -- =curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish= -- =omf install pie= -- remove fortune line from .local/share/omf/themes/pie/fish_greeting.fish -#+begin_src fish :tangle ~/.config/fish/config.fish +Fish shell configuration using starship prompt. + +*** Main Configuration +#+begin_src fish :tangle ~/.config/fish/config.fish fish_vi_key_bindings -omf theme pie + +# Initialize starship prompt +starship init fish | source #+end_src +*** Mode Prompt +Disable default mode indicator since starship handles it #+begin_src fish :tangle ~/.config/fish/functions/fish_mode_prompt.fish function fish_mode_prompt end #+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 #+begin_src txt :tangle ~/.config/tmux/tmux.conf # Required for yazi