only attemtpt to source starship if we actually enable it
This commit is contained in:
parent
d69a1b81fa
commit
73de968231
|
@ -25,7 +25,6 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellInit = "
|
shellInit = "
|
||||||
zoxide init fish | source
|
zoxide init fish | source
|
||||||
starship init fish | source
|
|
||||||
direnv hook fish | source
|
direnv hook fish | source
|
||||||
source ~/.config/op/plugins.sh
|
source ~/.config/op/plugins.sh
|
||||||
";
|
";
|
||||||
|
|
|
@ -13,54 +13,62 @@ in {
|
||||||
enable = mkBoolOpt true "Whether or not to enable starship shell";
|
enable = mkBoolOpt true "Whether or not to enable starship shell";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config =
|
||||||
programs.starship = {
|
mkIf cfg.enable {
|
||||||
enable = true;
|
programs = {
|
||||||
enableTransience = true;
|
fish.shellInit = "
|
||||||
settings = {
|
|
||||||
character = {
|
starship init fish | source
|
||||||
error_symbol = "[ ](bold red)";
|
";
|
||||||
};
|
|
||||||
time = {
|
starship = {
|
||||||
disabled = false;
|
enable = true;
|
||||||
time_format = "%T";
|
enableTransience = true;
|
||||||
utc_time_offset = "+1";
|
settings = {
|
||||||
};
|
character = {
|
||||||
username = {
|
error_symbol = "[ ](bold red)";
|
||||||
style_user = "#00de00";
|
};
|
||||||
style_root = "red";
|
time = {
|
||||||
format = "[$user]($style) ";
|
disabled = false;
|
||||||
disabled = false;
|
time_format = "%T";
|
||||||
show_always = true;
|
utc_time_offset = "+1";
|
||||||
};
|
};
|
||||||
hostname = {
|
username = {
|
||||||
ssh_only = false;
|
style_user = "#00de00";
|
||||||
format = "@ [$hostname](bold yellow) ";
|
style_root = "red";
|
||||||
disabled = false;
|
format = "[$user]($style) ";
|
||||||
};
|
disabled = false;
|
||||||
directory = {
|
show_always = true;
|
||||||
home_symbol = " ~";
|
};
|
||||||
read_only_style = "197";
|
hostname = {
|
||||||
read_only = " ";
|
ssh_only = false;
|
||||||
format = "at [$path]($style)[$read_only]($read_only_style) ";
|
format = "@ [$hostname](bold yellow) ";
|
||||||
};
|
disabled = false;
|
||||||
git_metrics = {
|
};
|
||||||
disabled = false;
|
directory = {
|
||||||
added_style = "bold blue";
|
home_symbol = " ~";
|
||||||
format = "[+$added]($added_style)/[-$deleted]($deleted_style) ";
|
read_only_style = "197";
|
||||||
};
|
read_only = " ";
|
||||||
git_status = {
|
format = "at [$path]($style)[$read_only]($read_only_style) ";
|
||||||
format = "([$all_status$ahead_behind]($style) )";
|
};
|
||||||
ahead = "[↑$count](bold green)";
|
git_metrics = {
|
||||||
behind = "[↓$count](bold red)";
|
disabled = false;
|
||||||
diverged = "[↕↓$ahead_count↑$behind_count](red)";
|
added_style = "bold blue";
|
||||||
deleted = "[✘$count](red) ";
|
format = "[+$added]($added_style)/[-$deleted]($deleted_style) ";
|
||||||
modified = "[!$count](yellow) ";
|
};
|
||||||
staged = "[+$count](green) ";
|
git_status = {
|
||||||
renamed = "[➜$count](green) ";
|
format = "([$all_status$ahead_behind]($style) )";
|
||||||
untracked = "[?$count](blue) ";
|
ahead = "[↑$count](bold green)";
|
||||||
|
behind = "[↓$count](bold red)";
|
||||||
|
diverged = "[↕↓$ahead_count↑$behind_count](red)";
|
||||||
|
deleted = "[✘$count](red) ";
|
||||||
|
modified = "[!$count](yellow) ";
|
||||||
|
staged = "[+$count](green) ";
|
||||||
|
renamed = "[➜$count](green) ";
|
||||||
|
untracked = "[?$count](blue) ";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue