Add starship prompt
This commit is contained in:
parent
1b39fc3592
commit
2963ec0ad4
4 changed files with 102 additions and 10 deletions
7
.bashrc
7
.bashrc
|
@ -11,6 +11,7 @@ fi
|
||||||
# Set name of the theme to load. Optionally, if you set this to "random"
|
# Set name of the theme to load. Optionally, if you set this to "random"
|
||||||
# it'll load a random theme each time that oh-my-bash is loaded.
|
# it'll load a random theme each time that oh-my-bash is loaded.
|
||||||
OSH_THEME="brainy"
|
OSH_THEME="brainy"
|
||||||
|
[ -x "$(command -v starship)" ] && ZSH_THEME=""
|
||||||
|
|
||||||
# Uncomment the following line to use case-sensitive completion.
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
# CASE_SENSITIVE="true"
|
# CASE_SENSITIVE="true"
|
||||||
|
@ -29,10 +30,10 @@ OSH_THEME="brainy"
|
||||||
# DISABLE_LS_COLORS="true"
|
# DISABLE_LS_COLORS="true"
|
||||||
|
|
||||||
# Uncomment the following line to disable auto-setting terminal title.
|
# Uncomment the following line to disable auto-setting terminal title.
|
||||||
# DISABLE_AUTO_TITLE="true"
|
DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
# Uncomment the following line to enable command auto-correction.
|
# Uncomment the following line to enable command auto-correction.
|
||||||
# ENABLE_CORRECTION="true"
|
ENABLE_CORRECTION="true"
|
||||||
|
|
||||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||||
# COMPLETION_WAITING_DOTS="true"
|
# COMPLETION_WAITING_DOTS="true"
|
||||||
|
@ -88,3 +89,5 @@ shopt -s checkwinsize
|
||||||
source "$HOME/.config/environment"
|
source "$HOME/.config/environment"
|
||||||
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
|
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
|
||||||
[ -x "$(command -v thefuck)" ] && eval $(thefuck --alias)
|
[ -x "$(command -v thefuck)" ] && eval $(thefuck --alias)
|
||||||
|
|
||||||
|
[ -x "$(command -v starship)" ] && eval "$(starship init bash)"
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
LANG=en_DE.UTF-8
|
LANG=en_US.UTF-8
|
||||||
LANGUAGE=en_DE:en_IE:en_GB:en
|
LANGUAGE=en_US
|
||||||
LC_ALL=
|
|
||||||
LC_COLLATE=C
|
LC_COLLATE=C
|
||||||
|
LC_TIME=de_DE.UTF-8
|
||||||
|
LC_MONETARY=de_DE.UTF-8
|
||||||
|
LC_NUMERIC=de_DE.UTF-8
|
||||||
|
LC_PAPER=de_DE.UTF-8
|
||||||
|
LC_MEASUREMENT=de_DE.UTF-8
|
||||||
|
LC_NAME=de_DE.UTF-8
|
||||||
|
LC_ADDRESS=de_DE.UTF-8
|
||||||
|
LC_TELEPHONE=de_DE.UTF-8
|
||||||
|
LC_ALL=
|
||||||
|
|
80
.config/starship.toml
Normal file
80
.config/starship.toml
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
format = """
|
||||||
|
$time $username$hostname$docker_context $directory$git_branch$git_commit$git_state$git_status\
|
||||||
|
$fill$status$cmd_duration$jobs
|
||||||
|
$sudo$shell $character
|
||||||
|
"""
|
||||||
|
|
||||||
|
continuation_prompt = "▶"
|
||||||
|
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = "[➜](bold green)"
|
||||||
|
error_symbol = "[✗](bold red)"
|
||||||
|
vicmd_symbol = "[V](bold green)"
|
||||||
|
|
||||||
|
[cmd_duration]
|
||||||
|
min_time = 0
|
||||||
|
show_notifications = true
|
||||||
|
show_milliseconds = true
|
||||||
|
format = "[祥$duration]($style) "
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
read_only = ""
|
||||||
|
truncation_length = 8
|
||||||
|
truncation_symbol = "…/"
|
||||||
|
style = "cyan"
|
||||||
|
repo_root_style = "cyan bold underline"
|
||||||
|
format = "[$read_only]($read_only_style)[$path]($style) "
|
||||||
|
repo_root_format = "[$read_only]($read_only_style)[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style) "
|
||||||
|
|
||||||
|
[docker_context]
|
||||||
|
format = ' [\[$symbol$context\]]($style)'
|
||||||
|
|
||||||
|
[fill]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[git_commit]
|
||||||
|
tag_disabled = false
|
||||||
|
tag_symbol = " "
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
staged = "[+](green)"
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
ssh_only = false
|
||||||
|
style = "purple"
|
||||||
|
format = "@[$hostname]($style)"
|
||||||
|
trim_at = ""
|
||||||
|
|
||||||
|
[jobs]
|
||||||
|
number_threshold = 1
|
||||||
|
symbol = ""
|
||||||
|
|
||||||
|
[shell]
|
||||||
|
bash_indicator = '\$'
|
||||||
|
fish_indicator = ""
|
||||||
|
zsh_indicator = '%%'
|
||||||
|
powershell_indicator = ""
|
||||||
|
unknown_indicator = ""
|
||||||
|
style = "white"
|
||||||
|
format = '[$indicator]($style)'
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[sudo]
|
||||||
|
format = "[$symbol]($style)"
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[status]
|
||||||
|
disabled = false
|
||||||
|
format = "[$status]($style) "
|
||||||
|
|
||||||
|
[time]
|
||||||
|
disabled = false
|
||||||
|
style = "white"
|
||||||
|
format = "[$time]($style)"
|
||||||
|
|
||||||
|
[username]
|
||||||
|
style_user = "yellow bold"
|
||||||
|
style_root = "red bold"
|
||||||
|
format = "[$user]($style)"
|
||||||
|
show_always = true
|
|
@ -12,6 +12,7 @@ fi
|
||||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||||
ZSH_THEME="serguzim"
|
ZSH_THEME="serguzim"
|
||||||
|
[ -x "$(command -v starship)" ] && ZSH_THEME=""
|
||||||
|
|
||||||
# Set list of themes to pick from when loading at random
|
# Set list of themes to pick from when loading at random
|
||||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||||
|
@ -42,10 +43,10 @@ DISABLE_AUTO_UPDATE="false"
|
||||||
# DISABLE_LS_COLORS="true"
|
# DISABLE_LS_COLORS="true"
|
||||||
|
|
||||||
# Uncomment the following line to disable auto-setting terminal title.
|
# Uncomment the following line to disable auto-setting terminal title.
|
||||||
# DISABLE_AUTO_TITLE="true"
|
DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
# Uncomment the following line to enable command auto-correction.
|
# Uncomment the following line to enable command auto-correction.
|
||||||
# ENABLE_CORRECTION="true"
|
ENABLE_CORRECTION="true"
|
||||||
|
|
||||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||||
# COMPLETION_WAITING_DOTS="true"
|
# COMPLETION_WAITING_DOTS="true"
|
||||||
|
@ -61,7 +62,7 @@ DISABLE_AUTO_UPDATE="false"
|
||||||
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||||
# or set a custom format using the strftime function format specifications,
|
# or set a custom format using the strftime function format specifications,
|
||||||
# see 'man strftime' for details.
|
# see 'man strftime' for details.
|
||||||
# HIST_STAMPS="yyyy-mm-dd"
|
HIST_STAMPS="yyyy-mm-dd"
|
||||||
|
|
||||||
# Would you like to use another custom folder than $ZSH/custom?
|
# Would you like to use another custom folder than $ZSH/custom?
|
||||||
ZSH_CUSTOM=$ZDOTDIR/custom
|
ZSH_CUSTOM=$ZDOTDIR/custom
|
||||||
|
@ -78,11 +79,9 @@ plugins=(
|
||||||
'cp'
|
'cp'
|
||||||
'docker'
|
'docker'
|
||||||
'docker-compose'
|
'docker-compose'
|
||||||
'encode64'
|
|
||||||
'extract'
|
'extract'
|
||||||
'git'
|
'git'
|
||||||
'git-auto-status'
|
'git-auto-status'
|
||||||
'httpie'
|
|
||||||
'jump'
|
'jump'
|
||||||
'laravel5'
|
'laravel5'
|
||||||
'rust'
|
'rust'
|
||||||
|
@ -108,3 +107,5 @@ export HISTFILE="$HOME/.cache/zsh_history"
|
||||||
|
|
||||||
# Load zsh-syntax-highlighting; should be last.
|
# Load zsh-syntax-highlighting; should be last.
|
||||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
|
||||||
|
|
||||||
|
[ -x "$(command -v starship)" ] && eval "$(starship init zsh)"
|
||||||
|
|
Loading…
Reference in a new issue