blob: 827c2a93b98b6630a89c29b3a54dc1aaa2466af3 (
plain) (
blame)
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
{
lib,
nixosConfig,
pkgs,
...
}: {
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = false;
format = lib.concatStrings [
"\${custom.status_output}$directory\${custom.status_clear}"
"$username"
"$cmd_duration"
"$status"
"$character"
];
right_format = lib.concatStrings (
[
"$git_metrics"
"$git_branch"
"$git_status"
"$git_commit"
"$git_state"
"$time"
]
++ lib.optional
nixosConfig.soispha.laptop.enable
"$battery"
);
scan_timeout = 20;
character = {
# success_symbol = "[❯](bold blue)";
# a = "⬢";
success_symbol = "[](bold blue)";
error_symbol = "[](bold red)";
};
status = {
disabled = false;
format = "([($common_meaning \\($status\\))($signal_name \\($signal_number\\))]($style) )";
};
time = {
disabled = false;
format = "[\\[$time\\]]($style)";
};
username = {
format = "as [$user]($style) ";
};
git_status = {
disabled = true;
format = "([\\[$ahead_behind\\]]($style) )";
ahead = "⇡$count";
diverged = "⇕⇡$ahead_count⇣$behind_count";
behind = "⇣$count";
};
git_metrics = {
disabled = false;
ignore_submodules = true;
};
git_state = {
format = "[\($state( $progress_current of $progress_total)\)]($style) ";
rebase = "[rebasing](bold magenta)";
merge = "[merging](bold yellow)";
revert = "[reverting](bold blue)";
cherry_pick = "[picking](bold red)";
bisect = "[bisecting](bold red)";
am = "[applying](bold green)";
am_or_rebase = "[applying/rebasing](bold yellow)";
};
git_commit = {
tag_disabled = false;
tag_symbol = "v";
format = "[(\\[$hash$tag\\] )]($style) ";
};
directory = {
truncate_to_repo = true;
read_only = "";
before_repo_root_style = "black bold dimmed";
format =
"[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)$path[$read_only]($read_only_style)";
};
cmd_duration = {
min_time = 2000; # Milliseconds
style = "bold white";
};
custom = {
status_output = {
format = "$output";
command = "if test $STARSHIP_CMD_STATUS -ne 0; then echo \"\\033[31;1m\"; else echo \"\\033[34;1m\"; fi";
shell = [ "${pkgs.dash}" ];
};
status_clear = {
when = "test $STARSHIP_CMD_STATUS -ne 0";
format = "$output";
command = "echo \"\\033[m\"";
shell = [ "${pkgs.dash}" ];
};
};
battery = {
# ' '
# ' '
# ' '
# ' '
# ' '
display = [
{
threshold = 10;
style = "bold red";
}
{
threshold = 30;
style = "bold blue";
}
{
threshold = 50;
style = "bold green";
}
];
};
};
};
}
|