From 651143817b830d7f3abd07cba07adef8d09d08b6 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Thu, 7 Oct 2021 11:29:19 -0400 Subject: [PATCH] Check diff before reporting overwrites. Add starship config. --- .config/starship.toml | 80 +++++++++++++++++++++++++++++++++++++++++++ copy.sh | 6 +++- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 .config/starship.toml diff --git a/.config/starship.toml b/.config/starship.toml new file mode 100644 index 0000000..773c5c7 --- /dev/null +++ b/.config/starship.toml @@ -0,0 +1,80 @@ +add_newline = false +format = """ +[\\[sage\\]](bold red) \ +$username\ +$hostname\ +$shlvl\ +$kubernetes\ +$directory\ +$vcsh\ +$java\ +$nodejs\ +$dart\ +$deno\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$julia\ +$kotlin\ +$nim\ +$ocaml\ +$perl\ +$php\ +$purescript\ +$python\ +$red\ +$ruby\ +$rust\ +$scala\ +$swift\ +$terraform\ +$vlang\ +$vagrant\ +$zig\ +$git_branch\ +$git_commit\ +$git_state\ +$git_metrics\ +$git_status\ +$hg_branch\ +$docker_context\ +$cmake\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$env_var\ +$crystal\ +$custom\ +$line_break\ +$lua\ +$jobs\ +$battery\ +$time\ +$status\ +$shell\ +$character""" + +[character] +success_symbol = "[\\$](bold white)" +error_symbol = "[✗](bold red)" + +[directory] +style = "green bold" +truncate_to_repo = false +truncation_length = 0 + +[nodejs] +format = "$symbol" + +[java] +format = "$symbol" + +[time] +disabled = true +use_12hr = true diff --git a/copy.sh b/copy.sh index a2d938d..a031984 100755 --- a/copy.sh +++ b/copy.sh @@ -3,11 +3,12 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) moving_files="$(find $SCRIPT_DIR -mindepth 1 -maxdepth 1 -type f -not -name "copy.sh" -not -name "*.git*")" moving_files=$(echo -e "$moving_files\n$(find $SCRIPT_DIR/.vim/colors/ -mindepth 1)") +moving_files=$(echo -e "$moving_files\n$(find $SCRIPT_DIR/.config/ -mindepth 1)") home_files="" for f in $moving_files; do home_file="$HOME$(echo $f | sed "s@$SCRIPT_DIR@@")" - if test -f "$home_file"; then + if test -f "$home_file" && ! diff $home_file $f &>/dev/null; then home_files="$home_files\n $home_file" fi done @@ -31,6 +32,9 @@ done mkdir -p ~/.vim/colors ln -sf $SCRIPT_DIR/.vim/colors/* ~/.vim/colors/ +mkdir -p ~/.config/ +ln -sf $SCRIPT_DIR/.config/* ~/.config/ + touch ~/.zsh_local if ! test -f ~/.gitlocal; then