blob: 465fc1d3ad544a2559a77948d244c2b868f25b6c (
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
#!/usr/bin/env perl
use 5.014;
use warnings;
my $char = $ARGV[0] eq 'root' ? '#' : '\\\\$';
my $user = $ARGV[0] eq 'root' ? 'bright-red' : 'bright-blue';
my $host = {
'mz-doy1' => 'bright-white',
'tozt' => 'bright-yellow',
'partofme' => 'magenta',
'mail' => 'green',
'hornet' => 'red',
}->{$ARGV[1]} // 'yellow';
while (<DATA>) {
s/\@\@CHAR\@\@/$char/;
s/\@\@USER\@\@/$user/;
s/\@\@HOST\@\@/$host/;
print;
}
__DATA__
format = """
[\\(](host)$directory([|](host)$git_branch$git_commit$git_status([|](host)$git_state))[\\)](host)( $aws)( $kubernetes)( $pulumi) $fill ($cmd_duration )([{](host)$battery[}](host) )$username[@](bg)$hostname [\\[](host)$time[\\]](host)$line_break\
$status [@@CHAR@@](user)
"""
right_format = '$character'
add_newline = false
palette = 'local'
[directory]
format = '[$path]($style)[$read_only]($read_only_style)'
style = 'bg'
repo_root_format = '[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style)'
repo_root_style = 'git'
fish_style_pwd_dir_length = 1
[git_state]
format = '[$state(:$progress_current/$progress_total)]($style)'
style = 'git'
rebase = 'r'
merge = 'm'
revert = 'v'
cherry_pick = 'c'
bisect = 'b'
am = 'a'
am_or_rebase = 'r'
[git_branch]
format = '[$branch(:$remote_branch)]($style)'
style = 'git'
ignore_branches = ['main', 'master']
[git_commit]
format = '[$hash$tag]($style)'
style = 'git'
[git_status]
format = '[$all_status$ahead_behind]($style)'
style = 'bold git'
modified = '*'
stashed = ''
diverged = '+$ahead_count-$behind_count'
ahead = '+$count'
behind = '-$count'
[aws]
format = '[$symbol$profile]($style)'
symbol = '☁️'
style = 'bg'
[kubernetes]
disabled = false
format = '[$symbol$context]($style)'
symbol = '☸'
style = 'bg'
[pulumi]
format = '[$symbol$stack]($style)'
symbol = ''
style = 'bg'
[fill]
symbol = '─'
style = 'bg'
[cmd_duration]
format = '[\($duration\)]($style)'
style = 'bg'
[battery]
format = '[$percentage]($style)'
[[battery.display]]
threshold = 5
style = 'bright-red'
[[battery.display]]
threshold = 15
style = 'red'
[[battery.display]]
threshold = 40
style = 'yellow'
[username]
disabled = false
format = '[$user]($style)'
style_user = 'user'
show_always = true
[hostname]
disabled = false
format = '[$hostname]($style)'
style = 'host'
ssh_only = false
[time]
disabled = false
format = '[$time]($style)'
style = 'bg'
[line_break]
[status]
disabled = false
format = '[$status]($style)'
[character]
format = '$symbol'
success_symbol = ''
error_symbol = ''
vimcmd_symbol = '[\[NOR\]](bright-yellow)'
[palettes.local]
bg = 'bright-black'
git = 'green'
user = '@@USER@@'
host = '@@HOST@@'
|