fix zsh histfile, add venv to starship

This commit is contained in:
Mira Kristipati 2023-09-26 07:51:13 +00:00
parent 3b403a69a2
commit de2be46c2f
2 changed files with 14 additions and 4 deletions

View file

@ -22,6 +22,7 @@ PATH=$(echo "$PATH" | sed -e 's/\/mnt\/.*\?://g')
# Set where history is saved and how much to save # Set where history is saved and how much to save
HISTFILE="$XDG_STATE_HOME/zsh/history" HISTFILE="$XDG_STATE_HOME/zsh/history"
[ ! -e $HISTFILE ] && mkdir -p "$XDG_STATE_HOME/zsh" && touch $HISTFILE
HISTSIZE=10000 HISTSIZE=10000
SAVEHIST=10000 SAVEHIST=10000
@ -44,6 +45,7 @@ zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache
# Move completions to XDG Dir # Move completions to XDG Dir
autoload -Uz compinit
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"

View file

@ -21,15 +21,17 @@ $nodejs\
$rust\ $rust\
[](fg:bright-cyan bg:bright-green)\ [](fg:bright-cyan bg:bright-green)\
$docker_context\ $docker_context\
[](fg:bright-green bg:bright-blue)\ [](fg:bright-green bg:bright-purple)\
$time\ $python\
[ ](fg:bright-blue)\ [](fg:bright-purple)\
""" """
right_format = """ right_format = """
[](fg:bright-red) [](fg:bright-red)
$status\ $status\
[](bg:bright-red fg:bright-blue) [](bg:bright-red fg:bright-blue)\
$time\
[](bg:bright-red fg:bright-blue)\
$cmd_duration\ $cmd_duration\
$hostname\ $hostname\
[](fg:bright-blue) [](fg:bright-blue)
@ -61,6 +63,7 @@ CentOS = " "
NixOS = " " NixOS = " "
Windows = " " Windows = " "
Macos = " " Macos = " "
Alpine = " "
[directory] [directory]
style = "bg:bright-red fg:black" style = "bg:bright-red fg:black"
@ -165,3 +168,8 @@ format = "[ $symbol $status ]($style)"
style="bg:bright-blue fg:black" style="bg:bright-blue fg:black"
ssh_symbol="@" ssh_symbol="@"
format='[ $ssh_symbol$hostname ]($style)' format='[ $ssh_symbol$hostname ]($style)'
[python]
style="bg:bright-purple fg:black"
symbol=" "
format='[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'