Starship/en: Difference between revisions

FuzzyBot (talk | contribs)
Updating to match new version of source page
 
FuzzyBot (talk | contribs)
Updating to match new version of source page
 
Line 31: Line 31:
];
];
</syntaxhighlight>
</syntaxhighlight>
After updating your configuration, apply the changes by running:
After updating your configuration, apply the changes by running:


Line 42: Line 43:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  programs.starship.enable = true; #enable starship
programs.starship.enable = true;
</syntaxhighlight>
</syntaxhighlight>
after you have installed starship you need to source it in your shell
after you have installed starship you need to source it in your shell


Bash:
Bash:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
eval "$(starship init bash)"
eval "$(starship init bash)"
</syntaxhighlight>
</syntaxhighlight>
zsh:
 
Zsh:
 
<syntaxhighlight lang="zsh">
<syntaxhighlight lang="zsh">
eval "$(starship init zsh)"
eval "$(starship init zsh)"
</syntaxhighlight>
</syntaxhighlight>
fish:
 
Fish:
 
<syntaxhighlight lang="fish">
<syntaxhighlight lang="fish">
starship init fish | source
starship init fish | source
</syntaxhighlight>
</syntaxhighlight>
if you use other shells than what I just mentioned please head to this [https://starship.rs/guide/#step-2-set-up-your-shell-to-use-starship page]
if you use other shells than what I just mentioned please head to this [https://starship.rs/guide/#step-2-set-up-your-shell-to-use-starship page]


Line 64: Line 72:
you can customize starship with Nix (here's a snippet to understand)
you can customize starship with Nix (here's a snippet to understand)
<nowiki>:</nowiki>
<nowiki>:</nowiki>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.starship = {
programs.starship = {
      enable = true;
  enable = true;
      settings = {
  settings = {
        add_newline = true;
    add_newline = true;
        command_timeout = 1300;
    command_timeout = 1300;
        scan_timeout = 50;
    scan_timeout = 50;
        format= "$all$nix_shell$nodejs$lua$golang$rust$php$git_branch$git_commit$git_state$git_status\n$username$hostname$directory";
    format = "$all$nix_shell$nodejs$lua$golang$rust$php$git_branch$git_commit$git_state$git_status\n$username$hostname$directory";
        character = {
    character = {
          success_symbol = "[](bold green) ";
      success_symbol = "[](bold green) ";
          error_symbol = "[✗](bold red) ";
      error_symbol = "[✗](bold red) ";
        };
    };
      };
  };
};
};
</syntaxhighlight>
</syntaxhighlight>
since we can't include every option on Starship here's a GitHub link [https://gist.github.com/s-a-c/0e44dc7766922308924812d4c019b109#file-starship-nix/ containing every configuration option]


and here's the official documentation to explain each option [https://starship.rs/config/ starship configuration guide]
since we can't include every option on Starship here's a GitHub link <noinclude> [https://gist.github.com/s-a-c/0e44dc7766922308924812d4c019b109#file-starship-nix/ containing every configuration option] </noinclude> and here's the official documentation to explain each option [https://starship.rs/config/ starship configuration guide]


good luck :D
good luck :D


[[Category:Shell]]
[[Category:Shell]]