diff --git a/modules/user/shell/config.fish b/modules/user/shell/config.fish index e69de29..c81fefa 100644 --- a/modules/user/shell/config.fish +++ b/modules/user/shell/config.fish @@ -0,0 +1 @@ +set fish_greeting "" diff --git a/modules/user/shell/default.nix b/modules/user/shell/default.nix index 56b92c3..df0d26e 100644 --- a/modules/user/shell/default.nix +++ b/modules/user/shell/default.nix @@ -1,5 +1,9 @@ # This shell setup was inspired by sioodmy. Check out his setup! -{pkgs, ...}: let +{ + lib, + pkgs, + ... +}: let toml = pkgs.formats.toml {}; starship-config = import ./starship.nix; aliases = import ./aliases.nix {inherit pkgs;}; diff --git a/modules/user/shell/fishinit.nix b/modules/user/shell/fishinit.nix index f469eec..caaee8b 100644 --- a/modules/user/shell/fishinit.nix +++ b/modules/user/shell/fishinit.nix @@ -7,6 +7,7 @@ pkgs.writeText "config.fish" '' # source ${pkgs.fishPlugins.sponge}/share/zsh-defer/zsh-defer.plugin.zsh ${pkgs.atuin}/bin/atuin init fish | source ${pkgs.zoxide}/bin/zoxide init fish | source + ${pkgs.starship}/bin/starship init fish | source source ${./config.fish} diff --git a/modules/user/shell/starship.nix b/modules/user/shell/starship.nix index 2c63c08..90547f2 100644 --- a/modules/user/shell/starship.nix +++ b/modules/user/shell/starship.nix @@ -1,2 +1,60 @@ { + add_newline = false; + command_timeout = 2000; + format = "$hostname$username$directory$shell$nix_shell$git_branch$git_commit$git_state$git_status$jobs$cmd_duration\n$character"; + scan_timeout = 2; + + character = { + error_symbol = "[](bold red)"; + format = "$symbol [|](bold bright-black) "; + success_symbol = "[](bold green)"; + vicmd_symbol = "[](bold yellow)"; + }; + directory = { + format = "[ ](bold green) [$path]($style) "; + truncation_length = 2; + }; + git_branch = { + style = "bold purple"; + }; + + git_commit.commit_hash_length = 7; + + git_status = { + ahead = "⇡ "; + behind = "⇣ "; + conflicted = " "; + deleted = "✘ "; + diverged = "⇆ "; + modified = "!"; + renamed = "»"; + staged = "+"; + stashed = "≡"; + style = "red"; + untracked = "?"; + }; + + golang.symbol = "[󰟓 ](blue)"; + hostname = { + disabled = false; + format = "@[$hostname](bold blue) "; + ssh_only = true; + }; + + line_break.disabled = false; + + c.symbol = "[ ](black)"; + lua.symbol = "[ ](blue) "; + + nix_shell.symbol = "[󱄅 ](blue) "; + + nodejs.symbol = "[󰎙 ](yellow)"; + + package.symbol = "📦 "; + + python.symbol = "[ ](blue) "; + + rust.symbol = "[ ](red) "; + + username.format = "[$user]($style) in "; }