-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp10k_custom_colors.sh
executable file
·27 lines (25 loc) · 1.04 KB
/
p10k_custom_colors.sh
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
#!/bin/bash
# Define an associative array to map lines to new values
declare -A replacements=(
["POWERLEVEL9K_OS_ICON_BACKGROUND"]="15"
["POWERLEVEL9K_DIR_BACKGROUND"]="21"
["POWERLEVEL9K_STATUS_OK_FOREGROUND"]="10"
["POWERLEVEL9K_STATUS_OK_BACKGROUND"]="16"
["POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND"]="10"
["POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND"]="16"
["POWERLEVEL9K_STATUS_ERROR_FOREGROUND"]="3"
["POWERLEVEL9K_STATUS_ERROR_BACKGROUND"]="16"
["POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND"]="15"
["POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND"]="195"
["POWERLEVEL9K_CPU_ARCH_FOREGROUND"]="15"
["POWERLEVEL9K_CPU_ARCH_BACKGROUND"]="21"
["POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND"]="15"
["POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND"]="21"
["POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND"]="16"
["POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND"]="12"
["POWERLEVEL9K_TIME_BACKGROUND"]="15"
)
# Update the .p10k.zsh file with the new values
for line in "${!replacements[@]}"; do
sed -i "s/$line=.*$/$line=${replacements[$line]}/" ~/.p10k.zsh
done