From 90e3482bb2e8e90a8ad23a29deecc6060c44ddde Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 5 Feb 2023 20:03:34 +0100 Subject: starship: better, plain-text configuration --- common/commandline.nix | 36 +----- .../commandline/starship-plain-text-symbols.toml | 143 +++++++++++++++++++++ common/commandline/starship.nix | 26 ++++ 3 files changed, 171 insertions(+), 34 deletions(-) create mode 100644 common/commandline/starship-plain-text-symbols.toml create mode 100644 common/commandline/starship.nix diff --git a/common/commandline.nix b/common/commandline.nix index 502c739..74adfa2 100644 --- a/common/commandline.nix +++ b/common/commandline.nix @@ -13,6 +13,7 @@ in (import ./commandline/dircolors.nix inputs) (import ./commandline/git.nix inputs) (import ./commandline/htop.nix inputs) + (import ./commandline/starship.nix inputs) (import ./commandline/tmux.nix inputs) (import ./commandline/zsh.nix inputs) ]; @@ -76,7 +77,7 @@ in Defaults lecture_file = "${lectureFile}" ''; - home-manager.users.minijackson = { ... }: { + home-manager.users.minijackson = { programs.bash.enable = true; programs.bat = { @@ -87,39 +88,6 @@ in }; programs.pazi.enable = true; - - programs.starship = { - enable = true; - enableZshIntegration = false; - - settings = { - character = { - success_symbol = "[>](bold green)"; - error_symbol = "[>](bold red)"; - }; - directory = { - fish_style_pwd_dir_length = 2; - style = "bold blue"; - }; - git_branch.symbol = "branch "; - git_status = { - ahead = "^"; - behind = "v"; - deleted = "x"; - }; - jobs.symbol = "+ "; - nix_shell.style = "bold blue"; - package = { - disabled = true; - style = "bold green"; - symbol = "version "; - }; - rust = { - style = "bold dimmed yellow"; - symbol = "rust "; - }; - }; - }; }; home-manager.users.root = { ... }: { diff --git a/common/commandline/starship-plain-text-symbols.toml b/common/commandline/starship-plain-text-symbols.toml new file mode 100644 index 0000000..d152423 --- /dev/null +++ b/common/commandline/starship-plain-text-symbols.toml @@ -0,0 +1,143 @@ +[character] +success_symbol = "[>](bold green)" +error_symbol = "[x](bold red)" +vimcmd_symbol = "[<](bold green)" + +[git_commit] +tag_symbol = " tag " + +[git_status] +ahead = ">" +behind = "<" +diverged = "<>" +renamed = "r" +deleted = "x" + +[aws] +symbol = "aws " + +[bun] +symbol = "bun " + +[c] +symbol = "C " + +[cobol] +symbol = "cobol " + +[conda] +symbol = "conda " + +[crystal] +symbol = "cr " + +[cmake] +symbol = "cmake " + +[daml] +symbol = "daml " + +[dart] +symbol = "dart " + +[deno] +symbol = "deno " + +[dotnet] +symbol = ".NET " + +[directory] +read_only = " ro" + +[docker_context] +symbol = "docker " + +[elixir] +symbol = "exs " + +[elm] +symbol = "elm " + +[git_branch] +symbol = "git " + +[golang] +symbol = "go " + +[hg_branch] +symbol = "hg " + +[java] +symbol = "java " + +[julia] +symbol = "jl " + +[kotlin] +symbol = "kt " + +[lua] +symbol = "lua " + +[nodejs] +symbol = "nodejs " + +[memory_usage] +symbol = "memory " + +[meson] +symbol = "meson " + +[nim] +symbol = "nim " + +[nix_shell] +symbol = "nix " + +[ocaml] +symbol = "ml " + +[package] +symbol = "pkg " + +[perl] +symbol = "pl " + +[php] +symbol = "php " + +[pulumi] +symbol = "pulumi " + +[purescript] +symbol = "purs " + +[python] +symbol = "py " + +[raku] +symbol = "raku " + +[ruby] +symbol = "rb " + +[rust] +symbol = "rs " + +[scala] +symbol = "scala " + +[spack] +symbol = "spack " + +[sudo] +symbol = "sudo " + +[swift] +symbol = "swift " + +[terraform] +symbol = "terraform " + +[zig] +symbol = "zig " diff --git a/common/commandline/starship.nix b/common/commandline/starship.nix new file mode 100644 index 0000000..1683765 --- /dev/null +++ b/common/commandline/starship.nix @@ -0,0 +1,26 @@ +inputs: {lib, ...}: { + home-manager.users.minijackson = { + programs.starship = { + enable = true; + enableZshIntegration = false; + + settings = lib.mkMerge [ + { + directory = { + fish_style_pwd_dir_length = 2; + style = "bold blue"; + }; + jobs.symbol = "+ "; + nix_shell.style = "bold blue"; + package = { + disabled = true; + style = "bold green"; + }; + rust.style = "bold dimmed yellow"; + } + + (lib.importTOML ./starship-plain-text-symbols.toml) + ]; + }; + }; +} -- cgit v1.2.3