Use starship for prompt
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
49b5ad585a
commit
5ddf2c8fb7
2 changed files with 45 additions and 15 deletions
|
@ -65,6 +65,7 @@ export PSQLRC="${XDG_CONFIG_HOME}/pg/psqlrc"
|
|||
export PSQL_HISTORY="${XDG_CACHE_HOME}/pg/psql_history"
|
||||
export PGPASSFILE="${XDG_CONFIG_HOME}/pg/pgpass"
|
||||
export PGSERVICEFILE="${XDG_CONFIG_HOME}/pg/pg_service.conf"
|
||||
export STARSHIP_CONFIG="${XDG_CONFIG_HOME}/starship/config.toml"
|
||||
export OCTAVE_HISTFILE="${XDG_CACHE_HOME}/octave-hist"
|
||||
export OCTAVE_SITE_INITFILE="${XDG_CONFIG_HOME}/octave/octaverc"
|
||||
mkdir -p "${XDG_CONFIG_HOME}/bazaar"
|
||||
|
@ -95,9 +96,9 @@ export CLION_JDK="${IDEA_JDK}"
|
|||
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
|
||||
export HISTFILE="${XDG_DATA_HOME}/zsh/history"
|
||||
export HISTCONTROL=ignoreboth
|
||||
export SAVEHIST=1000
|
||||
export HISTSIZE=1000
|
||||
export HISTFILESIZE=2000
|
||||
export HISTSIZE=10000
|
||||
export SAVEHIST="${HISTSIZE}"
|
||||
export HISTFILESIZE="${HISTSIZE}"
|
||||
mkdir -p "${XDG_DATA_HOME}/zsh/zcompdump-${ZSH_VERSION}"
|
||||
|
||||
if [ -n "$(command -v compinit)" ]; then
|
||||
|
@ -174,15 +175,16 @@ function precmd() {
|
|||
}
|
||||
|
||||
# Custom prompt
|
||||
NEWLINE=$'\n'
|
||||
export PS1="┌─"
|
||||
export PS1="${PS1}%F{red}[%D{%T}]%f"
|
||||
export PS1="${PS1}%F{blue}[%m]%f"
|
||||
export PS1="${PS1}%F{yellow}[%~]%f"
|
||||
export PS1="${PS1}"'${(r:$(prompt_width)::─:)}'
|
||||
export PS1="${PS1}%F{yellow}"'$(file_count)'"%f"
|
||||
export PS1="${PS1}%F{blue}"'$(folder_size)'"%f"
|
||||
export PS1="${PS1}%F{red}"'$(current_branch)'"%f"
|
||||
export PS1="${PS1}─┐"
|
||||
export PS1="${PS1}${NEWLINE}└─╼ "
|
||||
export RPROMPT="╾─┘"
|
||||
#NEWLINE=$'\n'
|
||||
#export PS1="┌─"
|
||||
#export PS1="${PS1}%F{red}[%D{%T}]%f"
|
||||
#export PS1="${PS1}%F{blue}[%m]%f"
|
||||
#export PS1="${PS1}%F{yellow}[%~]%f"
|
||||
#export PS1="${PS1}"'${(r:$(prompt_width)::─:)}'
|
||||
#export PS1="${PS1}%F{yellow}"'$(file_count)'"%f"
|
||||
#export PS1="${PS1}%F{blue}"'$(folder_size)'"%f"
|
||||
#export PS1="${PS1}%F{red}"'$(current_branch)'"%f"
|
||||
#export PS1="${PS1}─┐"
|
||||
#export PS1="${PS1}${NEWLINE}└─╼ "
|
||||
#export RPROMPT="╾─┘"
|
||||
eval "$(starship init zsh)"
|
28
system/.config/starship/config.toml
Normal file
28
system/.config/starship/config.toml
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Don't print a new line at the start of the prompt
|
||||
add_newline = false
|
||||
prompt_order = [
|
||||
"time",
|
||||
"directory",
|
||||
"git_branch",
|
||||
"line_break",
|
||||
"character"
|
||||
]
|
||||
|
||||
# Replace the "❯" symbol in the prompt with "➜"
|
||||
[character] # The name of the module we are configuring is "character"
|
||||
symbol = "➜" # The "symbol" segment is being set to "➜"
|
||||
|
||||
[directory]
|
||||
truncate_to_repo = false
|
||||
|
||||
[hostname]
|
||||
ssh_only = false
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
|
||||
[username]
|
||||
show_always = true
|
||||
|
||||
[git_branch]
|
||||
symbol = ""
|
Loading…
Add table
Add a link
Reference in a new issue