From a923b131438609e914066eb1eeced08a956a1f97 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sat, 2 Nov 2024 03:26:41 -0400 Subject: [PATCH] shell stuff --- .config/starship.toml | 47 +++++++++++++++++++++++++++++++++++++++++++ .zshrc | 40 ++++++------------------------------ 2 files changed, 53 insertions(+), 34 deletions(-) create mode 100644 .config/starship.toml diff --git a/.config/starship.toml b/.config/starship.toml new file mode 100644 index 00000000..265f4a15 --- /dev/null +++ b/.config/starship.toml @@ -0,0 +1,47 @@ +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_state\ +$git_status\ +$cmd_duration\ +$python\ +$line_break\ +$character""" + +[directory] +style = "blue" +fish_style_pwd_dir_length = 3 + +[character] +success_symbol = "[❯](purple)" +error_symbol = "[❯](red)" +vimcmd_symbol = "[❮](green)" + +[git_branch] +format = "[$branch]($style)" +style = "bright-black" + +[git_status] +format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" +style = "cyan" +conflicted = "​" +untracked = "​" +modified = "​" +staged = "​" +renamed = "​" +deleted = "​" +stashed = "≡" + +[git_state] +format = '\([$state( $progress_current/$progress_total)]($style)\) ' +style = "bright-black" + +[cmd_duration] +format = "[$duration]($style) " +style = "yellow" + +[python] +format = "[$virtualenv]($style) " +style = "bright-black" diff --git a/.zshrc b/.zshrc index f5bc73c8..0bb51447 100644 --- a/.zshrc +++ b/.zshrc @@ -90,37 +90,8 @@ plugins=(ssh-agent git zsh-autosuggestions zsh-syntax-highlighting aliases color source $ZSH/oh-my-zsh.sh -autoload -U promptinit; promptinit -prompt purer - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" - -# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -# [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +# autoload -U promptinit; promptinit +# prompt purer # Set up fzf key bindings and fuzzy completion eval "$(fzf --zsh)" @@ -128,6 +99,7 @@ eval "$(fzf --zsh)" alias top=btop alias v=nvim alias lg=lazygit +alias t=tmux bindkey -r '^T' # Created by `pipx` on 2024-09-20 02:14:00 @@ -141,8 +113,8 @@ function y() { fi rm -f -- "$tmp" } -. /opt/asdf-vm/asdf.sh -# echo -ne '\e[6 q' # Caret/vertical bar cursor style +# . /opt/asdf-vm/asdf.sh +# Need this to fix the cursor in tmux print -n '\033[5 q' function zle-keymap-select zle-line-init zle-line-finish { @@ -155,4 +127,4 @@ function zle-keymap-select zle-line-init zle-line-finish zle -N zle-line-init zle -N zle-line-finish zle -N zle-keymap-select -# eval "$(starship init zsh)" +eval "$(starship init zsh)"