From 38c42756b12e8c2e4eea070691725fd75a6d76cb Mon Sep 17 00:00:00 2001 From: Dale Shrauger Date: Fri, 5 Aug 2022 16:01:08 -0500 Subject: [PATCH] Update install & add starship/.bashrc.local configs --- .bashrc.local | 4 +++ .tmux.conf.local | 16 ++++----- makesymlinks.sh | 15 ++++++-- starship.toml | 94 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 10 deletions(-) create mode 100644 .bashrc.local create mode 100644 starship.toml diff --git a/.bashrc.local b/.bashrc.local new file mode 100644 index 0000000..148a998 --- /dev/null +++ b/.bashrc.local @@ -0,0 +1,4 @@ +# Activate Starship command prompt +if [ -f /usr/local/bin/starship ]; then + eval "$(starship init bash)" +fi diff --git a/.tmux.conf.local b/.tmux.conf.local index f52b523..f89aa66 100644 --- a/.tmux.conf.local +++ b/.tmux.conf.local @@ -224,14 +224,14 @@ tmux_conf_theme_window_status_last_bg="$tmux_conf_theme_colour_2" tmux_conf_theme_window_status_last_attr="none" # status left/right sections separators -tmux_conf_theme_left_separator_main="" -tmux_conf_theme_left_separator_sub="|" -tmux_conf_theme_right_separator_main="" -tmux_conf_theme_right_separator_sub="|" -#tmux_conf_theme_left_separator_main="\uE0B0" # /!\ you don't need to install Powerline -#tmux_conf_theme_left_separator_sub="\uE0B1" # you only need fonts patched with -#tmux_conf_theme_right_separator_main="\uE0B2" # Powerline symbols or the standalone -#tmux_conf_theme_right_separator_sub="\uE0B3" # PowerlineSymbols.otf font, see README.md +#tmux_conf_theme_left_separator_main="" +#tmux_conf_theme_left_separator_sub="|" +#tmux_conf_theme_right_separator_main="" +#tmux_conf_theme_right_separator_sub="|" +tmux_conf_theme_left_separator_main="\uE0B0" # /!\ you don't need to install Powerline +tmux_conf_theme_left_separator_sub="\uE0B1" # you only need fonts patched with +tmux_conf_theme_right_separator_main="\uE0B2" # Powerline symbols or the standalone +mux_conf_theme_right_separator_sub="\uE0B3" # PowerlineSymbols.otf font, see README.md # status left/right content: # - separate main sections with "|" diff --git a/makesymlinks.sh b/makesymlinks.sh index d02b2e1..9fcfe8a 100755 --- a/makesymlinks.sh +++ b/makesymlinks.sh @@ -6,8 +6,8 @@ ########## Variables -dir=~/dotfiles # dotfiles directory -olddir=~/dotfiles_old # old dotfiles backup directory +dir=$(basename $0) # dotfiles directory +olddir=$(basename $0)_old # old dotfiles backup directory files=".tmux.conf .tmux.conf.local .vimrc .vim .tcshrc .bashrc .inputrc .git_completion" # list of files/folders to symlink in homedir ########## @@ -29,3 +29,14 @@ for file in $files; do echo "Creating symlink to $file in home directory." ln -s $dir/$file ~/$file > /dev/null 2>&1 done + +# link Starship config to ~/.config/ if exists +if [ -f ~/.config ]; then + ln -s ./starship.toml ~/.config/starship.toml +fi + +# copy example bashrc.local if one doesn't exist yet +if [ ! -f ~/.bashrc.local ]; then + ln -s .bashrc.local ~/.bashrc.local +fi + diff --git a/starship.toml b/starship.toml new file mode 100644 index 0000000..dedfa01 --- /dev/null +++ b/starship.toml @@ -0,0 +1,94 @@ +command_timeout = 500 +format = "$username$hostname: $directory$git_branch$python$aws$time$cmd_duration$character" +[line_break] +disabled = true + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " + +[cmd_duration] +min_time = 500 +format = "took [$duration](bold yellow) " + +[env_var.SHELL] +variable = "SHELL" +default = "unknown shell" + +[env_var.USER] +default = "unknown user" + +[username] +style_user = "blue bold" +style_root = "red bold" +format = "[$user]($style)" +disabled = false +show_always = true + +[hostname] +ssh_only = false +format = "[$ssh_symbol](bold blue) on [$hostname](bold yellow) " +trim_at = ".companyname.com" +disabled = false + +[directory] +read_only = " " +truncation_length = 8 +truncation_symbol = "…/" +use_os_path_sep = true + +[shell] +fish_indicator = "" +powershell_indicator = "_" +unknown_indicator = "mystery shell" +style = "cyan bold" +disabled = false + +[status] +style = "bg:blue" +symbol = "🔴 " +success_symbol = "🟢 SUCCESS" +format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' +map_symbol = true +disabled = false + +[aws] +disabled = true +format = ' AWS:[$symbol($profile )(\($region\))]($style)' +style = "bold blue" +#symbol = "\xe2\x98\x81\xef\xb8\x8f" +[aws.region_aliases] +us-west-1 = "us-west-1" +us-east-1 = "va" + +[container] +format = "[$symbol \\[$name\\]]($style) " + +[git_branch] +symbol = "  " +style = "bold #e8ec00 inverted" +format = "on [$symbol$branch ]($style) " + +[git_commit] +disabled = false + +[git_state] +disabled = false + +[git_status] +disabled = false + +[kubernetes] +format = 'on [☸ $context \($namespace\)](dimmed green) ' +disabled = false +#[kubernetes.context_aliases] +#"dev.local.cluster.k8s" = "dev" + +[package] +disabled = true + +[python] +format = '[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\))]($style)' +symbol = "🐍 " +pyenv_version_name = true + -- 2.50.1