summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGianni Ceccarelli <gceccarelli@veritone.com>2023-10-09 17:14:40 +0100
committerdakkar <dakkar@thenautilus.net>2023-10-13 10:25:01 +0100
commit26dab9d1928038d10c1560eefbe77c772b07a998 (patch)
tree1ba9e78fbf91f5d63cedb6bbf63f0e821415ae87
parentremove Multi_key from mod1 (diff)
downloaddotfiles-starship.tar.gz
dotfiles-starship.tar.bz2
dotfiles-starship.zip
starship configstarship
-rw-r--r--.bashrc10
-rw-r--r--.config/starship.toml194
2 files changed, 203 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index 6666228..cb51786 100644
--- a/.bashrc
+++ b/.bashrc
@@ -49,7 +49,15 @@ function xreset() {
esac
}
-. ~/src/git-prompt/git-prompt.sh
+#. ~/src/git-prompt/git-prompt.sh
+function starship_set_win_title() {
+ local cwd="${PWD/$HOME/\~}"
+ cwd="${cwd##[/~]*/}/"
+
+ xtitle "$USER@$(hostname):$cwd"
+}
+starship_precmd_user_func=starship_set_win_title
+eval "$(starship init bash)"
#export PS1="\
#\[\033[1;37m\]\u@\h\
diff --git a/.config/starship.toml b/.config/starship.toml
new file mode 100644
index 0000000..b1ab4aa
--- /dev/null
+++ b/.config/starship.toml
@@ -0,0 +1,194 @@
+# Get editor completions based on the config schema
+"$schema" = 'https://starship.rs/config-schema.json'
+
+# Inserts a blank line between shell prompts
+add_newline = true
+
+format = """
+[](fg:user)\
+$username[@](bg:user)$hostname\
+[](fg:user bg:dir)\
+$directory\
+[](bg:time fg:dir)\
+$time\
+[](fg:time)\n\
+([](fg:vcs)\
+$vcsh\
+$git_branch\
+$git_status\
+$git_state\
+$git_commit\
+[](fg:vcs bg:lang)\
+$c\
+$golang\
+$java\
+$nodejs\
+$perl\
+$raku\
+$ruby\
+$rust\
+$vagrant\
+[](fg:lang)\n)\
+[](fg:jobs)\
+$jobs\
+[](fg:jobs bg:status)\
+$status\
+[](fg:status) \
+"""
+
+continuation_prompt = '▶▶ '
+
+palette = 'pastels'
+
+[palettes.pastels]
+user = '#9A348E'
+user_fg = 'white'
+user_root = '#FF0000'
+time = '#33658A'
+time_fg = 'white'
+dir = '#DA627D'
+dir_fg = 'white'
+dir_repo_fg='black'
+dir_ro_fg='yellow'
+vcs = '#FCA17D'
+vcs_fg = '8'
+lang = '#86BBD8'
+lang_fg = '8'
+jobs = '#DA627D'
+jobs_fg = '8'
+status = '#33658A'
+status_fg = 'white'
+
+[c]
+symbol = " "
+style = "bg:lang fg:lang_fg"
+format = '[ $symbol ($version) ]($style)'
+
+[directory]
+read_only = " 󰌾"
+style = 'bg:dir fg:dir_fg'
+read_only_style = 'bg:dir fg:dir_ro_fg'
+repo_root_style = 'bg:dir fg:dir_repo_fg'
+format = "[ $path]($style)[$read_only ]($read_only_style)"
+repo_root_format = "[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only ]($read_only_style)"
+truncation_length = 3
+truncation_symbol = "…/"
+truncate_to_repo = false
+
+[git_branch]
+symbol = " "
+style = "bg:vcs fg:vcs_fg"
+format = '[ $symbol$branch]($style)'
+only_attached = false
+
+[git_commit]
+only_detached = false
+tag_disabled = false
+style = "bg:vcs fg:vcs_fg"
+format = "[ $hash$tag]($style)"
+
+[git_status]
+style = "bg:vcs fg:vcs_fg"
+conflicted = "⚔️"
+ahead = "↑${count}"
+behind = "↓${count}"
+diverged = "↑${ahead_count}↓${behind_count}"
+untracked = "🤷${count}"
+stashed = "📦${count}"
+modified = "📝${count}"
+staged = "🗃️ ${count}"
+renamed = "📛${count}"
+deleted = "🗑️${count}"
+format = '[ $all_status$ahead_behind]($style)'
+
+[golang]
+symbol = " "
+style = "bg:lang fg:lang_fg"
+format = '[ $symbol($version)]($style)'
+
+[hg_branch]
+symbol = " "
+style = "bg:vcs fg:vcs_fg"
+format = '[ $symbol$branch]($style)'
+
+[hostname]
+ssh_symbol = " "
+ssh_only = false
+style = "bg:user fg:user_fg"
+format = '[$hostname$ssh_symbol]($style)'
+
+[java]
+symbol = " "
+style = "bg:lang fg:lang_fg"
+format = '[ $symbol($version)]($style)'
+
+[jobs]
+number_threshold = 0
+style = "bg:jobs fg:jobs_fg"
+format = '[$symbol$number]($style)'
+
+[nodejs]
+symbol = " "
+style = "bg:lang fg:lang_fg"
+format = '[ $symbol ($version) ]($style)'
+
+[package]
+symbol = "󰏗 "
+style = "bg:lang fg:lang_fg"
+
+[perl]
+symbol = "🐪"
+style = "bg:lang fg:lang_fg"
+format = '[ $symbol($version)]($style)'
+detect_files = [ 'Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version', 'dist.ini' ]
+
+[python]
+symbol = " "
+style = "bg:lang fg:lang_fg"
+format = '[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)'
+
+[raku]
+symbol = "🦋"
+style = "bg:lang fg:lang_fg"
+format = '[ $symbol($version)]($style)'
+
+[ruby]
+symbol = " "
+style = "bg:lang fg:lang_fg"
+format = '[ $symbol($version)]($style)'
+
+[rust]
+symbol = " "
+style = "bg:lang fg:lang_fg"
+format = '[ $symbol($version)]($style)'
+
+[status]
+disabled = false
+style = 'bg:status fg:status_fg'
+format = '[$symbol$maybe_int$signal_name]($style)'
+success_symbol = ''
+
+[sudo]
+disabled = true
+format = '[as $symbol]($style)'
+
+[time]
+disabled = false
+time_format = "%F %T"
+style = "bg:time fg:time_fg"
+format = '[ 🕙 $time ]($style)'
+
+[username]
+format = '[$user]($style)'
+show_always = true
+style_user = "bg:user fg:user_fg"
+style_root = "bg:user_root fg:user_fg"
+disabled = false
+
+[vagrant]
+style = "bg:lang fg:lang_fg"
+format = '[ $symbol($version)]($style)'
+
+[vcsh]
+style = "bg:vcs fg:vcs_fg"
+format = '[ $repo]($style)' \ No newline at end of file