Starship/fr: Difference between revisions

From NixOS Wiki
Nyxar77 (talk | contribs)
Created page with "Bonne chance pour la configuration"
Nyxar77 (talk | contribs)
Created page with "dfvdfvdvf"
Line 1: Line 1:
<languages/>
<languages/>
<div lang="en" dir="ltr" class="mw-content-ltr">
dfvdfvdvf
[https://starship.rs/ Starship] is a fast, customizable, and minimal prompt for any shell. written in Rust, It displays relevant information like the current directory, Git status, runtime versions, and more, adapting to the context with minimal configuration. It supports multiple shells, including '''Bash''', [https://wiki.nixos.org/wiki/Zsh '''Zsh'''], [https://wiki.nixos.org/wiki/Fish '''Fish'''], '''PowerShell''' and a lot of other shells, and your configuration will stay persistent across all these shells and is designed for speed and efficiency.
</div>


== Installation ==
== Installation ==

Revision as of 12:19, 25 October 2024

dfvdfvdvf

Installation

en utilisant nix-shell

nix-shell -p starship

en utilisant Global Configuration

environment.systemPackages = [
  pkgs.starship
];

Après avoir modifié votre configuration, appliquez les modifications en exécutant:

sudo nixos-rebuild switch

en utilisant Home Configuration

home.packages = [ 
  pkgs.starship 
];

Après avoir modifié votre configuration, appliquez les modifications en exécutant:

home-manager switch

Configuration

Basique

  programs.starship.enable = true; #enable starship

après avoir installé Starship, vous devez le sourcer dans votre shell

Bash:

eval "$(starship init bash)"

zsh:

eval "$(starship init zsh)"

fish:

starship init fish | source

si vous utilisez d'autres shells que ceux que je viens de mentionner, veuillez vous rendre ici

Avancé

Vous pouvez personnaliser Starship avec Nix (voici un extrait pour comprendre) :

programs.starship = {
      enable = true;
      settings = {
        add_newline = true;
        command_timeout = 1300;
        scan_timeout = 50;
        format= "$all$nix_shell$nodejs$lua$golang$rust$php$git_branch$git_commit$git_state$git_status\n$username$hostname$directory";
        character = {
          success_symbol = "[](bold green) ";
          error_symbol = "[✗](bold red) ";
        };
      };
};

since we can't include every option on Starship here's a GitHub link containing every configuration option

et voici la documentation officielle pour expliquer chaque option

Bonne chance pour la configuration :D