From d58bdbcb836aae99a45d959ff638b63d9169b5fd Mon Sep 17 00:00:00 2001 From: gerardo Date: Tue, 6 Sep 2022 14:20:16 -0500 Subject: [PATCH] Adding starship configuration --- bash/bashrc | 8 ++++++++ install.sh | 17 ++++++++++++++++- starship/starship.toml | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 starship/starship.toml diff --git a/bash/bashrc b/bash/bashrc index 610d4c3..a0c3d1e 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -130,3 +130,11 @@ fi echo "Adding local path folders ... ~/.local/bin" export PATH="$PATH:~/.local/bin" + +echo "Setting vim as editor ..." +export EDITOR=vim + +echo "Initializing starship ..." +eval "$(starship init bash)" + + diff --git a/install.sh b/install.sh index 232a8ab..2fd0eb5 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -packages="sshpass tmux python3-pip" +packages="sshpass tmux python3-pip cargo" pip="awscli" read -p "Are you sure? (Y/N) " @@ -11,6 +11,9 @@ then exit 0 fi +echo "Creating necessary directories ..." +mkdir -p ~/.config + release=$(lsb_release -d | grep -i ubuntu > /dev/null && echo ubuntu || echo unknown) echo "Release is $release" @@ -42,3 +45,15 @@ then ln -sf ~/.dotfiles/tmux ~/.tmux fi +# I hate this but no other option worked ... +if [[ ! -f /usr/local/bin/starship ]] +then + echo "Installing starship ..." + curl -sS https://starship.rs/install.sh | sh +fi +echo "Installing starship configuration ..." +rm -rf ~/.config/starship.toml +ln -sf ~/.dotfiles/starship/starship.toml ~/.config/starship.toml + +. ~/.bashrc + diff --git a/starship/starship.toml b/starship/starship.toml new file mode 100644 index 0000000..11e4dae --- /dev/null +++ b/starship/starship.toml @@ -0,0 +1,33 @@ +# ~/.config/starship.toml +# Inserts a blank line between shell prompts +# add_newline = false + +[line_break] +disabled = true + +[character] +error_symbol = "[✗](bold red) " + +[aws] +disabled = true + +[kubernetes] +format = '[ $context](bold green) ' +disabled = true + +[kubernetes.context_aliases] +"i-00fc7cc49e1758b19@rcp.us-east-2.eksctl.io" = "rcp" + +[python] +format = '[$virtualenv](dimmed yellow) ' + +[username] +style_user = "bold dimmed blue" +show_always = false + +[hostname] +ssh_only = false +format = "<[$hostname]($style)>" +trim_at = "-" +style = "bold dimmed white" +disabled = true