-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstarship.nix
106 lines (106 loc) · 2.94 KB
/
starship.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{ lib, ... }:
{
programs.starship = {
enable = true;
settings = {
add_newline = false;
format = lib.concatStrings [
"($username )"
"($hostname )"
"$directory "
"($git_branch )"
"($git_commit )"
"$git_state"
"$git_status"
"$character"
];
right_format = lib.concatStrings [
"($status )"
"($cmd_duration )"
"($jobs )"
"($python )"
"($rust )"
"$time"
];
command_timeout = 60; # 60ms must be enough. I like a responsive prompt more than additional git information.
username = {
format = "[$user]($style)";
style_root = "bold red";
style_user = "bold purple";
aliases.root = "";
};
hostname = {
format = "[$hostname]($style)[$ssh_symbol](green)";
ssh_only = true;
ssh_symbol = " ";
style = "bold red";
};
directory = {
format = "[$path]($style)[$read_only]($read_only_style)";
fish_style_pwd_dir_length = 1;
style = "bold blue";
};
character = {
success_symbol = "\\$";
error_symbol = "\\$";
vimcmd_symbol = "[](bold green)";
vimcmd_replace_one_symbol = "[](bold purple)";
vimcmd_replace_symbol = "[](bold purple)";
vimcmd_visual_symbol = "[](bold yellow)";
};
git_branch = {
format = "[$symbol$branch]($style)";
symbol = " ";
style = "green";
};
git_commit = {
commit_hash_length = 8;
format = "[$hash$tag]($style)";
style = "green";
};
git_status = {
conflicted = "$count";
ahead = "⇡$count";
behind = "⇣$count";
diverged = "⇡$ahead_count⇣$behind_count";
untracked = "?$count";
stashed = "\\$$count";
modified = "!$count";
staged = "+$count";
renamed = "→$count";
deleted = "-$count";
format = lib.concatStrings [
"[($conflicted )](red)"
"[($stashed )](magenta)"
"[($staged )](green)"
"[($deleted )](red)"
"[($renamed )](blue)"
"[($modified )](yellow)"
"[($untracked )](blue)"
"[($ahead_behind )](green)"
];
};
status = {
disabled = false;
pipestatus = true;
pipestatus_format = "$pipestatus => [$int( $signal_name)]($style)";
pipestatus_separator = "[|]($style)";
pipestatus_segment_format = "[$status]($style)";
format = "[$status( $signal_name)]($style)";
style = "red";
};
python = {
format = "[$symbol$pyenv_prefix($version )(\($virtualenv\) )]($style)";
};
cmd_duration = {
format = "[ $duration]($style)";
style = "yellow";
};
time = {
format = "[ $time]($style)";
style = "cyan";
disabled = false;
};
};
};
}