├── .devcontainer ├── Dockerfile ├── devcontainer.json ├── on-create.sh └── post-create.sh ├── .editorconfig ├── .gitignore ├── LICENSE ├── README.md ├── azure-functions └── Build-LocalSettingsJson.ps1 ├── global.json ├── images └── use-this-template.png ├── oh-my-posh ├── Microsoft.PowerShell_profile.ps1 ├── p10k-with-clock.omp.json ├── p10k-without-clock.omp.json └── switch-p10k-clock.ps1 └── oh-my-zsh ├── .p10k-with-clock.zsh ├── .p10k-without-clock.zsh └── switch-p10k-clock.sh /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # [Choice] .NET version: 6.0-bullseye-slim, 6.0-jammy, 6.0-focal 2 | ARG VARIANT="6.0-jammy" 3 | FROM mcr.microsoft.com/dotnet/sdk:${VARIANT} 4 | 5 | # [Optional] Uncomment this section to install additional OS packages. 6 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 7 | # && apt-get -y install --no-install-recommends 8 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DevContainer for .NET", 3 | 4 | "build": { 5 | "dockerfile": "./Dockerfile", 6 | "context": ".", 7 | "args": { 8 | "VARIANT": "6.0-jammy" 9 | // Use this only if you need Razor support, until OmniSharp supports .NET 6 properly 10 | // "VARIANT": "6.0-focal" 11 | } 12 | }, 13 | 14 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 15 | "forwardPorts": [ 16 | // Azure Functions 17 | 7071, 18 | // Azurite 19 | 10000, 10001, 10002, 20 | // ASP.NET Core Web/API App, Blazor App 21 | 5000, 5001, 22 | // Azure Static Web Apps 23 | 4280 24 | ], 25 | 26 | "features": { 27 | // Uncomment the below to install Azure CLI 28 | // "ghcr.io/devcontainers/features/azure-cli:latest": { 29 | // "version": "latest" 30 | // }, 31 | 32 | // Uncomment the below to install GitHub CLI 33 | // "ghcr.io/devcontainers/features/github-cli:latest": { 34 | // "version": "latest" 35 | // }, 36 | 37 | // Uncomment the below to install node.js 38 | // "ghcr.io/devcontainers/features/node:latest": { 39 | // "version": "lts", 40 | // "nodeGypDependencies": true, 41 | // "nvmInstallPath": "/usr/local/share/nvm" 42 | // }, 43 | 44 | // Install common utilities 45 | "ghcr.io/devcontainers/features/common-utils:latest": { 46 | "installZsh": true, 47 | "installOhMyZsh": true, 48 | "upgradePackages": true, 49 | "username": "vscode", 50 | "uid": "1000", 51 | "gid": "1000" 52 | } 53 | }, 54 | 55 | "overrideFeatureInstallOrder": [ 56 | "ghcr.io/devcontainers/features/common-utils" 57 | ], 58 | 59 | // Configure tool-specific properties. 60 | "customizations": { 61 | // Configure properties specific to VS Code. 62 | "vscode": { 63 | // Add the IDs of extensions you want installed when the container is created. 64 | "extensions": [ 65 | // Recommended extensions - GitHub 66 | // "cschleiden.vscode-github-actions", 67 | // "GitHub.vscode-pull-request-github", 68 | 69 | // Recommended extensions - Azure 70 | // "Azurite.azurite", 71 | // "ms-azuretools.vscode-bicep", 72 | 73 | // Recommended extensions - Collaboration 74 | // "eamodio.gitlens", 75 | // "EditorConfig.EditorConfig", 76 | // "MS-vsliveshare.vsliveshare-pack", 77 | // "streetsidesoftware.code-spell-checker", 78 | 79 | // Recommended extensions - .NET 80 | // "Fudge.auto-using", 81 | // "jongrant.csharpsortusings", 82 | // "kreativ-software.csharpextensions", 83 | 84 | // Recommended extensions - Power Platform 85 | // "microsoft-IsvExpTools.powerplatform-vscode", 86 | 87 | // Recommended extensions - Markdown 88 | // "bierner.github-markdown-preview", 89 | // "DavidAnson.vscode-markdownlint", 90 | // "docsmsft.docs-linting", 91 | // "johnpapa.read-time", 92 | // "yzhang.markdown-all-in-one", 93 | 94 | // Required extensions 95 | "GitHub.copilot", 96 | "GitHub.copilot-labs", 97 | "GitHub.copilot-chat", 98 | "ms-dotnettools.csharp", 99 | "ms-vscode.PowerShell", 100 | "ms-vscode.vscode-node-azure-pack", 101 | "VisualStudioExptTeam.vscodeintellicode" 102 | ], 103 | 104 | "settings": { 105 | // Uncomment if you want to use zsh as the default shell 106 | "terminal.integrated.defaultProfile.linux": "zsh", 107 | "terminal.integrated.profiles.linux": { 108 | "zsh": { 109 | "path": "/usr/bin/zsh" 110 | } 111 | }, 112 | 113 | // Uncomment if you want to use CaskaydiaCove Nerd Font as the default terminal font 114 | "terminal.integrated.fontFamily": "CaskaydiaCove Nerd Font", 115 | 116 | // Uncomment if you want to disable the minimap view 117 | "editor.minimap.enabled": false, 118 | 119 | // Uncomment if you want to disable the welcome page of GitLens 120 | // "gitlens.showWelcomeOnInstall": false, 121 | // "gitlens.showWhatsNewAfterUpgrades": false, 122 | 123 | // Uncomment if you prefer the light colour theme 124 | // "workbench.colorTheme": "Default Light+", 125 | 126 | // Recommended settings for the explorer pane 127 | "explorer.sortOrder": "type", 128 | "explorer.fileNesting.enabled": true, 129 | "explorer.fileNesting.patterns": { 130 | "*.bicep": "${capture}.json,${capture}.parameters.json", 131 | "*.razor": "${capture}.razor.cs,${capture}.razor.css", 132 | "*.js": "${capture}.js.map" 133 | } 134 | } 135 | } 136 | }, 137 | 138 | // Uncomment if you want to use bash in 'onCreateCommand' after the container is created 139 | // "onCreateCommand": "/bin/bash ./.devcontainer/on-create.sh > ~/on-create.log", 140 | 141 | // Uncomment if you want to use bash in 'postCreateCommand' after the container is created 142 | // "postCreateCommand": "/bin/bash ./.devcontainer/post-create.sh > ~/post-create.log", 143 | 144 | // Uncomment if you want to use zsh in 'onCreateCommand' after the container is created 145 | "onCreateCommand": "/usr/bin/zsh ./.devcontainer/on-create.sh > ~/on-create.log", 146 | 147 | // Uncomment if you want to use zsh in 'postCreateCommand' after the container is created 148 | "postCreateCommand": "/usr/bin/zsh ./.devcontainer/post-create.sh > ~/post-create.log", 149 | 150 | // Uncomment if you want to connect other than 'root'. More info: https://aka.ms/vscode-remote/containers/non-root. 151 | "remoteUser": "vscode" 152 | } 153 | -------------------------------------------------------------------------------- /.devcontainer/on-create.sh: -------------------------------------------------------------------------------- 1 | ## Install additional apt packages 2 | sudo apt-get update && \ 3 | sudo apt upgrade -y && \ 4 | sudo apt-get install -y dos2unix libsecret-1-0 xdg-utils && \ 5 | sudo apt clean -y && \ 6 | sudo rm -rf /var/lib/apt/lists/* 7 | 8 | ## Configure git 9 | git config --global pull.rebase false 10 | git config --global core.autocrlf input 11 | 12 | ## Enable local HTTPS for .NET 13 | dotnet dev-certs https --trust 14 | 15 | ## CaskaydiaCove Nerd Font 16 | # Uncomment the below to install the CaskaydiaCove Nerd Font 17 | mkdir $HOME/.local 18 | mkdir $HOME/.local/share 19 | mkdir $HOME/.local/share/fonts 20 | wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/CascadiaCode.zip 21 | unzip CascadiaCode.zip -d $HOME/.local/share/fonts 22 | rm CascadiaCode.zip 23 | 24 | ## AZURE CLI EXTENSIONS ## 25 | # Uncomment the below to install Azure CLI extensions 26 | # extensions=$(az extension list-available --query "[].name" | jq -c -r '.[]') 27 | # extensions=(account alias deploy-to-azure functionapp subscription webapp) 28 | # for extension in $extensions; 29 | # do 30 | # az extension add --name $extension 31 | # done 32 | 33 | ## AZURE BICEP CLI ## 34 | # Uncomment the below to install Azure Bicep CLI. 35 | # az bicep install 36 | 37 | ## AZURE FUNCTIONS CORE TOOLS ## 38 | # Uncomment the below to install Azure Functions Core Tools. Make sure you have installed node.js 39 | # npm i -g azure-functions-core-tools@4 --unsafe-perm true 40 | 41 | ## Azurite ## 42 | # Uncomment the below to install Azurite. Make sure you have installed node.js 43 | # npm install -g azurite 44 | 45 | ## AZURE STATIC WEB APPS CLI ## 46 | # Uncomment the below to install Azure Static Web Apps CLI. Make sure you have installed node.js 47 | # npm install -g @azure/static-web-apps-cli 48 | 49 | ## AZURE DEV CLI ## 50 | # Uncomment the below to install Azure Dev CLI. Make sure you have installed Azure CLI and GitHub CLI 51 | # curl -fsSL https://aka.ms/install-azd.sh | bash 52 | 53 | ## GitHub Copilot CLI ## 54 | # Uncomment the below to install GitHub Copilot CLI. 55 | npm install -g @githubnext/github-copilot-cli 56 | eval "$(github-copilot-cli alias -- "$0")" 57 | 58 | ## OH-MY-POSH ## 59 | # Uncomment the below to install oh-my-posh 60 | sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh 61 | sudo chmod +x /usr/local/bin/oh-my-posh 62 | -------------------------------------------------------------------------------- /.devcontainer/post-create.sh: -------------------------------------------------------------------------------- 1 | ## OH-MY-ZSH PLUGINS & THEMES (POWERLEVEL10K) ## 2 | # Uncomment the below to install oh-my-zsh plugins and themes (powerlevel10k) without dotfiles integration 3 | # git clone https://github.com/zsh-users/zsh-completions.git $HOME/.oh-my-zsh/custom/plugins/zsh-completions 4 | # git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting 5 | # git clone https://github.com/zsh-users/zsh-autosuggestions.git $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions 6 | 7 | # git clone https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/custom/themes/powerlevel10k --depth=1 8 | # ln -s $HOME/.oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme $HOME/.oh-my-zsh/custom/themes/powerlevel10k.zsh-theme 9 | 10 | ## OH-MY-ZSH - POWERLEVEL10K SETTINGS ## 11 | # Uncomment the below to update the oh-my-zsh settings without dotfiles integration 12 | # curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/.p10k-with-clock.zsh > $HOME/.p10k-with-clock.zsh 13 | # curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/.p10k-without-clock.zsh > $HOME/.p10k-without-clock.zsh 14 | # curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/switch-p10k-clock.sh > $HOME/switch-p10k-clock.sh 15 | # chmod +x ~/switch-p10k-clock.sh 16 | 17 | # cp $HOME/.p10k-with-clock.zsh $HOME/.p10k.zsh 18 | # cp $HOME/.zshrc $HOME/.zshrc.bak 19 | 20 | # echo "$(cat $HOME/.zshrc)" | awk '{gsub(/ZSH_THEME=\"codespaces\"/, "ZSH_THEME=\"powerlevel10k\"")}1' > $HOME/.zshrc.replaced && mv $HOME/.zshrc.replaced $HOME/.zshrc 21 | # echo "$(cat $HOME/.zshrc)" | awk '{gsub(/plugins=\(git\)/, "plugins=(git zsh-completions zsh-syntax-highlighting zsh-autosuggestions)")}1' > $HOME/.zshrc.replaced && mv $HOME/.zshrc.replaced $HOME/.zshrc 22 | # echo " 23 | # # To customize prompt, run 'p10k configure' or edit ~/.p10k.zsh. 24 | # [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh 25 | # " >> $HOME/.zshrc 26 | 27 | ## OH-MY-POSH - POWERLEVEL10K SETTINGS ## 28 | # Uncomment the below to update the oh-my-posh settings without dotfiles integration 29 | # curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/p10k-with-clock.omp.json > $HOME/p10k-with-clock.omp.json 30 | # curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/p10k-without-clock.omp.json > $HOME/p10k-without-clock.omp.json 31 | # curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/switch-p10k-clock.ps1 > $HOME/switch-p10k-clock.ps1 32 | 33 | # mkdir -p $HOME/.config/powershell 34 | # curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/Microsoft.PowerShell_profile.ps1 > $HOME/.config/powershell/Microsoft.PowerShell_profile.ps1 35 | # curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/Microsoft.PowerShell_profile.ps1 > $HOME/.config/powershell/Microsoft.VSCode_profile.ps1 36 | 37 | # cp $HOME/p10k-with-clock.omp.json $HOME/p10k.omp.json 38 | 39 | ## GitHub Copilot CLI ## 40 | # Uncomment the below to install GitHub Copilot CLI. 41 | ### Add GitHub Copilot CLI alias to .zshrc 42 | echo ' 43 | # Add GitHub Copilot CLI alias to .zshrc 44 | alias ghcp='github-copilot-cli' 45 | eval "$(github-copilot-cli alias -- "$0")" 46 | ' >> $HOME/.zshrc 47 | 48 | ### Add GitHub Copilot CLI alias to .bashrc 49 | echo ' 50 | # Add GitHub Copilot CLI alias to .bashrc 51 | alias ghcp='github-copilot-cli' 52 | eval "$(github-copilot-cli alias -- "$0")" 53 | ' >> $HOME/.bashrc 54 | 55 | ### Add GitHub Copilot CLI alias to PowerShell profile 56 | echo ' 57 | # Add GitHub Copilot CLI alias to PowerShell profile 58 | Set-Alias ghcp /usr/local/share/nvm/current/bin/github-copilot-cli 59 | function what-the-shell { ghcp what-the-shell $args } 60 | function git-assist { ghcp git-assist $args } 61 | function gh-assist { ghcp gh-assist $args } 62 | Set-Alias ?? what-the-shell 63 | Set-Alias git? git-assist 64 | Set-Alias gh? gh-assist 65 | ' | sudo tee -a $HOME/.config/powershell/Microsoft.PowerShell_profile.ps1 66 | 67 | ### Add GitHub Copilot CLI alias to Integrated PowerShell profile 68 | echo ' 69 | # Add GitHub Copilot CLI alias to Integrated PowerShell profile 70 | Set-Alias ghcp /usr/local/share/nvm/current/bin/github-copilot-cli 71 | function what-the-shell { ghcp what-the-shell $args } 72 | function git-assist { ghcp git-assist $args } 73 | function gh-assist { ghcp gh-assist $args } 74 | Set-Alias ?? what-the-shell 75 | Set-Alias git? git-assist 76 | Set-Alias gh? gh-assist 77 | ' | sudo tee -a $HOME/.config/powershell/Microsoft.VSCode_profile.ps1 78 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | #### Core EditorConfig Options #### 7 | 8 | # All files 9 | [*] 10 | indent_style = space 11 | charset = utf-8 12 | 13 | # Indentation and spacing 14 | indent_size = 4 15 | tab_width = 4 16 | trim_trailing_whitespace = false 17 | 18 | # New line preferences 19 | end_of_line = crlf 20 | insert_final_newline = false 21 | 22 | # Xml files 23 | [*.xml] 24 | indent_size = 2 25 | 26 | [*.{json,yaml,yml}] 27 | indent_size = 2 28 | 29 | # C# files 30 | # [*.cs] 31 | 32 | #### .NET Coding Conventions #### 33 | [*.{cs,vb}] 34 | 35 | # Organize usings 36 | dotnet_separate_import_directive_groups = true 37 | dotnet_sort_system_directives_first = true 38 | file_header_template = unset 39 | 40 | # this. and Me. preferences 41 | dotnet_style_qualification_for_event = false:silent 42 | dotnet_style_qualification_for_field = false:silent 43 | dotnet_style_qualification_for_method = false:silent 44 | dotnet_style_qualification_for_property = false:silent 45 | 46 | # Language keywords vs BCL types preferences 47 | dotnet_style_predefined_type_for_locals_parameters_members = true:silent 48 | dotnet_style_predefined_type_for_member_access = true:silent 49 | 50 | # Parentheses preferences 51 | dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent 52 | dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent 53 | dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent 54 | dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent 55 | 56 | # Modifier preferences 57 | dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent 58 | 59 | # Expression-level preferences 60 | dotnet_style_coalesce_expression = true:suggestion 61 | dotnet_style_collection_initializer = true:suggestion 62 | dotnet_style_explicit_tuple_names = true:suggestion 63 | dotnet_style_null_propagation = true:suggestion 64 | dotnet_style_object_initializer = true:suggestion 65 | dotnet_style_operator_placement_when_wrapping = beginning_of_line 66 | dotnet_style_prefer_auto_properties = true:suggestion 67 | dotnet_style_prefer_compound_assignment = true:suggestion 68 | dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion 69 | dotnet_style_prefer_conditional_expression_over_return = true:suggestion 70 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion 71 | dotnet_style_prefer_inferred_tuple_names = true:suggestion 72 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion 73 | dotnet_style_prefer_simplified_boolean_expressions = true:suggestion 74 | dotnet_style_prefer_simplified_interpolation = true:suggestion 75 | 76 | # Field preferences 77 | dotnet_style_readonly_field = true:warning 78 | 79 | # Parameter preferences 80 | dotnet_code_quality_unused_parameters = all:suggestion 81 | 82 | # Suppression preferences 83 | dotnet_remove_unnecessary_suppression_exclusions = none 84 | 85 | #### C# Coding Conventions #### 86 | [*.cs] 87 | 88 | # var preferences 89 | csharp_style_var_elsewhere = false:silent 90 | csharp_style_var_for_built_in_types = false:silent 91 | csharp_style_var_when_type_is_apparent = false:silent 92 | 93 | # Expression-bodied members 94 | csharp_style_expression_bodied_accessors = true:silent 95 | csharp_style_expression_bodied_constructors = false:silent 96 | csharp_style_expression_bodied_indexers = true:silent 97 | csharp_style_expression_bodied_lambdas = true:suggestion 98 | csharp_style_expression_bodied_local_functions = false:silent 99 | csharp_style_expression_bodied_methods = false:silent 100 | csharp_style_expression_bodied_operators = false:silent 101 | csharp_style_expression_bodied_properties = true:silent 102 | 103 | # Pattern matching preferences 104 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion 105 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion 106 | csharp_style_prefer_not_pattern = true:suggestion 107 | csharp_style_prefer_pattern_matching = true:silent 108 | csharp_style_prefer_switch_expression = true:suggestion 109 | 110 | # Null-checking preferences 111 | csharp_style_conditional_delegate_call = true:suggestion 112 | 113 | # Modifier preferences 114 | csharp_prefer_static_local_function = true:warning 115 | csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent 116 | 117 | # Code-block preferences 118 | csharp_prefer_braces = true:silent 119 | csharp_prefer_simple_using_statement = true:suggestion 120 | 121 | # Expression-level preferences 122 | csharp_prefer_simple_default_expression = true:suggestion 123 | csharp_style_deconstructed_variable_declaration = true:suggestion 124 | csharp_style_inlined_variable_declaration = true:suggestion 125 | csharp_style_pattern_local_over_anonymous_function = true:suggestion 126 | csharp_style_prefer_index_operator = true:suggestion 127 | csharp_style_prefer_range_operator = true:suggestion 128 | csharp_style_throw_expression = true:suggestion 129 | csharp_style_unused_value_assignment_preference = discard_variable:suggestion 130 | csharp_style_unused_value_expression_statement_preference = discard_variable:silent 131 | 132 | # 'using' directive preferences 133 | csharp_using_directive_placement = outside_namespace:silent 134 | 135 | #### C# Formatting Rules #### 136 | 137 | # New line preferences 138 | csharp_new_line_before_catch = true 139 | csharp_new_line_before_else = true 140 | csharp_new_line_before_finally = true 141 | csharp_new_line_before_members_in_anonymous_types = true 142 | csharp_new_line_before_members_in_object_initializers = true 143 | csharp_new_line_before_open_brace = all 144 | csharp_new_line_between_query_expression_clauses = true 145 | 146 | # Indentation preferences 147 | csharp_indent_block_contents = true 148 | csharp_indent_braces = false 149 | csharp_indent_case_contents = true 150 | csharp_indent_case_contents_when_block = true 151 | csharp_indent_labels = one_less_than_current 152 | csharp_indent_switch_labels = true 153 | 154 | # Space preferences 155 | csharp_space_after_cast = false 156 | csharp_space_after_colon_in_inheritance_clause = true 157 | csharp_space_after_comma = true 158 | csharp_space_after_dot = false 159 | csharp_space_after_keywords_in_control_flow_statements = true 160 | csharp_space_after_semicolon_in_for_statement = true 161 | csharp_space_around_binary_operators = before_and_after 162 | csharp_space_around_declaration_statements = false 163 | csharp_space_before_colon_in_inheritance_clause = true 164 | csharp_space_before_comma = false 165 | csharp_space_before_dot = false 166 | csharp_space_before_open_square_brackets = false 167 | csharp_space_before_semicolon_in_for_statement = false 168 | csharp_space_between_empty_square_brackets = false 169 | csharp_space_between_method_call_empty_parameter_list_parentheses = false 170 | csharp_space_between_method_call_name_and_opening_parenthesis = false 171 | csharp_space_between_method_call_parameter_list_parentheses = false 172 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false 173 | csharp_space_between_method_declaration_name_and_open_parenthesis = false 174 | csharp_space_between_method_declaration_parameter_list_parentheses = false 175 | csharp_space_between_parentheses = false 176 | csharp_space_between_square_brackets = false 177 | 178 | # Wrapping preferences 179 | csharp_preserve_single_line_blocks = true 180 | csharp_preserve_single_line_statements = true 181 | 182 | #### Naming styles #### 183 | [*.{cs,vb}] 184 | 185 | # Naming rules 186 | 187 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion 188 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces 189 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase 190 | 191 | dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion 192 | dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces 193 | dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase 194 | 195 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion 196 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters 197 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase 198 | 199 | dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion 200 | dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods 201 | dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase 202 | 203 | dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion 204 | dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties 205 | dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase 206 | 207 | dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion 208 | dotnet_naming_rule.events_should_be_pascalcase.symbols = events 209 | dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase 210 | 211 | dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion 212 | dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables 213 | dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase 214 | 215 | dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion 216 | dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants 217 | dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase 218 | 219 | dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion 220 | dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters 221 | dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase 222 | 223 | dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion 224 | dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields 225 | dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase 226 | 227 | dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion 228 | dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields 229 | dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase 230 | 231 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion 232 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields 233 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase 234 | 235 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion 236 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields 237 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase 238 | 239 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion 240 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields 241 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase 242 | 243 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion 244 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields 245 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase 246 | 247 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion 248 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields 249 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase 250 | 251 | dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion 252 | dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums 253 | dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase 254 | 255 | dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion 256 | dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions 257 | dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase 258 | 259 | dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion 260 | dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members 261 | dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase 262 | 263 | # Symbol specifications 264 | 265 | dotnet_naming_symbols.interfaces.applicable_kinds = interface 266 | dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 267 | dotnet_naming_symbols.interfaces.required_modifiers = 268 | 269 | dotnet_naming_symbols.enums.applicable_kinds = enum 270 | dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 271 | dotnet_naming_symbols.enums.required_modifiers = 272 | 273 | dotnet_naming_symbols.events.applicable_kinds = event 274 | dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 275 | dotnet_naming_symbols.events.required_modifiers = 276 | 277 | dotnet_naming_symbols.methods.applicable_kinds = method 278 | dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 279 | dotnet_naming_symbols.methods.required_modifiers = 280 | 281 | dotnet_naming_symbols.properties.applicable_kinds = property 282 | dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 283 | dotnet_naming_symbols.properties.required_modifiers = 284 | 285 | dotnet_naming_symbols.public_fields.applicable_kinds = field 286 | dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal 287 | dotnet_naming_symbols.public_fields.required_modifiers = 288 | 289 | dotnet_naming_symbols.private_fields.applicable_kinds = field 290 | dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 291 | dotnet_naming_symbols.private_fields.required_modifiers = 292 | 293 | dotnet_naming_symbols.private_static_fields.applicable_kinds = field 294 | dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 295 | dotnet_naming_symbols.private_static_fields.required_modifiers = static 296 | 297 | dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum 298 | dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 299 | dotnet_naming_symbols.types_and_namespaces.required_modifiers = 300 | 301 | dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method 302 | dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 303 | dotnet_naming_symbols.non_field_members.required_modifiers = 304 | 305 | dotnet_naming_symbols.type_parameters.applicable_kinds = namespace 306 | dotnet_naming_symbols.type_parameters.applicable_accessibilities = * 307 | dotnet_naming_symbols.type_parameters.required_modifiers = 308 | 309 | dotnet_naming_symbols.private_constant_fields.applicable_kinds = field 310 | dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 311 | dotnet_naming_symbols.private_constant_fields.required_modifiers = const 312 | 313 | dotnet_naming_symbols.local_variables.applicable_kinds = local 314 | dotnet_naming_symbols.local_variables.applicable_accessibilities = local 315 | dotnet_naming_symbols.local_variables.required_modifiers = 316 | 317 | dotnet_naming_symbols.local_constants.applicable_kinds = local 318 | dotnet_naming_symbols.local_constants.applicable_accessibilities = local 319 | dotnet_naming_symbols.local_constants.required_modifiers = const 320 | 321 | dotnet_naming_symbols.parameters.applicable_kinds = parameter 322 | dotnet_naming_symbols.parameters.applicable_accessibilities = * 323 | dotnet_naming_symbols.parameters.required_modifiers = 324 | 325 | dotnet_naming_symbols.public_constant_fields.applicable_kinds = field 326 | dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal 327 | dotnet_naming_symbols.public_constant_fields.required_modifiers = const 328 | 329 | dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field 330 | dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal 331 | dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static 332 | 333 | dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field 334 | dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 335 | dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static 336 | 337 | dotnet_naming_symbols.local_functions.applicable_kinds = local_function 338 | dotnet_naming_symbols.local_functions.applicable_accessibilities = * 339 | dotnet_naming_symbols.local_functions.required_modifiers = 340 | 341 | # Naming styles 342 | 343 | dotnet_naming_style.pascalcase.required_prefix = 344 | dotnet_naming_style.pascalcase.required_suffix = 345 | dotnet_naming_style.pascalcase.word_separator = 346 | dotnet_naming_style.pascalcase.capitalization = pascal_case 347 | 348 | dotnet_naming_style.ipascalcase.required_prefix = I 349 | dotnet_naming_style.ipascalcase.required_suffix = 350 | dotnet_naming_style.ipascalcase.word_separator = 351 | dotnet_naming_style.ipascalcase.capitalization = pascal_case 352 | 353 | dotnet_naming_style.tpascalcase.required_prefix = T 354 | dotnet_naming_style.tpascalcase.required_suffix = 355 | dotnet_naming_style.tpascalcase.word_separator = 356 | dotnet_naming_style.tpascalcase.capitalization = pascal_case 357 | 358 | dotnet_naming_style._camelcase.required_prefix = _ 359 | dotnet_naming_style._camelcase.required_suffix = 360 | dotnet_naming_style._camelcase.word_separator = 361 | dotnet_naming_style._camelcase.capitalization = camel_case 362 | 363 | dotnet_naming_style.camelcase.required_prefix = 364 | dotnet_naming_style.camelcase.required_suffix = 365 | dotnet_naming_style.camelcase.word_separator = 366 | dotnet_naming_style.camelcase.capitalization = camel_case 367 | 368 | dotnet_naming_style.s_camelcase.required_prefix = s_ 369 | dotnet_naming_style.s_camelcase.required_suffix = 370 | dotnet_naming_style.s_camelcase.word_separator = 371 | dotnet_naming_style.s_camelcase.capitalization = camel_case 372 | 373 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | 352 | .DS_Store 353 | published/ 354 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Justin Yoo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # devcontainers for .NET # 2 | 3 | This is the template repository that contains the devcontainer settings for .NET app development. 4 | 5 | 6 | ## Getting Started ## 7 | 8 | If you want to use this devcontainer settings, you can create a new repository with this template repository, by clicking the "*Use this template*" button. 9 | 10 | ![Use this template](./images/use-this-template.png) 11 | 12 | 13 | ## Options – `devcontainer.json` ## 14 | 15 | ### Base Image ### 16 | 17 | By default, this devcontainer settings uses the base image of Ubuntu 22.04 LTS (jammy). 18 | 19 | ```jsonc 20 | "build": { 21 | "dockerfile": "./Dockerfile", 22 | "context": ".", 23 | "args": { 24 | "VARIANT": "6.0-jammy" 25 | } 26 | } 27 | ``` 28 | 29 | However, there is currently a bug on the [C# extension v1.25.0](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) for Razor support on Ubuntu 22.04 LTS (jammy). Therefore, if you need Razor support, build your devcontainer with Ubuntu 20.04 LTS (focal). 30 | 31 | ```jsonc 32 | "build": { 33 | "dockerfile": "./Dockerfile", 34 | "context": ".", 35 | "args": { 36 | // Use this only if you need Razor support, until OmniSharp supports .NET 6 properly 37 | "VARIANT": "6.0-focal" 38 | } 39 | } 40 | ``` 41 | 42 | ### Features ### 43 | 44 | 1. If you want to install Azure CLI, uncomment the section under the `features` attribute. 45 | 46 | ```jsonc 47 | "features": { 48 | ... 49 | // Uncomment the below to install Azure CLI 50 | "ghcr.io/devcontainers/features/azure-cli:1": { 51 | "version": "latest" 52 | } 53 | ... 54 | }, 55 | ``` 56 | 57 | 1. If you want to install GitHub CLI, uncomment the section under the `features` attribute. 58 | 59 | ```jsonc 60 | "features": { 61 | ... 62 | // Uncomment the below to install GitHub CLI 63 | "ghcr.io/devcontainers/features/github-cli:1": { 64 | "version": "latest" 65 | } 66 | ... 67 | }, 68 | ``` 69 | 70 | 1. If you want to install node.js, uncomment the section under the `features` attribute. 71 | 72 | ```jsonc 73 | "features": { 74 | ... 75 | // Uncomment the below to install node.js 76 | "ghcr.io/devcontainers/features/node:1": { 77 | "version": "lts", 78 | "nodeGypDependencies": true, 79 | "nvmInstallPath": "/usr/local/share/nvm" 80 | } 81 | ... 82 | }, 83 | ``` 84 | 85 | 1. If you want to add more features, find [this repository: devcontainer features](https://github.com/devcontainers/features). 86 | 87 | 88 | ### Extensions ### 89 | 90 | 1. There are optional extensions that you can selectively install, under the `customizations.vscode.extensions` attribute. You can simply uncomment each line to enable or comment out one to disable. 91 | 92 | ```jsonc 93 | "customizations": { 94 | "vscode": { 95 | "extensions": [ 96 | // Recommended extensions - GitHub 97 | "cschleiden.vscode-github-actions", 98 | "GitHub.vscode-pull-request-github", 99 | 100 | // Recommended extensions - Azure 101 | "ms-azuretools.vscode-bicep", 102 | 103 | // Recommended extensions - Collaboration 104 | "eamodio.gitlens", 105 | "EditorConfig.EditorConfig", 106 | "MS-vsliveshare.vsliveshare-pack", 107 | "streetsidesoftware.code-spell-checker", 108 | 109 | // Recommended extensions - .NET 110 | "Fudge.auto-using", 111 | "jongrant.csharpsortusings", 112 | "kreativ-software.csharpextensions", 113 | 114 | // Recommended extensions - Power Platform 115 | "microsoft-IsvExpTools.powerplatform-vscode", 116 | 117 | // Recommended extensions - Markdown 118 | "bierner.github-markdown-preview", 119 | "DavidAnson.vscode-markdownlint", 120 | "docsmsft.docs-linting", 121 | "johnpapa.read-time", 122 | "yzhang.markdown-all-in-one", 123 | 124 | ... 125 | ], 126 | ... 127 | } 128 | } 129 | ``` 130 | 131 | 1. Alternatively, you can add as many extra extensions as you like, from [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/VSCode). 132 | 133 | 134 | ### Settings ### 135 | 136 | 1. There are customisation options for your Codespaces settings, under the `customizations.vscode.settings` attribute. You can simply uncomment each item to enable or comment out one to disable. 137 | 138 | ```jsonc 139 | "customizations": { 140 | "vscode": { 141 | "settings": { 142 | // Uncomment if you want to use zsh as the default shell 143 | "terminal.integrated.defaultProfile.linux": "zsh", 144 | "terminal.integrated.profiles.linux": { 145 | "zsh": { 146 | "path": "/usr/bin/zsh" 147 | } 148 | }, 149 | 150 | // Uncomment if you want to use CaskaydiaCove Nerd Font as the default terminal font 151 | "terminal.integrated.fontFamily": "CaskaydiaCove Nerd Font", 152 | 153 | // Uncomment if you want to disable the minimap view 154 | "editor.minimap.enabled": false, 155 | 156 | // Recommended settings for the explorer pane 157 | "explorer.sortOrder": "type", 158 | "explorer.fileNesting.enabled": true, 159 | "explorer.fileNesting.patterns": { 160 | "*.bicep": "${capture}.json", 161 | "*.razor": "${capture}.razor.css", 162 | "*.js": "${capture}.js.map" 163 | } 164 | } 165 | } 166 | } 167 | ``` 168 | 169 | 1. If you want to do more granular configurations, refer to this page, [User and Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings). 170 | 171 | 172 | ### Lifecycle ### 173 | 174 | 1. If you want to use `bash` as your main shell and want to run the shell script after the container is created: 175 | 176 | ```jsonc 177 | // Uncomment if you want to use bash in 'postCreateCommand' after the container is created 178 | "postCreateCommand": "/bin/bash ./.devcontainer/post-create.sh > ~/post-create.log", 179 | ``` 180 | 181 | 1. If you want to use `zsh` as your main shell and want to run the shell script after the container is created: 182 | 183 | ```jsonc 184 | // Uncomment if you want to use zsh in 'postCreateCommand' after the container is created 185 | "postCreateCommand": "/usr/bin/zsh ./.devcontainer/post-create.sh > ~/post-create.log", 186 | ``` 187 | 188 | 189 | ## Options – `post-create.sh` ## 190 | 191 | 1. If you want to install CaskaydiaCove Nerd Font, uncomment the section below. 192 | 193 | ```bash 194 | ## CaskaydiaCove Nerd Font 195 | # Uncomment the below to install the CaskaydiaCove Nerd Font 196 | mkdir $HOME/.local 197 | mkdir $HOME/.local/share 198 | mkdir $HOME/.local/share/fonts 199 | wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/CascadiaCode.zip 200 | unzip CascadiaCode.zip -d $HOME/.local/share/fonts 201 | rm CascadiaCode.zip 202 | ``` 203 | 204 | > Use this option if you want to use oh-my-posh for PowerShell. 205 | 206 | 1. If you want to install Azure CLI extensions, uncomment the section below. 207 | 208 | ```bash 209 | ## AZURE CLI EXTENSIONS ## 210 | # Uncomment the below to install Azure CLI extensions 211 | extensions=$(az extension list-available --query "[].name" | jq -c -r '.[]') 212 | for extension in $extensions; 213 | do 214 | az extension add --name $extension 215 | done 216 | ``` 217 | 218 | > Use this option with care because it will install **ALL** extensions at once. 219 | 220 | 1. If you want to install Azure Bicep CLI, uncomment the section below. 221 | 222 | ```bash 223 | ## AZURE BICEP CLI ## 224 | # Uncomment the below to install Azure Bicep CLI 225 | az bicep install 226 | ``` 227 | 228 | 1. If you want to install Azure Functions Core Tools, uncomment the section below. 229 | 230 | ```bash 231 | ## AZURE FUNCTIONS CORE TOOLS ## 232 | # Uncomment the below to install Azure Functions Core Tools 233 | npm i -g azure-functions-core-tools@4 --unsafe-perm true 234 | ``` 235 | 236 | 1. If you want to install Azure Static Web Apps CLI, uncomment the section below. 237 | 238 | ```bash 239 | ## AZURE STATIC WEB APPS CLI ## 240 | # Uncomment the below to install Azure Static Web Apps CLI 241 | npm install -g @azure/static-web-apps-cli 242 | ``` 243 | 244 | 1. If you want to install Azure Dev CLI, uncomment the section below. 245 | 246 | ```bash 247 | ## AZURE DEV CLI ## 248 | # Uncomment the below to install Azure Dev CLI 249 | curl -fsSL https://aka.ms/install-azd.sh | bash 250 | ``` 251 | 252 | > **DEPENDENCIES**: Make sure that you must get both Azure CLI and GitHub CLI installed beforehand. 253 | 254 | 1. If you want to install plugins and themes for oh-my-zsh without using your dotfiles, uncomment the section below. 255 | 256 | ```bash 257 | ## OH-MY-ZSH PLUGINS & THEMES (POWERLEVEL10K) ## 258 | # Uncomment the below to install oh-my-zsh plugins and themes (powerlevel10k) without dotfiles integration 259 | git clone https://github.com/zsh-users/zsh-completions.git $HOME/.oh-my-zsh/custom/plugins/zsh-completions 260 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting 261 | git clone https://github.com/zsh-users/zsh-autosuggestions.git $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions 262 | 263 | git clone https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/custom/themes/powerlevel10k --depth=1 264 | ln -s $HOME/.oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme $HOME/.oh-my-zsh/custom/themes/powerlevel10k.zsh-theme 265 | ``` 266 | 267 | > **DEPENDENCIES**: Make sure that you have already installed oh-my-zsh through the settings on `devcontainer.json`. 268 | 269 | 1. If you want to install oh-my-zsh configurations without using your dotfiles, uncomment the section below. 270 | 271 | ```bash 272 | ## OH-MY-ZSH - POWERLEVEL10K SETTINGS ## 273 | # Uncomment the below to update the oh-my-zsh settings without dotfiles integration 274 | curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/.p10k-with-clock.zsh > $HOME/.p10k-with-clock.zsh 275 | curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/.p10k-without-clock.zsh > $HOME/.p10k-without-clock.zsh 276 | curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-zsh/switch-p10k-clock.sh > $HOME/switch-p10k-clock.sh 277 | chmod +x ~/switch-p10k-clock.sh 278 | 279 | cp $HOME/.p10k-with-clock.zsh $HOME/.p10k.zsh 280 | cp $HOME/.zshrc $HOME/.zshrc.bak 281 | 282 | echo "$(cat $HOME/.zshrc)" | awk '{gsub(/ZSH_THEME=\"codespaces\"/, "ZSH_THEME=\"powerlevel10k\"")}1' > $HOME/.zshrc.replaced && mv $HOME/.zshrc.replaced $HOME/.zshrc 283 | echo "$(cat $HOME/.zshrc)" | awk '{gsub(/plugins=\(git\)/, "plugins=(git zsh-completions zsh-syntax-highlighting zsh-autosuggestions)")}1' > $HOME/.zshrc.replaced && mv $HOME/.zshrc.replaced $HOME/.zshrc 284 | echo " 285 | # To customize prompt, run 'p10k configure' or edit ~/.p10k.zsh. 286 | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh 287 | " >> $HOME/.zshrc 288 | ``` 289 | 290 | > **DEPENDENCIES**: Make sure that you uncommend the oh-my-zsh plugins and themes section before using this section. 291 | 292 | > If you want to switch the `powerlevel10k` configuration with clock or without clock, run the following shell script: 293 | > 294 | > ```bash 295 | > # Disable clock 296 | > ~/switch-p10k-clock.sh 297 | > 298 | > # Enable clock 299 | > ~/switch-p10k-clock.sh -c 300 | > ``` 301 | 302 | 1. If you want to install oh-my-posh for PowerShell, uncomment the section below 303 | 304 | ```bash 305 | ## OH-MY-POSH ## 306 | # Uncomment the below to install oh-my-posh 307 | sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh 308 | sudo chmod +x /usr/local/bin/oh-my-posh 309 | ``` 310 | 311 | 1. If you want to install oh-my-posh configurations without using your dotfiles, uncomment the section below. 312 | 313 | ```bash 314 | ## OH-MY-POSH - POWERLEVEL10K SETTINGS ## 315 | # Uncomment the below to update the oh-my-posh settings without dotfiles integration 316 | curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/p10k-with-clock.omp.json > $HOME/p10k-with-clock.omp.json 317 | curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/p10k-without-clock.omp.json > $HOME/p10k-without-clock.omp.json 318 | curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/switch-p10k-clock.ps1 > $HOME/switch-p10k-clock.ps1 319 | 320 | mkdir $HOME/.config/powershell 321 | curl https://raw.githubusercontent.com/justinyoo/devcontainers-dotnet/main/oh-my-posh/Microsoft.PowerShell_profile.ps1 > $HOME/.config/powershell/Microsoft.PowerShell_profile.ps1 322 | 323 | cp $HOME/p10k-with-clock.omp.json $HOME/p10k.omp.json 324 | ``` 325 | 326 | > **DEPENDENCIES**: Make sure that you uncommend the oh-my-posh installation section before using this section. 327 | 328 | > If you want to switch the `powerlevel10k` configuration with clock or without clock, run the following shell script: 329 | > 330 | > ```powershell 331 | > # Disable clock 332 | > ~/switch-p10k-clock.ps1 333 | > 334 | > # Enable clock 335 | > ~/switch-p10k-clock.ps1 -WithClock 336 | > ``` 337 | -------------------------------------------------------------------------------- /azure-functions/Build-LocalSettingsJson.ps1: -------------------------------------------------------------------------------- 1 | ### This add the GitHub Codespaces capability to your local.settings.json 2 | Param( 3 | [switch] 4 | [Parameter(Mandatory=$false)] 5 | $UseNgrok, 6 | 7 | [switch] 8 | [Parameter(Mandatory=$false)] 9 | $Help 10 | ) 11 | 12 | function Show-Usage { 13 | Write-Output " 14 | Usage: $(Split-Path $MyInvocation.ScriptName -Leaf) [-WithClock] [-Help] 15 | 16 | Options: 17 | -UseNgrok: This switch indicates whether to use the ngrok URL or not 18 | -Help: Show this message. 19 | 20 | " 21 | 22 | Exit 0 23 | } 24 | 25 | # Show usage 26 | if ($Help -eq $true) { 27 | Show-Usage 28 | Exit 0 29 | } 30 | 31 | function Get-CodespaceUrl { 32 | param ( 33 | [string] $CodespaceName 34 | ) 35 | 36 | $codespaceUrl = "https://$($CodespaceName)-7071.githubpreview.dev/api" 37 | 38 | return $codespaceUrl 39 | } 40 | 41 | function Get-NgrokUrl { 42 | $tunnels = $(ngrok api tunnels list | ConvertFrom-Json).tunnels 43 | $ngrokUrl = "$($($tunnels | Where-Object { $_.forwards_to -eq "http://localhost:7071" }).public_url)/api" 44 | 45 | return $ngrokUrl 46 | } 47 | 48 | function Get-HostUrls { 49 | param ( 50 | [string] $CodespaceName, 51 | [bool] $UseNgrok 52 | ) 53 | 54 | $ngrokUrl = $null 55 | $codespaceUrl = Get-CodespaceUrl -CodespaceName $CodespaceName 56 | $url = $codespaceUrl 57 | if ($UseNgrok -eq $true) { 58 | $ngrokUrl = Get-NgrokUrl 59 | $url = $ngrokUrl 60 | } 61 | $urls = @{ ngrokUrl = $ngrokUrl; codespaceUrl = $codespaceUrl; url = $url } 62 | 63 | return $urls 64 | } 65 | 66 | # Get the local.settings.sample.json file. 67 | $localSettingsSampleJson = Get-ChildItem -Path $env:CODESPACE_VSCODE_FOLDER -Filter local.settings.sample.json -Recurse 68 | 69 | # Get the local.settings.json file. If not exists, create one. 70 | $localSettingsJson = Get-ChildItem -Path $localSettingsSampleJson.Directory.FullName -Filter local.settings.json 71 | if ($localSettingsJson -eq $null) { 72 | Copy-Item -Path $localSettingsSampleJson.FullName -Destination "$($localSettingsSampleJson.Directory.FullName)/local.settings.json" 73 | $localSettingsJson = Get-ChildItem -Path $localSettingsSampleJson.Directory.FullName -Filter local.settings.json 74 | } 75 | 76 | # Get the app settings details. 77 | $appSettings = Get-Content -Path $localSettingsJson.FullName | ConvertFrom-Json 78 | 79 | # Add OpenApi__ForceHttps to local.settings.json. 80 | if ($appSettings.Values.OpenApi__ForceHttps -eq $null) { 81 | $appSettings.Values | Add-Member -NotePropertyName OpenApi__ForceHttps -NotePropertyValue "true" 82 | } else { 83 | $appSettings.Values.OpenApi__ForceHttps = "true" 84 | } 85 | 86 | # Add OpenApi__RunOnCodespaces to local.settings.json. 87 | if ($appSettings.Values.OpenApi__RunOnCodespaces -eq $null) { 88 | $appSettings.Values | Add-Member -NotePropertyName OpenApi__RunOnCodespaces -NotePropertyValue "true" 89 | } else { 90 | $appSettings.Values.OpenApi__RunOnCodespaces = "true" 91 | } 92 | 93 | # Add OpenApi__HostNames to local.settings.json. 94 | $urls = Get-HostUrls -CodespaceName $env:CODESPACE_NAME -UseNgrok $UseNgrok 95 | if ($appSettings.Values.OpenApi__HostNames -eq $null) { 96 | $appSettings.Values | Add-Member -NotePropertyName OpenApi__HostNames -NotePropertyValue $($urls.url) 97 | } else { 98 | $hostNames = $appSettings.Values.OpenApi__HostNames -split "," 99 | $hostNames = [System.Collections.ArrayList]$hostNames 100 | 101 | $ngrokUrls = $hostNames | Where-Object { $_ -like "*ngrok.io/api" } 102 | if ($ngrokUrls.Length -gt 0) { 103 | $ngrokUrls | ForEach-Object { $hostNames.Remove($_) } 104 | } 105 | if ($urls.codespaceUrl -ne $null) { 106 | $hostNames.Remove($urls.codespaceUrl) 107 | } 108 | $hostNames.Insert(0, $urls.url) 109 | 110 | $appSettings.Values.OpenApi__HostNames = $($hostNames -join ",").Trim(',') 111 | } 112 | 113 | # Overwrite the existing local.settings.json 114 | $appSettings | ConvertTo-Json -Depth 100 | Out-File -Path $localSettingsJson.FullName -Force 115 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "allowPrerelease": false 4 | } 5 | } -------------------------------------------------------------------------------- /images/use-this-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devkimchi/devcontainers-dotnet/42c54e72ce11cb2fadc1232fe6fbea0283d59dab/images/use-this-template.png -------------------------------------------------------------------------------- /oh-my-posh/Microsoft.PowerShell_profile.ps1: -------------------------------------------------------------------------------- 1 | oh-my-posh init pwsh --config '~/p10k.omp.json' | Invoke-Expression 2 | -------------------------------------------------------------------------------- /oh-my-posh/p10k-with-clock.omp.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", 3 | "blocks": [ 4 | { 5 | "alignment": "left", 6 | "segments": [ 7 | { 8 | "background": "#d3d7cf", 9 | "foreground": "#000000", 10 | "leading_diamond": "\u256d\u2500\ue0b2", 11 | "style": "diamond", 12 | "template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ", 13 | "type": "os" 14 | }, 15 | { 16 | "background": "#3465a4", 17 | "foreground": "#e4e4e4", 18 | "powerline_symbol": "\ue0b0", 19 | "properties": { 20 | "home_icon": "~", 21 | "style": "full" 22 | }, 23 | "style": "powerline", 24 | "template": " \uf07c {{ .Path }} ", 25 | "type": "path" 26 | }, 27 | { 28 | "background": "#4e9a06", 29 | "background_templates": [ 30 | "{{ if or (.Working.Changed) (.Staging.Changed) }}#c4a000{{ end }}", 31 | "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}", 32 | "{{ if gt .Ahead 0 }}#89d1dc{{ end }}", 33 | "{{ if gt .Behind 0 }}#4e9a06{{ end }}" 34 | ], 35 | "foreground": "#000000", 36 | "powerline_symbol": "\ue0b0", 37 | "properties": { 38 | "branch_icon": "\uf126 ", 39 | "fetch_stash_count": true, 40 | "fetch_status": true, 41 | "fetch_upstream_icon": true 42 | }, 43 | "style": "powerline", 44 | "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ", 45 | "type": "git" 46 | } 47 | ], 48 | "type": "prompt" 49 | }, 50 | { 51 | "alignment": "right", 52 | "segments": [ 53 | { 54 | "background": "#689f63", 55 | "foreground": "#ffffff", 56 | "invert_powerline": true, 57 | "powerline_symbol": "\ue0b2", 58 | "properties": { 59 | "fetch_version": true 60 | }, 61 | "style": "powerline", 62 | "template": " {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} \uf898 ", 63 | "type": "node" 64 | }, 65 | { 66 | "background": "#00acd7", 67 | "foreground": "#111111", 68 | "invert_powerline": true, 69 | "powerline_symbol": "\ue0b2", 70 | "properties": { 71 | "fetch_version": true 72 | }, 73 | "style": "powerline", 74 | "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \ue627 ", 75 | "type": "go" 76 | }, 77 | { 78 | "background": "#4063D8", 79 | "foreground": "#111111", 80 | "invert_powerline": true, 81 | "powerline_symbol": "\ue0b2", 82 | "properties": { 83 | "fetch_version": true 84 | }, 85 | "style": "powerline", 86 | "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \ue624 ", 87 | "type": "julia" 88 | }, 89 | { 90 | "background": "#FFDE57", 91 | "foreground": "#111111", 92 | "invert_powerline": true, 93 | "powerline_symbol": "\ue0b2", 94 | "properties": { 95 | "display_mode": "files", 96 | "fetch_virtual_env": false 97 | }, 98 | "style": "powerline", 99 | "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \ue235 ", 100 | "type": "python" 101 | }, 102 | { 103 | "background": "#AE1401", 104 | "foreground": "#ffffff", 105 | "invert_powerline": true, 106 | "powerline_symbol": "\ue0b2", 107 | "properties": { 108 | "display_mode": "files", 109 | "fetch_version": true 110 | }, 111 | "style": "powerline", 112 | "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \ue791 ", 113 | "type": "ruby" 114 | }, 115 | { 116 | "background": "#FEAC19", 117 | "foreground": "#ffffff", 118 | "invert_powerline": true, 119 | "powerline_symbol": "\ue0b2", 120 | "properties": { 121 | "display_mode": "files", 122 | "fetch_version": false 123 | }, 124 | "style": "powerline", 125 | "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \uf0e7", 126 | "type": "azfunc" 127 | }, 128 | { 129 | "background_templates": [ 130 | "{{if contains \"default\" .Profile}}#FFA400{{end}}", 131 | "{{if contains \"jan\" .Profile}}#f1184c{{end}}" 132 | ], 133 | "foreground": "#ffffff", 134 | "invert_powerline": true, 135 | "powerline_symbol": "\ue0b2", 136 | "properties": { 137 | "display_default": false 138 | }, 139 | "style": "powerline", 140 | "template": " {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} \ue7ad ", 141 | "type": "aws" 142 | }, 143 | { 144 | "background": "#ffff66", 145 | "foreground": "#111111", 146 | "invert_powerline": true, 147 | "powerline_symbol": "\ue0b2", 148 | "style": "powerline", 149 | "template": " \uf0ad ", 150 | "type": "root" 151 | }, 152 | { 153 | "background": "#c4a000", 154 | "foreground": "#000000", 155 | "invert_powerline": true, 156 | "powerline_symbol": "\ue0b2", 157 | "style": "powerline", 158 | "template": " {{ .FormattedMs }} \uf252 ", 159 | "type": "executiontime" 160 | }, 161 | { 162 | "background": "#000000", 163 | "background_templates": [ 164 | "{{ if gt .Code 0 }}#cc2222{{ end }}" 165 | ], 166 | "foreground": "#d3d7cf", 167 | "invert_powerline": true, 168 | "powerline_symbol": "\ue0b2", 169 | "properties": { 170 | "always_enabled": true 171 | }, 172 | "style": "powerline", 173 | "template": " {{ if gt .Code 0 }}{{ .Meaning }}{{ else }}\u2714{{ end }} ", 174 | "type": "exit" 175 | }, 176 | { 177 | "background": "#d3d7cf", 178 | "foreground": "#000000", 179 | "invert_powerline": true, 180 | "style": "diamond", 181 | "template": " {{ .CurrentDate | date .Format }} \uf017 ", 182 | "trailing_diamond": "\ue0b0\u2500\u256e", 183 | "type": "time" 184 | } 185 | ], 186 | "type": "prompt" 187 | }, 188 | { 189 | "alignment": "left", 190 | "newline": true, 191 | "segments": [ 192 | { 193 | "foreground": "#d3d7cf", 194 | "style": "plain", 195 | "template": "\u2570\u2500", 196 | "type": "text" 197 | } 198 | ], 199 | "type": "prompt" 200 | }, 201 | { 202 | "segments": [ 203 | { 204 | "foreground": "#d3d7cf", 205 | "style": "plain", 206 | "template": "\u2500\u256f", 207 | "type": "text" 208 | } 209 | ], 210 | "type": "rprompt" 211 | } 212 | ], 213 | "console_title_template": "{{ .Shell }} in {{ .Folder }}", 214 | "final_space": true, 215 | "version": 2 216 | } 217 | -------------------------------------------------------------------------------- /oh-my-posh/p10k-without-clock.omp.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", 3 | "blocks": [ 4 | { 5 | "alignment": "left", 6 | "segments": [ 7 | { 8 | "background": "#d3d7cf", 9 | "foreground": "#000000", 10 | "leading_diamond": "\u256d\u2500\ue0b2", 11 | "style": "diamond", 12 | "template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ", 13 | "type": "os" 14 | }, 15 | { 16 | "background": "#3465a4", 17 | "foreground": "#e4e4e4", 18 | "powerline_symbol": "\ue0b0", 19 | "properties": { 20 | "home_icon": "~", 21 | "style": "full" 22 | }, 23 | "style": "powerline", 24 | "template": " \uf07c {{ .Path }} ", 25 | "type": "path" 26 | }, 27 | { 28 | "background": "#4e9a06", 29 | "background_templates": [ 30 | "{{ if or (.Working.Changed) (.Staging.Changed) }}#c4a000{{ end }}", 31 | "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}", 32 | "{{ if gt .Ahead 0 }}#89d1dc{{ end }}", 33 | "{{ if gt .Behind 0 }}#4e9a06{{ end }}" 34 | ], 35 | "foreground": "#000000", 36 | "powerline_symbol": "\ue0b0", 37 | "properties": { 38 | "branch_icon": "\uf126 ", 39 | "fetch_stash_count": true, 40 | "fetch_status": true, 41 | "fetch_upstream_icon": true 42 | }, 43 | "style": "powerline", 44 | "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ", 45 | "type": "git" 46 | } 47 | ], 48 | "type": "prompt" 49 | }, 50 | { 51 | "alignment": "right", 52 | "segments": [ 53 | { 54 | "background": "#689f63", 55 | "foreground": "#ffffff", 56 | "invert_powerline": true, 57 | "powerline_symbol": "\ue0b2", 58 | "properties": { 59 | "fetch_version": true 60 | }, 61 | "style": "powerline", 62 | "template": " {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} \uf898 ", 63 | "type": "node" 64 | }, 65 | { 66 | "background": "#00acd7", 67 | "foreground": "#111111", 68 | "invert_powerline": true, 69 | "powerline_symbol": "\ue0b2", 70 | "properties": { 71 | "fetch_version": true 72 | }, 73 | "style": "powerline", 74 | "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \ue627 ", 75 | "type": "go" 76 | }, 77 | { 78 | "background": "#4063D8", 79 | "foreground": "#111111", 80 | "invert_powerline": true, 81 | "powerline_symbol": "\ue0b2", 82 | "properties": { 83 | "fetch_version": true 84 | }, 85 | "style": "powerline", 86 | "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \ue624 ", 87 | "type": "julia" 88 | }, 89 | { 90 | "background": "#FFDE57", 91 | "foreground": "#111111", 92 | "invert_powerline": true, 93 | "powerline_symbol": "\ue0b2", 94 | "properties": { 95 | "display_mode": "files", 96 | "fetch_virtual_env": false 97 | }, 98 | "style": "powerline", 99 | "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \ue235 ", 100 | "type": "python" 101 | }, 102 | { 103 | "background": "#AE1401", 104 | "foreground": "#ffffff", 105 | "invert_powerline": true, 106 | "powerline_symbol": "\ue0b2", 107 | "properties": { 108 | "display_mode": "files", 109 | "fetch_version": true 110 | }, 111 | "style": "powerline", 112 | "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \ue791 ", 113 | "type": "ruby" 114 | }, 115 | { 116 | "background": "#FEAC19", 117 | "foreground": "#ffffff", 118 | "invert_powerline": true, 119 | "powerline_symbol": "\ue0b2", 120 | "properties": { 121 | "display_mode": "files", 122 | "fetch_version": false 123 | }, 124 | "style": "powerline", 125 | "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \uf0e7", 126 | "type": "azfunc" 127 | }, 128 | { 129 | "background_templates": [ 130 | "{{if contains \"default\" .Profile}}#FFA400{{end}}", 131 | "{{if contains \"jan\" .Profile}}#f1184c{{end}}" 132 | ], 133 | "foreground": "#ffffff", 134 | "invert_powerline": true, 135 | "powerline_symbol": "\ue0b2", 136 | "properties": { 137 | "display_default": false 138 | }, 139 | "style": "powerline", 140 | "template": " {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} \ue7ad ", 141 | "type": "aws" 142 | }, 143 | { 144 | "background": "#ffff66", 145 | "foreground": "#111111", 146 | "invert_powerline": true, 147 | "powerline_symbol": "\ue0b2", 148 | "style": "powerline", 149 | "template": " \uf0ad ", 150 | "type": "root" 151 | }, 152 | { 153 | "background": "#c4a000", 154 | "foreground": "#000000", 155 | "invert_powerline": true, 156 | "powerline_symbol": "\ue0b2", 157 | "style": "powerline", 158 | "template": " {{ .FormattedMs }} \uf252 ", 159 | "type": "executiontime" 160 | }, 161 | { 162 | "background": "#000000", 163 | "background_templates": [ 164 | "{{ if gt .Code 0 }}#cc2222{{ end }}" 165 | ], 166 | "foreground": "#d3d7cf", 167 | "invert_powerline": true, 168 | "powerline_symbol": "\ue0b2", 169 | "properties": { 170 | "always_enabled": true 171 | }, 172 | "style": "powerline", 173 | "template": " {{ if gt .Code 0 }}{{ .Meaning }}{{ else }}\u2714{{ end }} ", 174 | "type": "exit" 175 | } 176 | ], 177 | "type": "prompt" 178 | }, 179 | { 180 | "alignment": "left", 181 | "newline": true, 182 | "segments": [ 183 | { 184 | "foreground": "#d3d7cf", 185 | "style": "plain", 186 | "template": "\u2570\u2500", 187 | "type": "text" 188 | } 189 | ], 190 | "type": "prompt" 191 | }, 192 | { 193 | "segments": [ 194 | { 195 | "foreground": "#d3d7cf", 196 | "style": "plain", 197 | "template": "\u2500\u256f", 198 | "type": "text" 199 | } 200 | ], 201 | "type": "rprompt" 202 | } 203 | ], 204 | "console_title_template": "{{ .Shell }} in {{ .Folder }}", 205 | "final_space": true, 206 | "version": 2 207 | } 208 | -------------------------------------------------------------------------------- /oh-my-posh/switch-p10k-clock.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [switch] 3 | [Parameter(Mandatory=$false)] 4 | $WithClock, 5 | 6 | [switch] 7 | [Parameter(Mandatory=$false)] 8 | $Help 9 | ) 10 | 11 | function Show-Usage { 12 | Write-Output " 13 | Usage: $(Split-Path $MyInvocation.ScriptName -Leaf) [-WithClock] [-Help] 14 | 15 | Options: 16 | -WithClock: This switch enables clock. 17 | -Help: Show this message. 18 | 19 | " 20 | 21 | Exit 0 22 | } 23 | 24 | # Show usage 25 | if ($Help -eq $true) { 26 | Show-Usage 27 | Exit 0 28 | } 29 | 30 | # Backup p10k.omp.json 31 | Copy-Item $HOME/p10k.omp.json $HOME/p10k.omp.json_backup -Force 32 | 33 | # Install p10k with clock 34 | if ($WithClock -eq $true) { 35 | Write-Output "[$(Get-Date -Format "yyyy-MM-dd HH:mm:ss")] Installing theme: Powerlevel10k with clock ..." 36 | Copy-Item $HOME/p10k-with-clock.omp.json $HOME/p10k.omp.json -Force 37 | } 38 | 39 | # Install p10 without clock 40 | else { 41 | Write-Output "[$(Get-Date -Format "yyyy-MM-dd HH:mm:ss")] Installing theme: Powerlevel10k without clock ..." 42 | Copy-Item $HOME/p10k-without-clock.omp.json $HOME/p10k.omp.json -Force 43 | } 44 | 45 | Write-Output "[$(Get-Date -Format "yyyy-MM-dd HH:mm:ss")] Switch completed. Run '. `$PROFILE' to apply changes ..." 46 | -------------------------------------------------------------------------------- /oh-my-zsh/.p10k-with-clock.zsh: -------------------------------------------------------------------------------- 1 | # Generated by Powerlevel10k configuration wizard on 2022-10-01 at 07:27 UTC. 2 | # Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 15312. 3 | # Wizard options: nerdfont-complete + powerline, large icons, rainbow, unicode, 4 | # 24h time, angled separators, sharp heads, flat tails, 2 lines, dotted, full frame, 5 | # dark-ornaments, compact, few icons, concise, transient_prompt, instant_prompt=verbose. 6 | # Type `p10k configure` to generate another config. 7 | # 8 | # Config for Powerlevel10k with powerline prompt style with colorful background. 9 | # Type `p10k configure` to generate your own config based on it. 10 | # 11 | # Tip: Looking for a nice color? Here's a one-liner to print colormap. 12 | # 13 | # for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done 14 | 15 | # Temporarily change options. 16 | 'builtin' 'local' '-a' 'p10k_config_opts' 17 | [[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') 18 | [[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') 19 | [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') 20 | 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' 21 | 22 | () { 23 | emulate -L zsh -o extended_glob 24 | 25 | # Unset all configuration options. This allows you to apply configuration changes without 26 | # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. 27 | unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' 28 | 29 | # Zsh >= 5.1 is required. 30 | autoload -Uz is-at-least && is-at-least 5.1 || return 31 | 32 | # The list of segments shown on the left. Fill it with the most important segments. 33 | typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( 34 | # =========================[ Line #1 ]========================= 35 | # os_icon # os identifier 36 | dir # current directory 37 | vcs # git status 38 | # =========================[ Line #2 ]========================= 39 | newline # \n 40 | # prompt_char # prompt symbol 41 | ) 42 | 43 | # The list of segments shown on the right. Fill it with less important segments. 44 | # Right prompt on the last prompt line (where you are typing your commands) gets 45 | # automatically hidden when the input line reaches it. Right prompt above the 46 | # last prompt line gets hidden if it would overlap with left prompt. 47 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( 48 | # =========================[ Line #1 ]========================= 49 | status # exit code of the last command 50 | command_execution_time # duration of the last command 51 | background_jobs # presence of background jobs 52 | direnv # direnv status (https://direnv.net/) 53 | asdf # asdf version manager (https://github.com/asdf-vm/asdf) 54 | virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) 55 | anaconda # conda environment (https://conda.io/) 56 | pyenv # python environment (https://github.com/pyenv/pyenv) 57 | goenv # go environment (https://github.com/syndbg/goenv) 58 | nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) 59 | nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) 60 | nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) 61 | # node_version # node.js version 62 | # go_version # go version (https://golang.org) 63 | # rust_version # rustc version (https://www.rust-lang.org) 64 | # dotnet_version # .NET version (https://dotnet.microsoft.com) 65 | # php_version # php version (https://www.php.net/) 66 | # laravel_version # laravel php framework version (https://laravel.com/) 67 | # java_version # java version (https://www.java.com/) 68 | # package # name@version from package.json (https://docs.npmjs.com/files/package.json) 69 | rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) 70 | rvm # ruby version from rvm (https://rvm.io) 71 | fvm # flutter version management (https://github.com/leoafarias/fvm) 72 | luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) 73 | jenv # java version from jenv (https://github.com/jenv/jenv) 74 | plenv # perl version from plenv (https://github.com/tokuhirom/plenv) 75 | perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew) 76 | phpenv # php version from phpenv (https://github.com/phpenv/phpenv) 77 | scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) 78 | haskell_stack # haskell version from stack (https://haskellstack.org/) 79 | kubecontext # current kubernetes context (https://kubernetes.io/) 80 | terraform # terraform workspace (https://www.terraform.io) 81 | # terraform_version # terraform version (https://www.terraform.io) 82 | aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) 83 | aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) 84 | azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) 85 | gcloud # google cloud cli account and project (https://cloud.google.com/) 86 | google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) 87 | toolbox # toolbox name (https://github.com/containers/toolbox) 88 | context # user@hostname 89 | nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) 90 | ranger # ranger shell (https://github.com/ranger/ranger) 91 | nnn # nnn shell (https://github.com/jarun/nnn) 92 | xplr # xplr shell (https://github.com/sayanarijit/xplr) 93 | vim_shell # vim shell indicator (:sh) 94 | midnight_commander # midnight commander shell (https://midnight-commander.org/) 95 | nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) 96 | vi_mode # vi mode (you don't need this if you've enabled prompt_char) 97 | # vpn_ip # virtual private network indicator 98 | # load # CPU load 99 | # disk_usage # disk usage 100 | # ram # free RAM 101 | # swap # used swap 102 | todo # todo items (https://github.com/todotxt/todo.txt-cli) 103 | timewarrior # timewarrior tracking status (https://timewarrior.net/) 104 | taskwarrior # taskwarrior task count (https://taskwarrior.org/) 105 | time # current time 106 | # =========================[ Line #2 ]========================= 107 | newline 108 | # ip # ip address and bandwidth usage for a specified network interface 109 | # public_ip # public IP address 110 | # proxy # system-wide http/https/ftp proxy 111 | # battery # internal battery 112 | # wifi # wifi speed 113 | # example # example user-defined segment (see prompt_example function below) 114 | ) 115 | 116 | # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. 117 | typeset -g POWERLEVEL9K_MODE=nerdfont-complete 118 | # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid 119 | # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. 120 | typeset -g POWERLEVEL9K_ICON_PADDING=moderate 121 | 122 | # When set to true, icons appear before content on both sides of the prompt. When set 123 | # to false, icons go after content. If empty or not set, icons go before content in the left 124 | # prompt and after content in the right prompt. 125 | # 126 | # You can also override it for a specific segment: 127 | # 128 | # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false 129 | # 130 | # Or for a specific segment in specific state: 131 | # 132 | # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false 133 | typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= 134 | 135 | # Add an empty line before each prompt. 136 | typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false 137 | 138 | # Connect left prompt lines with these symbols. You'll probably want to use the same color 139 | # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. 140 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%240F╭─' 141 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%240F├─' 142 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%240F╰─' 143 | # Connect right prompt lines with these symbols. 144 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%240F─╮' 145 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%240F─┤' 146 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%240F─╯' 147 | 148 | # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or 149 | # '─'. The last two make it easier to see the alignment between left and right prompt and to 150 | # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false 151 | # for more compact prompt if using this option. 152 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='·' 153 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= 154 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= 155 | if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then 156 | # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE 157 | # ornaments defined above. 158 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=240 159 | # Start filler from the edge of the screen if there are no left segments on the first line. 160 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' 161 | # End filler on the edge of the screen if there are no right segments on the first line. 162 | typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' 163 | fi 164 | 165 | # Separator between same-color segments on the left. 166 | typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1' 167 | # Separator between same-color segments on the right. 168 | typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3' 169 | # Separator between different-color segments on the left. 170 | typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' 171 | # Separator between different-color segments on the right. 172 | typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' 173 | # The right end of left prompt. 174 | typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' 175 | # The left end of right prompt. 176 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' 177 | # The left end of left prompt. 178 | typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' 179 | # The right end of right prompt. 180 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='' 181 | # Left prompt terminator for lines without any segments. 182 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= 183 | 184 | #################################[ os_icon: os identifier ]################################## 185 | # OS identifier color. 186 | typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 187 | typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 188 | # Custom icon. 189 | # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' 190 | 191 | ################################[ prompt_char: prompt symbol ]################################ 192 | # Transparent background. 193 | typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= 194 | # Green prompt symbol if the last command succeeded. 195 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 196 | # Red prompt symbol if the last command failed. 197 | typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 198 | # Default prompt symbol. 199 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' 200 | # Prompt symbol in command vi mode. 201 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' 202 | # Prompt symbol in visual vi mode. 203 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' 204 | # Prompt symbol in overwrite vi mode. 205 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' 206 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true 207 | # No line terminator if prompt_char is the last segment. 208 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= 209 | # No line introducer if prompt_char is the first segment. 210 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= 211 | # No surrounding whitespace. 212 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= 213 | 214 | ##################################[ dir: current directory ]################################## 215 | # Current directory background color. 216 | typeset -g POWERLEVEL9K_DIR_BACKGROUND=4 217 | # Default current directory foreground color. 218 | typeset -g POWERLEVEL9K_DIR_FOREGROUND=254 219 | # If directory is too long, shorten some of its segments to the shortest possible unique 220 | # prefix. The shortened directory can be tab-completed to the original. 221 | typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique 222 | # Replace removed segment suffixes with this symbol. 223 | typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= 224 | # Color of the shortened directory segments. 225 | typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250 226 | # Color of the anchor directory segments. Anchor segments are never shortened. The first 227 | # segment is always an anchor. 228 | typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255 229 | # Display anchor directory segments in bold. 230 | typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true 231 | # Don't shorten directories that contain any of these files. They are anchors. 232 | local anchor_files=( 233 | .bzr 234 | .citc 235 | .git 236 | .hg 237 | .node-version 238 | .python-version 239 | .go-version 240 | .ruby-version 241 | .lua-version 242 | .java-version 243 | .perl-version 244 | .php-version 245 | .tool-version 246 | .shorten_folder_marker 247 | .svn 248 | .terraform 249 | CVS 250 | Cargo.toml 251 | composer.json 252 | go.mod 253 | package.json 254 | stack.yaml 255 | ) 256 | typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" 257 | # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains 258 | # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is 259 | # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) 260 | # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers 261 | # and other directories don't. 262 | # 263 | # Optionally, "first" and "last" can be followed by ":" where is an integer. 264 | # This moves the truncation point to the right (positive offset) or to the left (negative offset) 265 | # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" 266 | # respectively. 267 | typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false 268 | # Don't shorten this many last directory segments. They are anchors. 269 | typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 270 | # Shorten directory if it's longer than this even if there is space for it. The value can 271 | # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, 272 | # directory will be shortened only when prompt doesn't fit or when other parameters demand it 273 | # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). 274 | # If set to `0`, directory will always be shortened to its minimum length. 275 | typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 276 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this 277 | # many columns for typing commands. 278 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 279 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least 280 | # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. 281 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 282 | # If set to true, embed a hyperlink into the directory. Useful for quickly 283 | # opening a directory in the file manager simply by clicking the link. 284 | # Can also be handy when the directory is shortened, as it allows you to see 285 | # the full directory that was used in previous commands. 286 | typeset -g POWERLEVEL9K_DIR_HYPERLINK=false 287 | 288 | # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON 289 | # and POWERLEVEL9K_DIR_CLASSES below. 290 | typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 291 | 292 | # The default icon shown next to non-writable and non-existent directories when 293 | # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. 294 | # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' 295 | 296 | # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different 297 | # directories. It must be an array with 3 * N elements. Each triplet consists of: 298 | # 299 | # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with 300 | # extended_glob option enabled. 301 | # 2. Directory class for the purpose of styling. 302 | # 3. An empty string. 303 | # 304 | # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. 305 | # 306 | # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories 307 | # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. 308 | # 309 | # For example, given these settings: 310 | # 311 | # typeset -g POWERLEVEL9K_DIR_CLASSES=( 312 | # '~/work(|/*)' WORK '' 313 | # '~(|/*)' HOME '' 314 | # '*' DEFAULT '') 315 | # 316 | # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one 317 | # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or 318 | # WORK_NON_EXISTENT. 319 | # 320 | # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an 321 | # option to define custom colors and icons for different directory classes. 322 | # 323 | # # Styling for WORK. 324 | # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' 325 | # typeset -g POWERLEVEL9K_DIR_WORK_BACKGROUND=4 326 | # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=254 327 | # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=250 328 | # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=255 329 | # 330 | # # Styling for WORK_NOT_WRITABLE. 331 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 332 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_BACKGROUND=4 333 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=254 334 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=250 335 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=255 336 | # 337 | # # Styling for WORK_NON_EXISTENT. 338 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' 339 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_BACKGROUND=4 340 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=254 341 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=250 342 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=255 343 | # 344 | # If a styling parameter isn't explicitly defined for some class, it falls back to the classless 345 | # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls 346 | # back to POWERLEVEL9K_DIR_FOREGROUND. 347 | # 348 | typeset -g POWERLEVEL9K_DIR_CLASSES=() 349 | 350 | # Custom prefix. 351 | # typeset -g POWERLEVEL9K_DIR_PREFIX='in ' 352 | 353 | #####################################[ vcs: git status ]###################################### 354 | # Version control background colors. 355 | typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2 356 | typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3 357 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2 358 | typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3 359 | typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8 360 | 361 | # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon. 362 | typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= 363 | 364 | # Untracked files icon. It's really a question mark, your font isn't broken. 365 | # Change the value of this parameter to show a different icon. 366 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' 367 | 368 | # Formatter for Git status. 369 | # 370 | # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. 371 | # 372 | # You can edit the function to customize how Git status looks. 373 | # 374 | # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: 375 | # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. 376 | function my_git_formatter() { 377 | emulate -L zsh 378 | 379 | if [[ -n $P9K_CONTENT ]]; then 380 | # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from 381 | # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. 382 | typeset -g my_git_format=$P9K_CONTENT 383 | return 384 | fi 385 | 386 | # Styling for different parts of Git status. 387 | local meta='%7F' # white foreground 388 | local clean='%0F' # black foreground 389 | local modified='%0F' # black foreground 390 | local untracked='%0F' # black foreground 391 | local conflicted='%1F' # red foreground 392 | 393 | local res 394 | 395 | if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then 396 | local branch=${(V)VCS_STATUS_LOCAL_BRANCH} 397 | # If local branch name is at most 32 characters long, show it in full. 398 | # Otherwise show the first 12 … the last 12. 399 | # Tip: To always show local branch name in full without truncation, delete the next line. 400 | (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line 401 | res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" 402 | fi 403 | 404 | if [[ -n $VCS_STATUS_TAG 405 | # Show tag only if not on a branch. 406 | # Tip: To always show tag, delete the next line. 407 | && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line 408 | ]]; then 409 | local tag=${(V)VCS_STATUS_TAG} 410 | # If tag name is at most 32 characters long, show it in full. 411 | # Otherwise show the first 12 … the last 12. 412 | # Tip: To always show tag name in full without truncation, delete the next line. 413 | (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line 414 | res+="${meta}#${clean}${tag//\%/%%}" 415 | fi 416 | 417 | # Display the current Git commit if there is no branch and no tag. 418 | # Tip: To always display the current Git commit, delete the next line. 419 | [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line 420 | res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" 421 | 422 | # Show tracking branch name if it differs from local branch. 423 | if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then 424 | res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" 425 | fi 426 | 427 | # Display "wip" if the latest commit's summary contains "wip" or "WIP". 428 | if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then 429 | res+=" ${modified}wip" 430 | fi 431 | 432 | # ⇣42 if behind the remote. 433 | (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" 434 | # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. 435 | (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " 436 | (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" 437 | # ⇠42 if behind the push remote. 438 | (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" 439 | (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " 440 | # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. 441 | (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" 442 | # *42 if have stashes. 443 | (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" 444 | # 'merge' if the repo is in an unusual state. 445 | [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" 446 | # ~42 if have merge conflicts. 447 | (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" 448 | # +42 if have staged changes. 449 | (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" 450 | # !42 if have unstaged changes. 451 | (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" 452 | # ?42 if have untracked files. It's really a question mark, your font isn't broken. 453 | # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. 454 | # Remove the next line if you don't want to see untracked files at all. 455 | (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" 456 | # "─" if the number of unstaged files is unknown. This can happen due to 457 | # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower 458 | # than the number of files in the Git index, or due to bash.showDirtyState being set to false 459 | # in the repository config. The number of staged and untracked files may also be unknown 460 | # in this case. 461 | (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" 462 | 463 | typeset -g my_git_format=$res 464 | } 465 | functions -M my_git_formatter 2>/dev/null 466 | 467 | # Don't count the number of unstaged, untracked and conflicted files in Git repositories with 468 | # more than this many files in the index. Negative value means infinity. 469 | # 470 | # If you are working in Git repositories with tens of millions of files and seeing performance 471 | # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output 472 | # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's 473 | # config: `git config bash.showDirtyState false`. 474 | typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 475 | 476 | # Don't show Git status in prompt for repositories whose workdir matches this pattern. 477 | # For example, if set to '~', the Git repository at $HOME/.git will be ignored. 478 | # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. 479 | typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' 480 | 481 | # Disable the default Git status formatting. 482 | typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true 483 | # Install our own Git status formatter. 484 | typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' 485 | # Enable counters for staged, unstaged, etc. 486 | typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 487 | 488 | # Custom icon. 489 | typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= 490 | # Custom prefix. 491 | # typeset -g POWERLEVEL9K_VCS_PREFIX='on ' 492 | 493 | # Show status of repositories of these types. You can add svn and/or hg if you are 494 | # using them. If you do, your prompt may become slow even when your current directory 495 | # isn't in an svn or hg repository. 496 | typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) 497 | 498 | ##########################[ status: exit code of the last command ]########################### 499 | # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and 500 | # style them independently from the regular OK and ERROR state. 501 | typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true 502 | 503 | # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as 504 | # it will signify success by turning green. 505 | typeset -g POWERLEVEL9K_STATUS_OK=true 506 | typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' 507 | typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2 508 | typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0 509 | 510 | # Status when some part of a pipe command fails but the overall exit status is zero. It may look 511 | # like this: 1|0. 512 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true 513 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' 514 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2 515 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0 516 | 517 | # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as 518 | # it will signify error by turning red. 519 | typeset -g POWERLEVEL9K_STATUS_ERROR=true 520 | typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' 521 | typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3 522 | typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1 523 | 524 | # Status when the last command was terminated by a signal. 525 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true 526 | # Use terse signal names: "INT" instead of "SIGINT(2)". 527 | typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false 528 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' 529 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3 530 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1 531 | 532 | # Status when some part of a pipe command fails and the overall exit status is also non-zero. 533 | # It may look like this: 1|0. 534 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true 535 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' 536 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3 537 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1 538 | 539 | ###################[ command_execution_time: duration of the last command ]################### 540 | # Execution time color. 541 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0 542 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3 543 | # Show duration of the last command if takes at least this many seconds. 544 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 545 | # Show this many fractional digits. Zero means round to seconds. 546 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 547 | # Duration format: 1d 2h 3m 4s. 548 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' 549 | # Custom icon. 550 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= 551 | # Custom prefix. 552 | # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took ' 553 | 554 | #######################[ background_jobs: presence of background jobs ]####################### 555 | # Background jobs color. 556 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=6 557 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=0 558 | # Don't show the number of background jobs. 559 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false 560 | # Custom icon. 561 | # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' 562 | 563 | #######################[ direnv: direnv status (https://direnv.net/) ]######################## 564 | # Direnv color. 565 | typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3 566 | typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0 567 | # Custom icon. 568 | # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 569 | 570 | ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### 571 | # Default asdf color. Only used to display tools for which there is no color override (see below). 572 | # Tip: Override these parameters for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND and 573 | # POWERLEVEL9K_ASDF_${TOOL}_BACKGROUND. 574 | typeset -g POWERLEVEL9K_ASDF_FOREGROUND=0 575 | typeset -g POWERLEVEL9K_ASDF_BACKGROUND=7 576 | 577 | # There are four parameters that can be used to hide asdf tools. Each parameter describes 578 | # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at 579 | # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to 580 | # hide a tool, it gets shown. 581 | # 582 | # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and 583 | # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: 584 | # 585 | # asdf local python 3.8.1 586 | # asdf global python 3.8.1 587 | # 588 | # After running both commands the current python version is 3.8.1 and its source is "local" as 589 | # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, 590 | # it'll hide python version in this case because 3.8.1 is the same as the global version. 591 | # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't 592 | # contain "local". 593 | 594 | # Hide tool versions that don't come from one of these sources. 595 | # 596 | # Available sources: 597 | # 598 | # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" 599 | # - local `asdf current` says "set by /some/not/home/directory/file" 600 | # - global `asdf current` says "set by /home/username/file" 601 | # 602 | # Note: If this parameter is set to (shell local global), it won't hide tools. 603 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. 604 | typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) 605 | 606 | # If set to false, hide tool versions that are the same as global. 607 | # 608 | # Note: The name of this parameter doesn't reflect its meaning at all. 609 | # Note: If this parameter is set to true, it won't hide tools. 610 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. 611 | typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false 612 | 613 | # If set to false, hide tool versions that are equal to "system". 614 | # 615 | # Note: If this parameter is set to true, it won't hide tools. 616 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. 617 | typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true 618 | 619 | # If set to non-empty value, hide tools unless there is a file matching the specified file pattern 620 | # in the current directory, or its parent directory, or its grandparent directory, and so on. 621 | # 622 | # Note: If this parameter is set to empty value, it won't hide tools. 623 | # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. 624 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. 625 | # 626 | # Example: Hide nodejs version when there is no package.json and no *.js files in the current 627 | # directory, in `..`, in `../..` and so on. 628 | # 629 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' 630 | typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= 631 | 632 | # Ruby version from asdf. 633 | typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=0 634 | typeset -g POWERLEVEL9K_ASDF_RUBY_BACKGROUND=1 635 | # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' 636 | # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' 637 | 638 | # Python version from asdf. 639 | typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=0 640 | typeset -g POWERLEVEL9K_ASDF_PYTHON_BACKGROUND=4 641 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' 642 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' 643 | 644 | # Go version from asdf. 645 | typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=0 646 | typeset -g POWERLEVEL9K_ASDF_GOLANG_BACKGROUND=4 647 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 648 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 649 | 650 | # Node.js version from asdf. 651 | typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=0 652 | typeset -g POWERLEVEL9K_ASDF_NODEJS_BACKGROUND=2 653 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' 654 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' 655 | 656 | # Rust version from asdf. 657 | typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=0 658 | typeset -g POWERLEVEL9K_ASDF_RUST_BACKGROUND=208 659 | # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' 660 | # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' 661 | 662 | # .NET Core version from asdf. 663 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=0 664 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_BACKGROUND=5 665 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' 666 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar' 667 | 668 | # Flutter version from asdf. 669 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=0 670 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_BACKGROUND=4 671 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' 672 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' 673 | 674 | # Lua version from asdf. 675 | typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=0 676 | typeset -g POWERLEVEL9K_ASDF_LUA_BACKGROUND=4 677 | # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' 678 | # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' 679 | 680 | # Java version from asdf. 681 | typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=1 682 | typeset -g POWERLEVEL9K_ASDF_JAVA_BACKGROUND=7 683 | # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' 684 | # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' 685 | 686 | # Perl version from asdf. 687 | typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=0 688 | typeset -g POWERLEVEL9K_ASDF_PERL_BACKGROUND=4 689 | # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' 690 | # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' 691 | 692 | # Erlang version from asdf. 693 | typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=0 694 | typeset -g POWERLEVEL9K_ASDF_ERLANG_BACKGROUND=1 695 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 696 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 697 | 698 | # Elixir version from asdf. 699 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=0 700 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_BACKGROUND=5 701 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' 702 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' 703 | 704 | # Postgres version from asdf. 705 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=0 706 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_BACKGROUND=6 707 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' 708 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' 709 | 710 | # PHP version from asdf. 711 | typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=0 712 | typeset -g POWERLEVEL9K_ASDF_PHP_BACKGROUND=5 713 | # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' 714 | # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' 715 | 716 | # Haskell version from asdf. 717 | typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=0 718 | typeset -g POWERLEVEL9K_ASDF_HASKELL_BACKGROUND=3 719 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 720 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' 721 | 722 | # Julia version from asdf. 723 | typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=0 724 | typeset -g POWERLEVEL9K_ASDF_JULIA_BACKGROUND=2 725 | # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' 726 | # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' 727 | 728 | ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### 729 | # NordVPN connection indicator color. 730 | typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=7 731 | typeset -g POWERLEVEL9K_NORDVPN_BACKGROUND=4 732 | # Hide NordVPN connection indicator when not connected. 733 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= 734 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= 735 | # Custom icon. 736 | # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' 737 | 738 | #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## 739 | # Ranger shell color. 740 | typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3 741 | typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 742 | # Custom icon. 743 | # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' 744 | 745 | ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### 746 | # Nnn shell color. 747 | typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 748 | typeset -g POWERLEVEL9K_NNN_BACKGROUND=6 749 | # Custom icon. 750 | # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' 751 | 752 | ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]################## 753 | # xplr shell color. 754 | typeset -g POWERLEVEL9K_XPLR_FOREGROUND=0 755 | typeset -g POWERLEVEL9K_XPLR_BACKGROUND=6 756 | # Custom icon. 757 | # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' 758 | 759 | ###########################[ vim_shell: vim shell indicator (:sh) ]########################### 760 | # Vim shell indicator color. 761 | typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0 762 | typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2 763 | # Custom icon. 764 | # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 765 | 766 | ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### 767 | # Midnight Commander shell color. 768 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3 769 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_BACKGROUND=0 770 | # Custom icon. 771 | # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' 772 | 773 | #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## 774 | # Nix shell color. 775 | typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0 776 | typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4 777 | 778 | # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. 779 | # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= 780 | 781 | # Custom icon. 782 | # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 783 | 784 | ##################################[ disk_usage: disk usage ]################################## 785 | # Colors for different levels of disk usage. 786 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3 787 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_BACKGROUND=0 788 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=0 789 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=3 790 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=7 791 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=1 792 | # Thresholds for different levels of disk usage (percentage points). 793 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 794 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 795 | # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. 796 | typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false 797 | # Custom icon. 798 | # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 799 | 800 | ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]########### 801 | # Foreground color. 802 | typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0 803 | # Text and color for normal (a.k.a. command) vi mode. 804 | typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL 805 | typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2 806 | # Text and color for visual vi mode. 807 | typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL 808 | typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4 809 | # Text and color for overtype (a.k.a. overwrite and replace) vi mode. 810 | typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE 811 | typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3 812 | # Text and color for insert vi mode. 813 | typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= 814 | typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 815 | 816 | ######################################[ ram: free RAM ]####################################### 817 | # RAM color. 818 | typeset -g POWERLEVEL9K_RAM_FOREGROUND=0 819 | typeset -g POWERLEVEL9K_RAM_BACKGROUND=3 820 | # Custom icon. 821 | # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' 822 | 823 | #####################################[ swap: used swap ]###################################### 824 | # Swap color. 825 | typeset -g POWERLEVEL9K_SWAP_FOREGROUND=0 826 | typeset -g POWERLEVEL9K_SWAP_BACKGROUND=3 827 | # Custom icon. 828 | # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' 829 | 830 | ######################################[ load: CPU load ]###################################### 831 | # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. 832 | typeset -g POWERLEVEL9K_LOAD_WHICH=5 833 | # Load color when load is under 50%. 834 | typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=0 835 | typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=2 836 | # Load color when load is between 50% and 70%. 837 | typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=0 838 | typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=3 839 | # Load color when load is over 70%. 840 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=0 841 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=1 842 | # Custom icon. 843 | # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' 844 | 845 | ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ 846 | # Todo color. 847 | typeset -g POWERLEVEL9K_TODO_FOREGROUND=0 848 | typeset -g POWERLEVEL9K_TODO_BACKGROUND=8 849 | # Hide todo when the total number of tasks is zero. 850 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true 851 | # Hide todo when the number of tasks after filtering is zero. 852 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false 853 | 854 | # Todo format. The following parameters are available within the expansion. 855 | # 856 | # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. 857 | # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. 858 | # 859 | # These variables correspond to the last line of the output of `todo.sh -p ls`: 860 | # 861 | # TODO: 24 of 42 tasks shown 862 | # 863 | # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. 864 | # 865 | # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' 866 | 867 | # Custom icon. 868 | # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' 869 | 870 | ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ 871 | # Timewarrior color. 872 | typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255 873 | typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8 874 | 875 | # If the tracked task is longer than 24 characters, truncate and append "…". 876 | # Tip: To always display tasks without truncation, delete the following parameter. 877 | # Tip: To hide task names and display just the icon when time tracking is enabled, set the 878 | # value of the following parameter to "". 879 | typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' 880 | 881 | # Custom icon. 882 | # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 883 | 884 | ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## 885 | # Taskwarrior color. 886 | typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=0 887 | typeset -g POWERLEVEL9K_TASKWARRIOR_BACKGROUND=6 888 | 889 | # Taskwarrior segment format. The following parameters are available within the expansion. 890 | # 891 | # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. 892 | # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. 893 | # 894 | # Zero values are represented as empty parameters. 895 | # 896 | # The default format: 897 | # 898 | # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' 899 | # 900 | # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' 901 | 902 | # Custom icon. 903 | # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 904 | 905 | ##################################[ context: user@hostname ]################################## 906 | # Context color when running with privileges. 907 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1 908 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0 909 | # Context color in SSH without privileges. 910 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=3 911 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=0 912 | # Default context color (no privileges, no SSH). 913 | typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3 914 | typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0 915 | 916 | # Context format when running with privileges: user@hostname. 917 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m' 918 | # Context format when in SSH without privileges: user@hostname. 919 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' 920 | # Default context format (no privileges, no SSH): user@hostname. 921 | typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' 922 | 923 | # Don't show context unless running with privileges or in SSH. 924 | # Tip: Remove the next line to always show context. 925 | typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= 926 | 927 | # Custom icon. 928 | # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' 929 | # Custom prefix. 930 | # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with ' 931 | 932 | ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### 933 | # Python virtual environment color. 934 | typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0 935 | typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4 936 | # Don't show Python version next to the virtual environment name. 937 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false 938 | # If set to "false", won't show virtualenv if pyenv is already shown. 939 | # If set to "if-different", won't show virtualenv if it's the same as pyenv. 940 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false 941 | # Separate environment name from Python version only with a space. 942 | typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= 943 | # Custom icon. 944 | # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 945 | 946 | #####################[ anaconda: conda environment (https://conda.io/) ]###################### 947 | # Anaconda environment color. 948 | typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0 949 | typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4 950 | 951 | # Anaconda segment format. The following parameters are available within the expansion. 952 | # 953 | # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. 954 | # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. 955 | # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). 956 | # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). 957 | # 958 | # CONDA_PROMPT_MODIFIER can be configured with the following command: 959 | # 960 | # conda config --set env_prompt '({default_env}) ' 961 | # 962 | # The last argument is a Python format string that can use the following variables: 963 | # 964 | # - prefix The same as CONDA_PREFIX. 965 | # - default_env The same as CONDA_DEFAULT_ENV. 966 | # - name The last segment of CONDA_PREFIX. 967 | # - stacked_env Comma-separated list of names in the environment stack. The first element is 968 | # always the same as default_env. 969 | # 970 | # Note: '({default_env}) ' is the default value of env_prompt. 971 | # 972 | # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER 973 | # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former 974 | # is empty. 975 | typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' 976 | 977 | # Custom icon. 978 | # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' 979 | 980 | ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ 981 | # Pyenv color. 982 | typeset -g POWERLEVEL9K_PYENV_FOREGROUND=0 983 | typeset -g POWERLEVEL9K_PYENV_BACKGROUND=4 984 | # Hide python version if it doesn't come from one of these sources. 985 | typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) 986 | # If set to false, hide python version if it's the same as global: 987 | # $(pyenv version-name) == $(pyenv global). 988 | typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false 989 | # If set to false, hide python version if it's equal to "system". 990 | typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true 991 | 992 | # Pyenv segment format. The following parameters are available within the expansion. 993 | # 994 | # - P9K_CONTENT Current pyenv environment (pyenv version-name). 995 | # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). 996 | # 997 | # The default format has the following logic: 998 | # 999 | # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or 1000 | # starts with "$P9K_PYENV_PYTHON_VERSION/". 1001 | # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". 1002 | typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' 1003 | 1004 | # Custom icon. 1005 | # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1006 | 1007 | ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ 1008 | # Goenv color. 1009 | typeset -g POWERLEVEL9K_GOENV_FOREGROUND=0 1010 | typeset -g POWERLEVEL9K_GOENV_BACKGROUND=4 1011 | # Hide go version if it doesn't come from one of these sources. 1012 | typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) 1013 | # If set to false, hide go version if it's the same as global: 1014 | # $(goenv version-name) == $(goenv global). 1015 | typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false 1016 | # If set to false, hide go version if it's equal to "system". 1017 | typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true 1018 | # Custom icon. 1019 | # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1020 | 1021 | ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## 1022 | # Nodenv color. 1023 | typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2 1024 | typeset -g POWERLEVEL9K_NODENV_BACKGROUND=0 1025 | # Hide node version if it doesn't come from one of these sources. 1026 | typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) 1027 | # If set to false, hide node version if it's the same as global: 1028 | # $(nodenv version-name) == $(nodenv global). 1029 | typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false 1030 | # If set to false, hide node version if it's equal to "system". 1031 | typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true 1032 | # Custom icon. 1033 | # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1034 | 1035 | ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### 1036 | # Nvm color. 1037 | typeset -g POWERLEVEL9K_NVM_FOREGROUND=0 1038 | typeset -g POWERLEVEL9K_NVM_BACKGROUND=5 1039 | # Custom icon. 1040 | # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1041 | 1042 | ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ 1043 | # Nodeenv color. 1044 | typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2 1045 | typeset -g POWERLEVEL9K_NODEENV_BACKGROUND=0 1046 | # Don't show Node version next to the environment name. 1047 | typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false 1048 | # Separate environment name from Node version only with a space. 1049 | typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= 1050 | # Custom icon. 1051 | # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1052 | 1053 | ##############################[ node_version: node.js version ]############################### 1054 | # Node version color. 1055 | typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=7 1056 | typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=2 1057 | # Show node version only when in a directory tree containing package.json. 1058 | typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true 1059 | # Custom icon. 1060 | # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1061 | 1062 | #######################[ go_version: go version (https://golang.org) ]######################## 1063 | # Go version color. 1064 | typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=255 1065 | typeset -g POWERLEVEL9K_GO_VERSION_BACKGROUND=2 1066 | # Show go version only when in a go project subdirectory. 1067 | typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true 1068 | # Custom icon. 1069 | # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1070 | 1071 | #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## 1072 | # Rust version color. 1073 | typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=0 1074 | typeset -g POWERLEVEL9K_RUST_VERSION_BACKGROUND=208 1075 | # Show rust version only when in a rust project subdirectory. 1076 | typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true 1077 | # Custom icon. 1078 | # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1079 | 1080 | ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ 1081 | # .NET version color. 1082 | typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=7 1083 | typeset -g POWERLEVEL9K_DOTNET_VERSION_BACKGROUND=5 1084 | # Show .NET version only when in a .NET project subdirectory. 1085 | typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true 1086 | # Custom icon. 1087 | # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1088 | 1089 | #####################[ php_version: php version (https://www.php.net/) ]###################### 1090 | # PHP version color. 1091 | typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=0 1092 | typeset -g POWERLEVEL9K_PHP_VERSION_BACKGROUND=5 1093 | # Show PHP version only when in a PHP project subdirectory. 1094 | typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true 1095 | # Custom icon. 1096 | # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1097 | 1098 | ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### 1099 | # Laravel version color. 1100 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1 1101 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_BACKGROUND=7 1102 | # Custom icon. 1103 | # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1104 | 1105 | #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## 1106 | # Rbenv color. 1107 | typeset -g POWERLEVEL9K_RBENV_FOREGROUND=0 1108 | typeset -g POWERLEVEL9K_RBENV_BACKGROUND=1 1109 | # Hide ruby version if it doesn't come from one of these sources. 1110 | typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) 1111 | # If set to false, hide ruby version if it's the same as global: 1112 | # $(rbenv version-name) == $(rbenv global). 1113 | typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false 1114 | # If set to false, hide ruby version if it's equal to "system". 1115 | typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true 1116 | # Custom icon. 1117 | # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1118 | 1119 | ####################[ java_version: java version (https://www.java.com/) ]#################### 1120 | # Java version color. 1121 | typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=1 1122 | typeset -g POWERLEVEL9K_JAVA_VERSION_BACKGROUND=7 1123 | # Show java version only when in a java project subdirectory. 1124 | typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true 1125 | # Show brief version. 1126 | typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false 1127 | # Custom icon. 1128 | # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1129 | 1130 | ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### 1131 | # Package color. 1132 | typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=0 1133 | typeset -g POWERLEVEL9K_PACKAGE_BACKGROUND=6 1134 | 1135 | # Package format. The following parameters are available within the expansion. 1136 | # 1137 | # - P9K_PACKAGE_NAME The value of `name` field in package.json. 1138 | # - P9K_PACKAGE_VERSION The value of `version` field in package.json. 1139 | # 1140 | # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' 1141 | 1142 | # Custom icon. 1143 | # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1144 | 1145 | #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## 1146 | # Rvm color. 1147 | typeset -g POWERLEVEL9K_RVM_FOREGROUND=0 1148 | typeset -g POWERLEVEL9K_RVM_BACKGROUND=240 1149 | # Don't show @gemset at the end. 1150 | typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false 1151 | # Don't show ruby- at the front. 1152 | typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false 1153 | # Custom icon. 1154 | # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1155 | 1156 | ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ 1157 | # Fvm color. 1158 | typeset -g POWERLEVEL9K_FVM_FOREGROUND=0 1159 | typeset -g POWERLEVEL9K_FVM_BACKGROUND=4 1160 | # Custom icon. 1161 | # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1162 | 1163 | ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### 1164 | # Lua color. 1165 | typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=0 1166 | typeset -g POWERLEVEL9K_LUAENV_BACKGROUND=4 1167 | # Hide lua version if it doesn't come from one of these sources. 1168 | typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) 1169 | # If set to false, hide lua version if it's the same as global: 1170 | # $(luaenv version-name) == $(luaenv global). 1171 | typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false 1172 | # If set to false, hide lua version if it's equal to "system". 1173 | typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true 1174 | # Custom icon. 1175 | # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1176 | 1177 | ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ 1178 | # Java color. 1179 | typeset -g POWERLEVEL9K_JENV_FOREGROUND=1 1180 | typeset -g POWERLEVEL9K_JENV_BACKGROUND=7 1181 | # Hide java version if it doesn't come from one of these sources. 1182 | typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) 1183 | # If set to false, hide java version if it's the same as global: 1184 | # $(jenv version-name) == $(jenv global). 1185 | typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false 1186 | # If set to false, hide java version if it's equal to "system". 1187 | typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true 1188 | # Custom icon. 1189 | # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1190 | 1191 | ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ 1192 | # Perl color. 1193 | typeset -g POWERLEVEL9K_PLENV_FOREGROUND=0 1194 | typeset -g POWERLEVEL9K_PLENV_BACKGROUND=4 1195 | # Hide perl version if it doesn't come from one of these sources. 1196 | typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) 1197 | # If set to false, hide perl version if it's the same as global: 1198 | # $(plenv version-name) == $(plenv global). 1199 | typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false 1200 | # If set to false, hide perl version if it's equal to "system". 1201 | typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true 1202 | # Custom icon. 1203 | # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1204 | 1205 | ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############ 1206 | # Perlbrew color. 1207 | typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67 1208 | # Show perlbrew version only when in a perl project subdirectory. 1209 | typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true 1210 | # Don't show "perl-" at the front. 1211 | typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false 1212 | # Custom icon. 1213 | # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐' 1214 | 1215 | ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ 1216 | # PHP color. 1217 | typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0 1218 | typeset -g POWERLEVEL9K_PHPENV_BACKGROUND=5 1219 | # Hide php version if it doesn't come from one of these sources. 1220 | typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) 1221 | # If set to false, hide php version if it's the same as global: 1222 | # $(phpenv version-name) == $(phpenv global). 1223 | typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false 1224 | # If set to false, hide PHP version if it's equal to "system". 1225 | typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true 1226 | # Custom icon. 1227 | # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1228 | 1229 | #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### 1230 | # Scala color. 1231 | typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=0 1232 | typeset -g POWERLEVEL9K_SCALAENV_BACKGROUND=1 1233 | # Hide scala version if it doesn't come from one of these sources. 1234 | typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) 1235 | # If set to false, hide scala version if it's the same as global: 1236 | # $(scalaenv version-name) == $(scalaenv global). 1237 | typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false 1238 | # If set to false, hide scala version if it's equal to "system". 1239 | typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true 1240 | # Custom icon. 1241 | # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1242 | 1243 | ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### 1244 | # Haskell color. 1245 | typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0 1246 | typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3 1247 | 1248 | # Hide haskell version if it doesn't come from one of these sources. 1249 | # 1250 | # shell: version is set by STACK_YAML 1251 | # local: version is set by stack.yaml up the directory tree 1252 | # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) 1253 | typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) 1254 | # If set to false, hide haskell version if it's the same as in the implicit global project. 1255 | typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true 1256 | # Custom icon. 1257 | # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' 1258 | 1259 | ################[ terraform: terraform workspace (https://www.terraform.io) ]################# 1260 | # Don't show terraform workspace if it's literally "default". 1261 | typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false 1262 | # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element 1263 | # in each pair defines a pattern against which the current terraform workspace gets matched. 1264 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1265 | # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, 1266 | # you'll see this value in your prompt. The second element of each pair in 1267 | # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The 1268 | # first match wins. 1269 | # 1270 | # For example, given these settings: 1271 | # 1272 | # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1273 | # '*prod*' PROD 1274 | # '*test*' TEST 1275 | # '*' OTHER) 1276 | # 1277 | # If your current terraform workspace is "project_test", its class is TEST because "project_test" 1278 | # doesn't match the pattern '*prod*' but does match '*test*'. 1279 | # 1280 | # You can define different colors, icons and content expansions for different classes: 1281 | # 1282 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=2 1283 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_BACKGROUND=0 1284 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1285 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1286 | typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1287 | # '*prod*' PROD # These values are examples that are unlikely 1288 | # '*test*' TEST # to match your needs. Customize them as needed. 1289 | '*' OTHER) 1290 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=4 1291 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_BACKGROUND=0 1292 | # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' 1293 | 1294 | #############[ terraform_version: terraform version (https://www.terraform.io) ]############## 1295 | # Terraform version color. 1296 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=4 1297 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_BACKGROUND=0 1298 | # Custom icon. 1299 | # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1300 | 1301 | ################[ terraform_version: It shows active terraform version (https://www.terraform.io) ]################# 1302 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_SHOW_ON_COMMAND='terraform|tf' 1303 | 1304 | #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# 1305 | # Show kubecontext only when the command you are typing invokes one of these tools. 1306 | # Tip: Remove the next line to always show kubecontext. 1307 | typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold' 1308 | 1309 | # Kubernetes context classes for the purpose of using different colors, icons and expansions with 1310 | # different contexts. 1311 | # 1312 | # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element 1313 | # in each pair defines a pattern against which the current kubernetes context gets matched. 1314 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1315 | # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, 1316 | # you'll see this value in your prompt. The second element of each pair in 1317 | # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The 1318 | # first match wins. 1319 | # 1320 | # For example, given these settings: 1321 | # 1322 | # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1323 | # '*prod*' PROD 1324 | # '*test*' TEST 1325 | # '*' DEFAULT) 1326 | # 1327 | # If your current kubernetes context is "deathray-testing/default", its class is TEST 1328 | # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. 1329 | # 1330 | # You can define different colors, icons and content expansions for different classes: 1331 | # 1332 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=0 1333 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_BACKGROUND=2 1334 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1335 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1336 | typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1337 | # '*prod*' PROD # These values are examples that are unlikely 1338 | # '*test*' TEST # to match your needs. Customize them as needed. 1339 | '*' DEFAULT) 1340 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7 1341 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5 1342 | # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1343 | 1344 | # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext 1345 | # segment. Parameter expansions are very flexible and fast, too. See reference: 1346 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1347 | # 1348 | # Within the expansion the following parameters are always available: 1349 | # 1350 | # - P9K_CONTENT The content that would've been displayed if there was no content 1351 | # expansion defined. 1352 | # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the 1353 | # output of `kubectl config get-contexts`. 1354 | # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the 1355 | # output of `kubectl config get-contexts`. 1356 | # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE 1357 | # in the output of `kubectl config get-contexts`. If there is no 1358 | # namespace, the parameter is set to "default". 1359 | # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the 1360 | # output of `kubectl config get-contexts`. 1361 | # 1362 | # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), 1363 | # the following extra parameters are available: 1364 | # 1365 | # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". 1366 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. 1367 | # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. 1368 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. 1369 | # 1370 | # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, 1371 | # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": 1372 | # 1373 | # - P9K_KUBECONTEXT_CLOUD_NAME=gke 1374 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account 1375 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a 1376 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1377 | # 1378 | # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": 1379 | # 1380 | # - P9K_KUBECONTEXT_CLOUD_NAME=eks 1381 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 1382 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 1383 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1384 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= 1385 | # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. 1386 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' 1387 | # Append the current context's namespace if it's not "default". 1388 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' 1389 | 1390 | # Custom prefix. 1391 | # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at ' 1392 | 1393 | #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# 1394 | # Show aws only when the command you are typing invokes one of these tools. 1395 | # Tip: Remove the next line to always show aws. 1396 | typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' 1397 | 1398 | # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element 1399 | # in each pair defines a pattern against which the current AWS profile gets matched. 1400 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1401 | # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, 1402 | # you'll see this value in your prompt. The second element of each pair in 1403 | # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The 1404 | # first match wins. 1405 | # 1406 | # For example, given these settings: 1407 | # 1408 | # typeset -g POWERLEVEL9K_AWS_CLASSES=( 1409 | # '*prod*' PROD 1410 | # '*test*' TEST 1411 | # '*' DEFAULT) 1412 | # 1413 | # If your current AWS profile is "company_test", its class is TEST 1414 | # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. 1415 | # 1416 | # You can define different colors, icons and content expansions for different classes: 1417 | # 1418 | # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 1419 | # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1420 | # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1421 | typeset -g POWERLEVEL9K_AWS_CLASSES=( 1422 | # '*prod*' PROD # These values are examples that are unlikely 1423 | # '*test*' TEST # to match your needs. Customize them as needed. 1424 | '*' DEFAULT) 1425 | typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=7 1426 | typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=1 1427 | # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1428 | 1429 | # AWS segment format. The following parameters are available within the expansion. 1430 | # 1431 | # - P9K_AWS_PROFILE The name of the current AWS profile. 1432 | # - P9K_AWS_REGION The region associated with the current AWS profile. 1433 | typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}' 1434 | 1435 | #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# 1436 | # AWS Elastic Beanstalk environment color. 1437 | typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2 1438 | typeset -g POWERLEVEL9K_AWS_EB_ENV_BACKGROUND=0 1439 | # Custom icon. 1440 | # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1441 | 1442 | ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## 1443 | # Show azure only when the command you are typing invokes one of these tools. 1444 | # Tip: Remove the next line to always show azure. 1445 | typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' 1446 | # Azure account name color. 1447 | typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7 1448 | typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4 1449 | # Custom icon. 1450 | # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1451 | 1452 | ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### 1453 | # Show gcloud only when the command you are typing invokes one of these tools. 1454 | # Tip: Remove the next line to always show gcloud. 1455 | typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil' 1456 | # Google cloud color. 1457 | typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=7 1458 | typeset -g POWERLEVEL9K_GCLOUD_BACKGROUND=4 1459 | 1460 | # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or 1461 | # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative 1462 | # enough. You can use the following parameters in the expansions. Each of them corresponds to the 1463 | # output of `gcloud` tool. 1464 | # 1465 | # Parameter | Source 1466 | # -------------------------|-------------------------------------------------------------------- 1467 | # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' 1468 | # P9K_GCLOUD_ACCOUNT | gcloud config get-value account 1469 | # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project 1470 | # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' 1471 | # 1472 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. 1473 | # 1474 | # Obtaining project name requires sending a request to Google servers. This can take a long time 1475 | # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud 1476 | # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets 1477 | # set and gcloud prompt segment transitions to state COMPLETE. 1478 | # 1479 | # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL 1480 | # and COMPLETE. You can also hide gcloud in state PARTIAL by setting 1481 | # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and 1482 | # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. 1483 | typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' 1484 | typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' 1485 | 1486 | # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name 1487 | # this often. Negative value disables periodic polling. In this mode project name is retrieved 1488 | # only when the current configuration, account or project id changes. 1489 | typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 1490 | 1491 | # Custom icon. 1492 | # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' 1493 | 1494 | #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# 1495 | # Show google_app_cred only when the command you are typing invokes one of these tools. 1496 | # Tip: Remove the next line to always show google_app_cred. 1497 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' 1498 | 1499 | # Google application credentials classes for the purpose of using different colors, icons and 1500 | # expansions with different credentials. 1501 | # 1502 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first 1503 | # element in each pair defines a pattern against which the current kubernetes context gets 1504 | # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion 1505 | # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION 1506 | # parameters, you'll see this value in your prompt. The second element of each pair in 1507 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. 1508 | # The first match wins. 1509 | # 1510 | # For example, given these settings: 1511 | # 1512 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1513 | # '*:*prod*:*' PROD 1514 | # '*:*test*:*' TEST 1515 | # '*' DEFAULT) 1516 | # 1517 | # If your current Google application credentials is "service_account deathray-testing x@y.com", 1518 | # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. 1519 | # 1520 | # You can define different colors, icons and content expansions for different classes: 1521 | # 1522 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 1523 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1524 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' 1525 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1526 | # '*:*prod*:*' PROD # These values are examples that are unlikely 1527 | # '*:*test*:*' TEST # to match your needs. Customize them as needed. 1528 | '*' DEFAULT) 1529 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=7 1530 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_BACKGROUND=4 1531 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1532 | 1533 | # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by 1534 | # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: 1535 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1536 | # 1537 | # You can use the following parameters in the expansion. Each of them corresponds to one of the 1538 | # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. 1539 | # 1540 | # Parameter | JSON key file field 1541 | # ---------------------------------+--------------- 1542 | # P9K_GOOGLE_APP_CRED_TYPE | type 1543 | # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id 1544 | # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email 1545 | # 1546 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. 1547 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' 1548 | 1549 | ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]############### 1550 | # Toolbox color. 1551 | typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=0 1552 | typeset -g POWERLEVEL9K_TOOLBOX_BACKGROUND=3 1553 | # Don't display the name of the toolbox if it matches fedora-toolbox-*. 1554 | typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}' 1555 | # Custom icon. 1556 | # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐' 1557 | # Custom prefix. 1558 | # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='in ' 1559 | 1560 | ###############################[ public_ip: public IP address ]############################### 1561 | # Public IP color. 1562 | typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=7 1563 | typeset -g POWERLEVEL9K_PUBLIC_IP_BACKGROUND=0 1564 | # Custom icon. 1565 | # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1566 | 1567 | ########################[ vpn_ip: virtual private network indicator ]######################### 1568 | # VPN IP color. 1569 | typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0 1570 | typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6 1571 | # When on VPN, show just an icon without the IP address. 1572 | # Tip: To display the private IP address when on VPN, remove the next line. 1573 | typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= 1574 | # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN 1575 | # to see the name of the interface. 1576 | typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*' 1577 | # If set to true, show one segment per matching network interface. If set to false, show only 1578 | # one segment corresponding to the first matching network interface. 1579 | # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. 1580 | typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false 1581 | # Custom icon. 1582 | # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1583 | 1584 | ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### 1585 | # IP color. 1586 | typeset -g POWERLEVEL9K_IP_BACKGROUND=4 1587 | typeset -g POWERLEVEL9K_IP_FOREGROUND=0 1588 | # The following parameters are accessible within the expansion: 1589 | # 1590 | # Parameter | Meaning 1591 | # ----------------------+------------------------------------------- 1592 | # P9K_IP_IP | IP address 1593 | # P9K_IP_INTERFACE | network interface 1594 | # P9K_IP_RX_BYTES | total number of bytes received 1595 | # P9K_IP_TX_BYTES | total number of bytes sent 1596 | # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt 1597 | # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt 1598 | # P9K_IP_RX_RATE | receive rate (since last prompt) 1599 | # P9K_IP_TX_RATE | send rate (since last prompt) 1600 | typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP' 1601 | # Show information for the first network interface whose name matches this regular expression. 1602 | # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. 1603 | typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' 1604 | # Custom icon. 1605 | # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1606 | 1607 | #########################[ proxy: system-wide http/https/ftp proxy ]########################## 1608 | # Proxy color. 1609 | typeset -g POWERLEVEL9K_PROXY_FOREGROUND=4 1610 | typeset -g POWERLEVEL9K_PROXY_BACKGROUND=0 1611 | # Custom icon. 1612 | # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' 1613 | 1614 | ################################[ battery: internal battery ]################################# 1615 | # Show battery in red when it's below this level and not connected to power supply. 1616 | typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 1617 | typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1 1618 | # Show battery in green when it's charging or fully charged. 1619 | typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=2 1620 | # Show battery in yellow when it's discharging. 1621 | typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3 1622 | # Battery pictograms going from low to high level of charge. 1623 | typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' 1624 | # Don't show the remaining time to charge/discharge. 1625 | typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false 1626 | typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0 1627 | 1628 | #####################################[ wifi: wifi speed ]##################################### 1629 | # WiFi color. 1630 | typeset -g POWERLEVEL9K_WIFI_FOREGROUND=0 1631 | typeset -g POWERLEVEL9K_WIFI_BACKGROUND=4 1632 | # Custom icon. 1633 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' 1634 | 1635 | # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). 1636 | # 1637 | # # Wifi colors and icons for different signal strength levels (low to high). 1638 | # typeset -g my_wifi_fg=(0 0 0 0 0) # <-- change these values 1639 | # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values 1640 | # 1641 | # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' 1642 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' 1643 | # 1644 | # The following parameters are accessible within the expansions: 1645 | # 1646 | # Parameter | Meaning 1647 | # ----------------------+--------------- 1648 | # P9K_WIFI_SSID | service set identifier, a.k.a. network name 1649 | # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown 1650 | # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second 1651 | # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 1652 | # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 1653 | # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) 1654 | 1655 | ####################################[ time: current time ]#################################### 1656 | # Current time color. 1657 | typeset -g POWERLEVEL9K_TIME_FOREGROUND=0 1658 | typeset -g POWERLEVEL9K_TIME_BACKGROUND=7 1659 | # Format for the current time: 09:51:02. See `man 3 strftime`. 1660 | typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' 1661 | # If set to true, time will update when you hit enter. This way prompts for the past 1662 | # commands will contain the start times of their commands as opposed to the default 1663 | # behavior where they contain the end times of their preceding commands. 1664 | typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false 1665 | # Custom icon. 1666 | typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= 1667 | # Custom prefix. 1668 | # typeset -g POWERLEVEL9K_TIME_PREFIX='at ' 1669 | 1670 | # Example of a user-defined prompt segment. Function prompt_example will be called on every 1671 | # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or 1672 | # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and yellow text on red background 1673 | # greeting the user. 1674 | # 1675 | # Type `p10k help segment` for documentation and a more sophisticated example. 1676 | function prompt_example() { 1677 | p10k segment -b 1 -f 3 -i '⭐' -t 'hello, %n' 1678 | } 1679 | 1680 | # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job 1681 | # is to generate the prompt segment for display in instant prompt. See 1682 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1683 | # 1684 | # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function 1685 | # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k 1686 | # will replay these calls without actually calling instant_prompt_*. It is imperative that 1687 | # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this 1688 | # rule is not observed, the content of instant prompt will be incorrect. 1689 | # 1690 | # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If 1691 | # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. 1692 | function instant_prompt_example() { 1693 | # Since prompt_example always makes the same `p10k segment` calls, we can call it from 1694 | # instant_prompt_example. This will give us the same `example` prompt segment in the instant 1695 | # and regular prompts. 1696 | prompt_example 1697 | } 1698 | 1699 | # User-defined prompt segments can be customized the same way as built-in segments. 1700 | typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=3 1701 | typeset -g POWERLEVEL9K_EXAMPLE_BACKGROUND=1 1702 | # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1703 | 1704 | # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt 1705 | # when accepting a command line. Supported values: 1706 | # 1707 | # - off: Don't change prompt when accepting a command line. 1708 | # - always: Trim down prompt when accepting a command line. 1709 | # - same-dir: Trim down prompt when accepting a command line unless this is the first command 1710 | # typed after changing current working directory. 1711 | typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always 1712 | 1713 | # Instant prompt mode. 1714 | # 1715 | # - off: Disable instant prompt. Choose this if you've tried instant prompt and found 1716 | # it incompatible with your zsh configuration files. 1717 | # - quiet: Enable instant prompt and don't print warnings when detecting console output 1718 | # during zsh initialization. Choose this if you've read and understood 1719 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1720 | # - verbose: Enable instant prompt and print a warning when detecting console output during 1721 | # zsh initialization. Choose this if you've never tried instant prompt, haven't 1722 | # seen the warning, or if you are unsure what this all means. 1723 | typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose 1724 | 1725 | # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. 1726 | # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload 1727 | # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you 1728 | # really need it. 1729 | typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true 1730 | 1731 | # If p10k is already loaded, reload configuration. 1732 | # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. 1733 | (( ! $+functions[p10k] )) || p10k reload 1734 | } 1735 | 1736 | # Tell `p10k configure` which file it should overwrite. 1737 | typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} 1738 | 1739 | (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} 1740 | 'builtin' 'unset' 'p10k_config_opts' 1741 | -------------------------------------------------------------------------------- /oh-my-zsh/switch-p10k-clock.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | function usage() { 6 | cat <