Skip to content

Commit

Permalink
feat: add starship
Browse files Browse the repository at this point in the history
  • Loading branch information
icecreammatt committed Jan 28, 2024
1 parent b90a790 commit 546633a
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions hosts/asahi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ in
../../modules/common.nix
# ../../modules/common-linux-gui.nix
../../modules/shell/gitui.nix
../../modules/shell/starship.nix
../../modules/rust.nix
# ../../modules/keyboard-dev.nix
{
Expand Down
67 changes: 67 additions & 0 deletions modules/shell/starship.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{ config, pkgs, ... }:

{
programs.starship.enableFishIntegration = true;
programs.starship.enable = true;
programs.starship.settings = {
add_newline = false;
format = "$shlvl$shell$username$hostname$nix_shell$git_branch$git_commit$git_state$git_status$directory$jobs$cmd_duration$character";
shlvl = {
disabled = false;
symbol = "ﰬ";
style = "bright-red bold";
};
shell = {
disabled = false;
format = "$indicator";
fish_indicator = "";
bash_indicator = "[BASH](bright-white) ";
zsh_indicator = "[ZSH](bright-white) ";
};
username = {
style_user = "bright-white bold";
style_root = "bright-red bold";
};
hostname = {
style = "bright-green bold";
ssh_only = true;
};
nix_shell = {
symbol = "";
format = "[$symbol$name]($style) ";
style = "bright-purple bold";
};
git_branch = {
only_attached = true;
format = "[$symbol$branch]($style) ";
symbol = "שׂ";
style = "bright-yellow bold";
};
git_commit = {
only_detached = true;
format = "[ﰖ$hash]($style) ";
style = "bright-yellow bold";
};
git_state = {
style = "bright-purple bold";
};
git_status = {
style = "bright-green bold";
};
directory = {
read_only = " ";
truncation_length = 0;
};
cmd_duration = {
format = "[$duration]($style) ";
style = "bright-blue";
};
jobs = {
style = "bright-green bold";
};
character = {
success_symbol = "[\\$](bright-green bold)";
error_symbol = "[\\$](bright-red bold)";
};
};
}

0 comments on commit 546633a

Please sign in to comment.