Skip to content

Commit e87625d

Browse files
committed
updates
1 parent 2792a38 commit e87625d

File tree

2 files changed

+130
-2
lines changed

2 files changed

+130
-2
lines changed

ansible_osx.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
'zlib',
6868
'zsh',
6969
'tldr',
70+
'starship',
7071
'derailed/k9s/k9s',
7172
'kubecm',
7273
'spacelift-io/spacelift/spacectl',
@@ -145,16 +146,26 @@
145146
pip3 install ansible
146147
asdf reshim python
147148
148-
- name: "Setup pipx and venv and atuin"
149+
- name: "Setup pipx and venv and atuin and starship"
149150
shell: |
150-
echo '/neval "$(atuin init zsh)"/n' >> /Users/{{ lookup('env', 'USER') }}/.zshrc
151+
echo '/neval "$(atuin init zsh)"/neval "$(starship init zsh)"/nexport STARSHIP_CONFIG=~/.config/starship.toml/n' >> /Users/{{ lookup('env', 'USER') }}/.zshrc
151152
pip install --user pipx
152153
pipx ensurepath
153154
source /Users/{{ lookup('env', 'USER') }}/.zshrc
154155
pipx install virtualenv
155156
mkdir /Users/{{ lookup('env', 'USER') }}/venv
157+
158+
- name: Copy ~/.config/starship.toml
159+
copy:
160+
src: copy_files/starship.toml
161+
dest: /Users/{{ lookup('env', 'USER') }}/.config/starship.toml
162+
owner: "{{ lookup ('env', 'USER') }}"
156163

157164
# AVANT STUFF
165+
- name: Make github directory
166+
shell: |
167+
mkdir /Users/{{ lookup('env', 'USER') }}/Desktop/github
168+
158169
- name: Add venv() function to zshrc
159170
blockinfile:
160171
path: "/Users/{{ lookup('env', 'USER') }}/.zshrc"

copy_files/starship.toml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# ~/.config/starship.toml
2+
3+
format = """
4+
$username\
5+
$directory\
6+
$git_branch\
7+
$git_commit\
8+
$git_state\
9+
$git_metrics\
10+
$git_status\
11+
$python\
12+
$all
13+
"""
14+
15+
# Displays text, typically a single character,
16+
# based on the status of the previous command.
17+
[character]
18+
success_symbol = "[❯](fg:#83DCC8)" # normal prompt
19+
error_symbol = "[✗](bold red)" # used if previous command failed
20+
21+
[aws]
22+
format = ' [$symbol($profile )(\($region\))]($style)'
23+
style = "bold blue"
24+
symbol = ""
25+
26+
[cmd_duration]
27+
min_time = 5_000 # Show command duration over 5,000 milliseconds (=5 sec)
28+
format = " took [$duration]($style)"
29+
30+
[directory]
31+
truncation_length = 10
32+
format = "[$path]($style)[$lock_symbol]($lock_style) "
33+
34+
[docker_context]
35+
format = "via [🐋 $context](blue bold)"
36+
37+
[git_branch]
38+
format = " [$symbol](bold purple)[$branch]($style) "
39+
symbol = ""
40+
#symbol = "🌱 "
41+
style = "fg:#83DCC8"
42+
43+
[git_commit]
44+
commit_hash_length = 8
45+
style = "bold white"
46+
47+
[git_state]
48+
format = '[\($state( $progress_current of $progress_total)\)]($style) '
49+
cherry_pick = "[🍒 PICKING](bold red)"
50+
51+
[git_status]
52+
format = "$all_status$ahead_behind"
53+
conflicted = ""
54+
ahead = "  ×${count}"
55+
behind = "  ×${count}"
56+
diverged = "  < ×${ahead_count}  ×${behind_count}>"
57+
untracked = "  ×${count}"
58+
stashed = "  ×${count}"
59+
modified = "  ×${count}"
60+
staged = "  ×${count}"
61+
renamed = "  ×${count}"
62+
deleted = "  ×${count}"
63+
style = "bright-white"
64+
65+
[hostname]
66+
ssh_only = true
67+
ssh_symbol = '🌐 '
68+
format = '[$ssh_symbol$hostname]($style) in '
69+
trim_at = "-"
70+
style = "bold dimmed white"
71+
disabled = false
72+
73+
[golang]
74+
format = "via [$symbol($version )]($style)"
75+
symbol = "[](fg:#03fce8)"
76+
style = "bold cyan"
77+
78+
[julia]
79+
format = "[$symbol$version]($style) "
80+
symbol = ""
81+
style = "bold green"
82+
83+
[package]
84+
disabled = true
85+
86+
#[python]
87+
#format = '[ via ](dimmed white)[${symbol}(${version})(\($virtualenv\) )]($style)'
88+
#style = "fg:#83DCC8"
89+
#python_binary = ["python3", "python"]
90+
#symbol = "[ ](fg:#3776ab) " # actual python blue
91+
92+
[rust]
93+
format = "[$symbol$version]($style) "
94+
style = "bold green"
95+
96+
[username]
97+
style_user = "dimmed cyan"
98+
show_always = true
99+
100+
[custom.zsh]
101+
when = '[[ ! -n "${VIRTUAL_ENV}" ]]'
102+
style = "bold red"
103+
format = '[ 󱔎 NO PYTHON ENVIORNMENT SET ]($style)'
104+
105+
[kubernetes]
106+
# format = 'on [⛵ ($user on )($cluster in )$context \($namespace\)](dimmed green) '
107+
format = 'on [⛵ $context ](blue)'
108+
disabled = false
109+
110+
[[kubernetes.contexts]]
111+
context_pattern = ".*slice.*"
112+
context_alias = "LOCAL"
113+
114+
115+
[[kubernetes.contexts]]
116+
context_pattern = "arn:aws:eks:.*"
117+
context_alias = "EKS"

0 commit comments

Comments
 (0)