From 943dd97f99e535d2aa90682848ab6c4909a849b4 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 27 Oct 2024 22:47:37 +0100 Subject: common/zsh: use starship by default --- .../commandline/starship-plain-text-symbols.toml | 18 +++++++++++++ common/commandline/starship.nix | 13 +++++----- common/commandline/zsh.nix | 30 +++++----------------- 3 files changed, 31 insertions(+), 30 deletions(-) (limited to 'common') diff --git a/common/commandline/starship-plain-text-symbols.toml b/common/commandline/starship-plain-text-symbols.toml index 32126a0..b6412b4 100644 --- a/common/commandline/starship-plain-text-symbols.toml +++ b/common/commandline/starship-plain-text-symbols.toml @@ -73,6 +73,9 @@ symbol = "gcp " [git_branch] symbol = "git " +[gleam] +symbol = "gleam " + [golang] symbol = "go " @@ -106,6 +109,9 @@ symbol = "memory " [meson] symbol = "meson " +[nats] +symbol = "nats " + [nim] symbol = "nim " @@ -119,7 +125,9 @@ symbol = "ml " symbol = "opa " [os.symbols] +AIX = "aix " Alpaquita = "alq " +AlmaLinux = "alma " Alpine = "alp " Amazon = "amz " Android = "andr " @@ -136,6 +144,7 @@ Garuda = "garu " Gentoo = "gent " HardenedBSD = "hbsd " Illumos = "lum " +Kali = "kali " Linux = "lnx " Mabox = "mbox " Macos = "mac " @@ -154,11 +163,14 @@ Pop = "pop " Raspbian = "rasp " Redhat = "rhl " RedHatEnterprise = "rhel " +RockyLinux = "rky " Redox = "redox " Solus = "sol " SUSE = "suse " Ubuntu = "ubnt " +Ultramarine = "ultm " Unknown = "unk " +Void = "void " Windows = "win " [package] @@ -182,6 +194,9 @@ symbol = "purs " [python] symbol = "py " +[quarto] +symbol = "quarto " + [raku] symbol = "raku " @@ -209,6 +224,9 @@ symbol = "sudo " [swift] symbol = "swift " +[typst] +symbol = "typst " + [terraform] symbol = "terraform " diff --git a/common/commandline/starship.nix b/common/commandline/starship.nix index 1683765..5983d2e 100644 --- a/common/commandline/starship.nix +++ b/common/commandline/starship.nix @@ -2,20 +2,21 @@ inputs: {lib, ...}: { home-manager.users.minijackson = { programs.starship = { enable = true; - enableZshIntegration = false; + enableZshIntegration = true; settings = lib.mkMerge [ { directory = { fish_style_pwd_dir_length = 2; - style = "bold blue"; + repo_root_style = "bold cyan"; + style = "bold white"; + truncate_to_repo = false; }; + jobs.symbol = "+ "; + nix_shell.style = "bold blue"; - package = { - disabled = true; - style = "bold green"; - }; + package.style = "bold green"; rust.style = "bold dimmed yellow"; } diff --git a/common/commandline/zsh.nix b/common/commandline/zsh.nix index f2a052b..8f818dc 100644 --- a/common/commandline/zsh.nix +++ b/common/commandline/zsh.nix @@ -13,14 +13,11 @@ in programs.zsh = { enable = true; - interactiveShellInit = '' + interactiveShellInit = lib.mkBefore '' # Use cache file as is, to speed-up start time # This does mean we have to run once in a while: # compinit -d .config/zsh/.zcompdump - zstyle ':grml:completion:compinit' arguments -C - - source "${pkgs.grml-zsh-config}/etc/zsh/zshrc" - is4 && xsource "${pkgs.grml-zsh-config}/etc/zsh/keephack" + autoload -U compinit && compinit -C source "${pkgs.zsh-history-substring-search}/share/zsh-history-substring-search/zsh-history-substring-search.zsh" @@ -29,22 +26,14 @@ in local dim_fg_escape_code="${fgEscapeCode config.theme.colors.dimForeground}" ${builtins.readFile ../../dotfiles/zshrc} - - autoload -Uz shmart-prompt-dir - zstyle -e ':prompt:grml*:*:items:path' token shmart-prompt-dir - } - - # Grml's ZSH config overrides less variables - export ${ - lib.concatStringsSep " " ( - lib.mapAttrsToList (variable: value: "${variable}=\"${value}\"") config.programs.less.envVariables - ) } ''; - # otherwise it'll override the grml prompt + # not needed, since we're using starship promptInit = ""; - # Grml handles that, and supports cache (faster!!!) + # Use cache file as is, to speed-up start time + # This does mean we have to run once in a while: + # compinit -d .config/zsh/.zcompdump enableGlobalCompInit = false; syntaxHighlighting = { @@ -94,13 +83,6 @@ in dotDir = ".config/zsh"; history.path = "${config.xdg.dataHome}/zsh/zsh_history"; - plugins = [ - { - name = "shmart-prompt-dir"; - src = inputs.shmart-prompt-dir; - file = "none"; - } - ]; }; } ) -- cgit v1.2.3