From 12a4e88fcd95041ea58fd69dc38ea7eb45466b2f Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Tue, 4 Jun 2024 20:26:38 +0200 Subject: [PATCH] Add starship.toml --- install.sh | 4 +- lone-files/starship.toml | 107 +++++++++++++++++++++++++++++++++++++++ uninstall.sh | 2 + 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 lone-files/starship.toml diff --git a/install.sh b/install.sh index ff61973..5466880 100755 --- a/install.sh +++ b/install.sh @@ -27,10 +27,12 @@ function link() { ) # create directories -#mkdir -p "/unused/" +mkdir -p "/root/.config" "/etc/skel/.config" # bash configuration link "lone-files/bashrc" "etc/bash.bashrc" +link "lone-files/starship.toml" "root/.config/starship.toml" +link "lone-files/starship.toml" "etc/skel/.config/starship.toml" link "repositories/punktdateien-bashrc" "/etc/bashrc.d" # locales & stuff diff --git a/lone-files/starship.toml b/lone-files/starship.toml new file mode 100644 index 0000000..724c734 --- /dev/null +++ b/lone-files/starship.toml @@ -0,0 +1,107 @@ +"$schema" = 'https://starship.rs/config-schema.json' + +# Inserts a blank line between shell prompts +format = ''' +[┌─── \[](bold #d60532)$username$hostname$localip[\]](bold #d60532) [──────](bold #d60532) +[│](bold #d60532) $directory$git_branch$git_metrics$jobs +[│](bold #d60532) $os$memory_usage +[└───────](bold #d60532)$status$character''' +right_format = "" +scan_timeout = 1 +command_timeout = 1000 +add_newline = true + +[line_break] +disabled = false + +[username] +disabled = false +style_root = "bold #5b23fc" +style_user = "bold #d60532" +format = "[$user]($style)" +show_always = true + +[hostname] +disabled = false +ssh_only = false +ssh_symbol = "°" +trim_at = "" +format = "[@$hostname$ssh_symbol]($style)" +style = "bold #d60532" + +[localip] +disabled = false +ssh_only = false +format = " [$localipv4]($style)" +style = "bold #d60532" + +[directory] +disabled = false +truncation_length = 2 +truncation_symbol = "…" +truncate_to_repo = true +format = "[$path]($style)[$read_only]($read_only_style)" +style = "bold #5b23fc" +read_only = "°" +read_only_style = "bold #5b23fc" +home_symbol = "~" +use_os_path_sep = false + +[git_branch] +disabled = false +always_show_remote = false +format = " [$symbol[$branch](underline $style)]($style)" +symbol = " " +style = "bold #d60532" +truncation_symbol = "…" +only_attached = true +ignore_branches = [] + +[git_metrics] +disabled = false +added_style = "bold green" +deleted_style = "bold #d60532" +only_nonzero_diffs = false +format = " [\\[add ${added}\\]]($added_style) [\\[del ${deleted}\\]]($deleted_style)" +ignore_submodules = true + +[jobs] +disabled = false +symbol_threshold = 2 +number_threshold = 2 +format = " [\\[running job$symbol$number\\]]($style)" +symbol = "s: " +style = "bold #5b23fc" + +[os] +disabled = false +format = "[$symbol]($style) " +style = "bold #5b23fc" + +[os.symbols] +Android = "Termux" +Arch = "Arch" +Debian = "Debian" +Raspbian = "RPi" +Unknown = "?" + +[memory_usage] +disabled = false +threshold = 0 +format = "[\\[mem% $ram_pct\\] \\[mem $ram\\]]($style)" +symbol = "" +style = "bold #d60532" + +[status] +disabled = false +format = "[$signal_name$common_meaning]($style)" +style = "bold #5b23fc" +recognize_signal_code = true +map_symbol = true +pipestatus = false + +[character] +disabled = false +format = "$symbol " +success_symbol = "[>](bold #ffffff)" +error_symbol = "[>](bold #d60532)" diff --git a/uninstall.sh b/uninstall.sh index ed44f45..096bf71 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -17,6 +17,8 @@ function unlink() { # bash configuration unlink "etc/bash.bashrc" +unlink "root/.config/starship.toml" +unlink "etc/skel/.config/starship.toml" unlink "etc/bashrc.d" # locales & stuff