├── .github └── workflows │ └── docker.yaml ├── .gitignore ├── README.md ├── build.sh ├── golang └── Dockerfile ├── java └── Dockerfile ├── mvn └── settings.xml ├── node └── Dockerfile ├── php ├── Dockerfile └── xdebug.ini ├── python └── Dockerfile ├── ruby └── Dockerfile ├── slim ├── golang1.6 │ └── Dockerfile ├── jdk11 │ └── Dockerfile ├── jdk8 │ └── Dockerfile ├── node10 │ └── Dockerfile ├── node12 │ └── Dockerfile ├── perl │ └── Dockerfile ├── python3.6 │ └── Dockerfile ├── ruby │ └── Dockerfile └── rust │ └── Dockerfile └── zsh ├── .p10k.zsh ├── .tmux.conf ├── LICENSE └── zsh-in-docker.sh /.github/workflows/docker.yaml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'main' 7 | pull_request: 8 | branches: 9 | - 'main' 10 | 11 | jobs: 12 | docker: 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | include: 17 | - name: golang 18 | dockerfile: ./golang/Dockerfile 19 | - name: node 20 | dockerfile: ./node/Dockerfile 21 | - name: php 22 | dockerfile: ./php/Dockerfile 23 | - name: python 24 | dockerfile: ./python/Dockerfile 25 | - name: ruby 26 | dockerfile: ./ruby/Dockerfile 27 | - name: java 28 | dockerfile: ./java/Dockerfile 29 | runs-on: ubuntu-latest 30 | steps: 31 | - name: Checkout 32 | uses: actions/checkout@v3 33 | 34 | - name: Set up QEMU 35 | uses: docker/setup-qemu-action@v2 36 | 37 | - name: Set up Docker Buildx 38 | uses: docker/setup-buildx-action@v2 39 | 40 | - name: Login to GitHub Container Registry 41 | if: github.event_name != 'pull_request' 42 | uses: docker/login-action@v2 43 | with: 44 | registry: ghcr.io 45 | username: ${{ github.actor }} 46 | password: ${{ secrets.GITHUB_TOKEN }} 47 | 48 | - name: Build and push to GitHub Container Registry 49 | uses: docker/build-push-action@v3 50 | with: 51 | context: . 52 | platforms: linux/amd64,linux/arm64 53 | file: ${{ matrix.dockerfile }} 54 | push: ${{ github.event_name != 'pull_request' }} 55 | tags: | 56 | ghcr.io/${{ github.repository }}/${{ matrix.name }}:latest 57 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nocalhost Dev Container 2 | 3 | List of dev containers: 4 | 5 | ``` 6 | nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:latest 7 | nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:14 8 | 9 | nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest 10 | nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:1.16 11 | 12 | nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:latest 13 | nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:3.9 14 | 15 | nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:latest 16 | nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:11 17 | 18 | nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:latest 19 | nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:3.0 20 | ``` 21 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | docker build -f ./golang/Dockerfile . -t golang --no-cache 5 | docker build -f ./java/Dockerfile . -t java --no-cache 6 | docker build -f ./node/Dockerfile . -t node --no-cache 7 | docker build -f ./python/Dockerfile . -t python --no-cache 8 | docker build -f ./ruby/Dockerfile . -t ruby --no-cache -------------------------------------------------------------------------------- /golang/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG GO_VERSION=1.16 2 | 3 | FROM golang:${GO_VERSION}-buster 4 | 5 | ARG ROOTHOME=/Users/root 6 | 7 | RUN mkdir -p $ROOTHOME 8 | ENV HOME=$ROOTHOME 9 | 10 | RUN apt-get update \ 11 | && apt install --force-yes -y ca-certificates curl \ 12 | build-essential gcc g++ \ 13 | tzdata zip unzip vim wget \ 14 | git openssh-client zsh bash net-tools tmux sudo wget \ 15 | # 16 | # Clean up 17 | && apt-get autoremove -y \ 18 | && apt-get clean -y \ 19 | && rm -rf /var/lib/apt/lists/* 20 | 21 | # Modify Timezone 22 | ENV TZ Asia/Shanghai 23 | RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 24 | 25 | # Mark zsh as default shell 26 | RUN chsh -s /usr/bin/zsh 27 | 28 | # RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.1/zsh-in-docker.sh)" -- \ 29 | COPY ./zsh/zsh-in-docker.sh /tmp 30 | RUN chmod +x /tmp/zsh-in-docker.sh && \ 31 | /tmp/zsh-in-docker.sh \ 32 | -a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \ 33 | -a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \ 34 | -p git \ 35 | -p https://github.com/zsh-users/zsh-autosuggestions \ 36 | -p https://github.com/zsh-users/zsh-completions \ 37 | -p https://github.com/zsh-users/zsh-history-substring-search \ 38 | -p https://github.com/zsh-users/zsh-syntax-highlighting \ 39 | -p 'history-substring-search' \ 40 | -a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \ 41 | -a 'bindkey "\$terminfo[kcud1]" history-substring-search-down' 42 | 43 | RUN go get github.com/go-delve/delve/cmd/dlv 44 | 45 | # Copy local config to p10k zsh 46 | COPY ./zsh/.p10k.zsh $ROOTHOME/ 47 | COPY ./zsh/.tmux.conf $ROOTHOME/ 48 | 49 | ENTRYPOINT [ "/bin/zsh" ] 50 | CMD ["-l"] 51 | -------------------------------------------------------------------------------- /java/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG JAVA_VERSION=11 2 | 3 | FROM openjdk:${JAVA_VERSION}-jdk-buster 4 | 5 | ARG ROOTHOME=/Users/root 6 | 7 | RUN mkdir -p $ROOTHOME 8 | ENV HOME=$ROOTHOME 9 | 10 | RUN apt-get update --allow-unauthenticated \ 11 | && apt install --allow-unauthenticated --force-yes -y ca-certificates curl \ 12 | build-essential gcc g++ \ 13 | tzdata zip unzip vim wget \ 14 | git openssh-client zsh bash net-tools tmux sudo wget \ 15 | # 16 | # Clean up 17 | && apt-get autoremove -y \ 18 | && apt-get clean -y \ 19 | && rm -rf /var/lib/apt/lists/* \ 20 | # install maven 21 | && curl -LO https://dlcdn.apache.org/maven/maven-3/3.8.5/binaries/apache-maven-3.8.5-bin.tar.gz \ 22 | && tar -zxvf apache-maven-3.8.5-bin.tar.gz -C /usr/local/lib/ \ 23 | && rm apache-maven-3.8.5-bin.tar.gz 24 | 25 | ENV PATH="/usr/local/lib/apache-maven-3.8.1/bin:${PATH}" 26 | 27 | # update timezone 28 | ENV TZ Asia/Shanghai 29 | RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 30 | 31 | # Mark zsh as default shell 32 | RUN chsh -s /usr/bin/zsh 33 | 34 | # RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.1/zsh-in-docker.sh)" -- \ 35 | COPY ./zsh/zsh-in-docker.sh /tmp 36 | RUN chmod +x /tmp/zsh-in-docker.sh && \ 37 | /tmp/zsh-in-docker.sh \ 38 | -a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \ 39 | -a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \ 40 | -p git \ 41 | -p https://github.com/zsh-users/zsh-autosuggestions \ 42 | -p https://github.com/zsh-users/zsh-completions \ 43 | -p https://github.com/zsh-users/zsh-history-substring-search \ 44 | -p https://github.com/zsh-users/zsh-syntax-highlighting \ 45 | -p 'history-substring-search' \ 46 | -a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \ 47 | -a 'bindkey "\$terminfo[kcud1]" history-substring-search-down' 48 | 49 | # Copy local config to p10k zsh 50 | COPY ./zsh/.p10k.zsh $ROOTHOME/ 51 | COPY ./zsh/.tmux.conf $ROOTHOME/ 52 | 53 | RUN mkdir $ROOTHOME/.m2 54 | COPY ./mvn/settings.xml $ROOTHOME/.m2/ 55 | 56 | ENTRYPOINT [ "/bin/zsh" ] 57 | CMD ["-l"] -------------------------------------------------------------------------------- /mvn/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 46 | 49 | 55 | 56 | 64 | 65 | 72 | 73 | 78 | 79 | 83 | org.jenkins-ci.tools 84 | 85 | 86 | 91 | 92 | 106 | 107 | 108 | 112 | 113 | 126 | 127 | 134 | 135 | 136 | 147 | 148 | 149 | 150 | mirrors.cloud.tencent.com 151 | * 152 | Tencent Cloud 153 | http://mirrors.cloud.tencent.com/nexus/repository/maven-public/ 154 | 155 | 156 | 157 | repo.jenkins-ci.org 158 | https://repo.jenkins-ci.org/public/ 159 | m.g.o-public 160 | 161 | 162 | 174 | 175 | 176 | 197 | 198 | 199 | jenkins 200 | 201 | true 202 | 203 | 204 | 205 | 206 | repo.jenkins-ci.org 207 | https://repo.jenkins-ci.org/public/ 208 | 209 | 210 | 211 | 212 | repo.jenkins-ci.org 213 | https://repo.jenkins-ci.org/public/ 214 | 215 | 216 | 217 | 218 | 247 | 248 | 282 | 283 | 284 | 292 | 293 | -------------------------------------------------------------------------------- /node/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=14 2 | 3 | FROM node:${NODE_VERSION}-buster 4 | 5 | ARG ROOTHOME=/Users/root 6 | 7 | RUN mkdir -p $ROOTHOME 8 | ENV HOME=$ROOTHOME 9 | 10 | RUN apt-get update \ 11 | && apt install --force-yes -y ca-certificates curl \ 12 | build-essential gcc g++ \ 13 | tzdata zip unzip vim wget \ 14 | git openssh-client zsh bash net-tools tmux sudo wget \ 15 | # 16 | # Clean up 17 | && apt-get autoremove -y \ 18 | && apt-get clean -y \ 19 | && rm -rf /var/lib/apt/lists/* 20 | 21 | # RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.1/zsh-in-docker.sh)" -- \ 22 | COPY ./zsh/zsh-in-docker.sh /tmp 23 | RUN chmod +x /tmp/zsh-in-docker.sh && \ 24 | /tmp/zsh-in-docker.sh \ 25 | -a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \ 26 | -a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \ 27 | -p git \ 28 | -p https://github.com/zsh-users/zsh-autosuggestions \ 29 | -p https://github.com/zsh-users/zsh-completions \ 30 | -p https://github.com/zsh-users/zsh-history-substring-search \ 31 | -p https://github.com/zsh-users/zsh-syntax-highlighting \ 32 | -p 'history-substring-search' \ 33 | -a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \ 34 | -a 'bindkey "\$terminfo[kcud1]" history-substring-search-down' 35 | 36 | # Modify Timezone 37 | ENV TZ Asia/Shanghai 38 | RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 39 | 40 | # Mark zsh as default shell 41 | RUN chsh -s /usr/bin/zsh 42 | 43 | # Copy local config to p10k zsh 44 | COPY ./zsh/.p10k.zsh $ROOTHOME/ 45 | COPY ./zsh/.tmux.conf $ROOTHOME/ 46 | 47 | ENTRYPOINT [ "/bin/zsh" ] 48 | CMD ["-l"] 49 | 50 | 51 | -------------------------------------------------------------------------------- /php/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG PHP_VERSION=7 2 | 3 | FROM php:${PHP_VERSION}-buster 4 | 5 | ARG ROOTHOME=/Users/root 6 | 7 | RUN mkdir -p $ROOTHOME 8 | ENV HOME=$ROOTHOME 9 | 10 | RUN apt-get update \ 11 | && apt install --force-yes -y ca-certificates curl \ 12 | build-essential gcc g++ \ 13 | tzdata zip unzip vim wget \ 14 | git openssh-client zsh bash net-tools tmux sudo wget \ 15 | # 16 | # Clean up 17 | && apt-get autoremove -y \ 18 | && apt-get clean -y \ 19 | && rm -rf /var/lib/apt/lists/* 20 | 21 | # RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.1/zsh-in-docker.sh)" -- \ 22 | COPY ./zsh/zsh-in-docker.sh /tmp 23 | RUN chmod +x /tmp/zsh-in-docker.sh && \ 24 | /tmp/zsh-in-docker.sh \ 25 | -a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \ 26 | -a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \ 27 | -p git \ 28 | -p https://github.com/zsh-users/zsh-autosuggestions \ 29 | -p https://github.com/zsh-users/zsh-completions \ 30 | -p https://github.com/zsh-users/zsh-history-substring-search \ 31 | -p https://github.com/zsh-users/zsh-syntax-highlighting \ 32 | -p 'history-substring-search' \ 33 | -a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \ 34 | -a 'bindkey "\$terminfo[kcud1]" history-substring-search-down' 35 | 36 | # Modify Timezone 37 | ENV TZ Asia/Shanghai 38 | RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 39 | 40 | # Mark zsh as default shell 41 | RUN chsh -s /usr/bin/zsh 42 | 43 | # Copy local config to p10k zsh 44 | COPY ./zsh/.p10k.zsh $ROOTHOME/ 45 | COPY ./zsh/.tmux.conf $ROOTHOME/ 46 | 47 | # Install xdebug 48 | RUN pecl install xdebug \ 49 | && docker-php-ext-enable xdebug 50 | 51 | COPY ./php/xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 52 | 53 | ENTRYPOINT [ "/bin/zsh" ] 54 | CMD ["-l"] -------------------------------------------------------------------------------- /php/xdebug.ini: -------------------------------------------------------------------------------- 1 | zend_extension=xdebug 2 | xdebug.mode=debug 3 | xdebug.log="/tmp/xdebug.log" 4 | xdebug.start_with_request=yes 5 | xdebug.discover_client_host=true -------------------------------------------------------------------------------- /python/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG PYTHON_VERSION=3.9 2 | 3 | FROM python:${PYTHON_VERSION}-buster 4 | 5 | 6 | ARG ROOTHOME=/Users/root 7 | 8 | RUN mkdir -p $ROOTHOME 9 | ENV HOME=$ROOTHOME 10 | 11 | RUN apt-get update \ 12 | && apt install --force-yes -y ca-certificates curl \ 13 | build-essential gcc g++ \ 14 | tzdata zip unzip vim wget \ 15 | git openssh-client zsh bash net-tools tmux sudo wget \ 16 | # 17 | # Clean up 18 | && apt-get autoremove -y \ 19 | && apt-get clean -y \ 20 | && rm -rf /var/lib/apt/lists/* 21 | 22 | # RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.1/zsh-in-docker.sh)" -- \ 23 | COPY ./zsh/zsh-in-docker.sh /tmp 24 | RUN chmod +x /tmp/zsh-in-docker.sh && \ 25 | /tmp/zsh-in-docker.sh \ 26 | -a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \ 27 | -a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \ 28 | -p git \ 29 | -p https://github.com/zsh-users/zsh-autosuggestions \ 30 | -p https://github.com/zsh-users/zsh-completions \ 31 | -p https://github.com/zsh-users/zsh-history-substring-search \ 32 | -p https://github.com/zsh-users/zsh-syntax-highlighting \ 33 | -p 'history-substring-search' \ 34 | -a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \ 35 | -a 'bindkey "\$terminfo[kcud1]" history-substring-search-down' 36 | 37 | # PyCharm Remote Debugging 38 | RUN pip install pydevd-pycharm~=212.4746.96 39 | 40 | # Modify Timezone 41 | ENV TZ Asia/Shanghai 42 | RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 43 | 44 | # Mark zsh as default shell 45 | RUN chsh -s /usr/bin/zsh 46 | 47 | # Copy local config to p10k zsh 48 | COPY ./zsh/.p10k.zsh $ROOTHOME/ 49 | COPY ./zsh/.tmux.conf $ROOTHOME/ 50 | 51 | ENTRYPOINT [ "/bin/zsh" ] 52 | CMD ["-l"] 53 | -------------------------------------------------------------------------------- /ruby/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG RUBY_VERSION=3.0 2 | 3 | FROM ruby:${RUBY_VERSION}-buster 4 | 5 | ARG ROOTHOME=/Users/root 6 | 7 | RUN mkdir -p $ROOTHOME 8 | ENV HOME=$ROOTHOME 9 | 10 | RUN apt-get update \ 11 | && apt install --force-yes -y ca-certificates curl \ 12 | build-essential gcc g++ \ 13 | tzdata zip unzip vim wget \ 14 | git openssh-client zsh bash net-tools tmux sudo wget \ 15 | # 16 | # Clean up 17 | && apt-get autoremove -y \ 18 | && apt-get clean -y \ 19 | && rm -rf /var/lib/apt/lists/* 20 | 21 | # RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.1/zsh-in-docker.sh)" -- \ 22 | COPY ./zsh/zsh-in-docker.sh /tmp 23 | RUN chmod +x /tmp/zsh-in-docker.sh && \ 24 | /tmp/zsh-in-docker.sh \ 25 | -a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \ 26 | -a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \ 27 | -p git \ 28 | -p https://github.com/zsh-users/zsh-autosuggestions \ 29 | -p https://github.com/zsh-users/zsh-completions \ 30 | -p https://github.com/zsh-users/zsh-history-substring-search \ 31 | -p https://github.com/zsh-users/zsh-syntax-highlighting \ 32 | -p 'history-substring-search' \ 33 | -a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \ 34 | -a 'bindkey "\$terminfo[kcud1]" history-substring-search-down' 35 | 36 | # Modify Timezone 37 | ENV TZ Asia/Shanghai 38 | RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 39 | 40 | # Mark zsh as default shell 41 | RUN chsh -s /usr/bin/zsh 42 | 43 | # Copy local config to p10k zsh 44 | COPY ./zsh/.p10k.zsh $ROOTHOME/ 45 | COPY ./zsh/.tmux.conf $ROOTHOME/ 46 | 47 | ENTRYPOINT [ "/bin/zsh" ] 48 | CMD ["-l"] 49 | -------------------------------------------------------------------------------- /slim/golang1.6/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" 3 | # 4 | # PLEASE DO NOT EDIT IT DIRECTLY. 5 | # 6 | 7 | FROM buildpack-deps:buster-scm 8 | 9 | # gcc for cgo 10 | RUN apt-get update && apt-get install -y --no-install-recommends \ 11 | g++ \ 12 | gcc \ 13 | libc6-dev \ 14 | make \ 15 | pkg-config \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | ENV PATH /usr/local/go/bin:$PATH 19 | 20 | ENV GOLANG_VERSION 1.16.3 21 | 22 | RUN set -eux; \ 23 | \ 24 | dpkgArch="$(dpkg --print-architecture)"; \ 25 | url=; \ 26 | case "${dpkgArch##*-}" in \ 27 | 'amd64') \ 28 | url='https://dl.google.com/go/go1.16.3.linux-amd64.tar.gz'; \ 29 | sha256='951a3c7c6ce4e56ad883f97d9db74d3d6d80d5fec77455c6ada6c1f7ac4776d2'; \ 30 | ;; \ 31 | 'armel') \ 32 | export GOARCH='arm' GOARM='5' GOOS='linux'; \ 33 | ;; \ 34 | 'armhf') \ 35 | url='https://dl.google.com/go/go1.16.3.linux-armv6l.tar.gz'; \ 36 | sha256='0dae30385e3564a557dac7f12a63eedc73543e6da0f6017990e214ce8cc8797c'; \ 37 | ;; \ 38 | 'arm64') \ 39 | url='https://dl.google.com/go/go1.16.3.linux-arm64.tar.gz'; \ 40 | sha256='566b1d6f17d2bc4ad5f81486f0df44f3088c3ed47a3bec4099d8ed9939e90d5d'; \ 41 | ;; \ 42 | 'i386') \ 43 | url='https://dl.google.com/go/go1.16.3.linux-386.tar.gz'; \ 44 | sha256='48b2d1481db756c88c18b1f064dbfc3e265ce4a775a23177ca17e25d13a24c5d'; \ 45 | ;; \ 46 | 'mips64el') \ 47 | export GOARCH='mips64le' GOOS='linux'; \ 48 | ;; \ 49 | 'ppc64el') \ 50 | url='https://dl.google.com/go/go1.16.3.linux-ppc64le.tar.gz'; \ 51 | sha256='5eb046bbbbc7fe2591846a4303884cb5a01abb903e3e61e33459affe7874e811'; \ 52 | ;; \ 53 | 's390x') \ 54 | url='https://dl.google.com/go/go1.16.3.linux-s390x.tar.gz'; \ 55 | sha256='3e8bd7bde533a73fd6fa75b5288678ef397e76c198cfb26b8ae086035383b1cf'; \ 56 | ;; \ 57 | *) echo >&2 "error: unsupported architecture '$dpkgArch' (likely packaging update needed)"; exit 1 ;; \ 58 | esac; \ 59 | build=; \ 60 | if [ -z "$url" ]; then \ 61 | # https://github.com/golang/go/issues/38536#issuecomment-616897960 62 | build=1; \ 63 | url='https://dl.google.com/go/go1.16.3.src.tar.gz'; \ 64 | sha256='b298d29de9236ca47a023e382313bcc2d2eed31dfa706b60a04103ce83a71a25'; \ 65 | echo >&2; \ 66 | echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; \ 67 | echo >&2; \ 68 | fi; \ 69 | \ 70 | wget -O go.tgz.asc "$url.asc" --progress=dot:giga; \ 71 | wget -O go.tgz "$url" --progress=dot:giga; \ 72 | echo "$sha256 *go.tgz" | sha256sum --strict --check -; \ 73 | \ 74 | # https://github.com/golang/go/issues/14739#issuecomment-324767697 75 | export GNUPGHOME="$(mktemp -d)"; \ 76 | # https://www.google.com/linuxrepositories/ 77 | gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \ 78 | gpg --batch --verify go.tgz.asc go.tgz; \ 79 | gpgconf --kill all; \ 80 | rm -rf "$GNUPGHOME" go.tgz.asc; \ 81 | \ 82 | tar -C /usr/local -xzf go.tgz; \ 83 | rm go.tgz; \ 84 | \ 85 | if [ -n "$build" ]; then \ 86 | savedAptMark="$(apt-mark showmanual)"; \ 87 | apt-get update; \ 88 | apt-get install -y --no-install-recommends golang-go; \ 89 | \ 90 | ( \ 91 | cd /usr/local/go/src; \ 92 | # set GOROOT_BOOTSTRAP + GOHOST* such that we can build Go successfully 93 | export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOHOSTOS="$GOOS" GOHOSTARCH="$GOARCH"; \ 94 | ./make.bash; \ 95 | ); \ 96 | \ 97 | apt-mark auto '.*' > /dev/null; \ 98 | apt-mark manual $savedAptMark > /dev/null; \ 99 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 100 | rm -rf /var/lib/apt/lists/*; \ 101 | \ 102 | # pre-compile the standard library, just like the official binary release tarballs do 103 | go install std; \ 104 | # go install: -race is only supported on linux/amd64, linux/ppc64le, linux/arm64, freebsd/amd64, netbsd/amd64, darwin/amd64 and windows/amd64 105 | # go install -race std; \ 106 | \ 107 | # remove a few intermediate / bootstrapping files the official binary release tarballs do not contain 108 | rm -rf \ 109 | /usr/local/go/pkg/*/cmd \ 110 | /usr/local/go/pkg/bootstrap \ 111 | /usr/local/go/pkg/obj \ 112 | /usr/local/go/pkg/tool/*/api \ 113 | /usr/local/go/pkg/tool/*/go_bootstrap \ 114 | /usr/local/go/src/cmd/dist/dist \ 115 | ; \ 116 | fi; \ 117 | \ 118 | go version 119 | 120 | ENV GOPATH /go 121 | ENV PATH $GOPATH/bin:$PATH 122 | RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" 123 | WORKDIR $GOPATH -------------------------------------------------------------------------------- /slim/jdk11/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.12 2 | 3 | ENV LANG=en_US.UTF-8 \ 4 | LANGUAGE=en_US:en \ 5 | LC_ALL=en_US.UTF-8 \ 6 | JAVA_VERSION=11 \ 7 | JAVA_DETAIL_VERSION=11.0.7 \ 8 | JAVA_UPDATE_SMALL_VERSION=10 \ 9 | JAVA_BASE_URL=https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download \ 10 | GCC_LIBS_VERSION=10.1.0-2 \ 11 | ZLIB_VERSION=1.2.11-3 \ 12 | ARCHLINUX_BASE_URL=https://archive.archlinux.org/packages \ 13 | GLIBC_BASE_URL=https://github.com/sgerrand/alpine-pkg-glibc/releases/download \ 14 | GLIBC_PACKAGE_VERSION=2.30-r0 \ 15 | JAVA_HOME=/opt/java \ 16 | PATH=$PATH:${JAVA_HOME}/bin \ 17 | JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle" \ 18 | USER_HOME_DIR="/root" 19 | 20 | RUN apk update \ 21 | && apk add --no-cache ca-certificates bash git openssh openssl zip subversion sshpass curl 22 | 23 | #==================== 24 | # Install GNU Libc 25 | #==================== 26 | 27 | RUN apk add --no-cache --virtual=build-dependencies wget \ 28 | && ALPINE_GLIBC_BASE_URL="${GLIBC_BASE_URL}/${GLIBC_PACKAGE_VERSION}" \ 29 | && ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-${GLIBC_PACKAGE_VERSION}.apk" \ 30 | && ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-${GLIBC_PACKAGE_VERSION}.apk" \ 31 | && ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-${GLIBC_PACKAGE_VERSION}.apk" \ 32 | && cd /tmp \ 33 | && wget -q -O "/etc/apk/keys/sgerrand.rsa.pub" "https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub" \ 34 | && wget "${ALPINE_GLIBC_BASE_URL}/${ALPINE_GLIBC_BASE_PACKAGE_FILENAME}" \ 35 | "${ALPINE_GLIBC_BASE_URL}/${ALPINE_GLIBC_BIN_PACKAGE_FILENAME}" \ 36 | "${ALPINE_GLIBC_BASE_URL}/${ALPINE_GLIBC_I18N_PACKAGE_FILENAME}" \ 37 | && apk add --no-cache \ 38 | "${ALPINE_GLIBC_BASE_PACKAGE_FILENAME}" \ 39 | "${ALPINE_GLIBC_BIN_PACKAGE_FILENAME}" \ 40 | "${ALPINE_GLIBC_I18N_PACKAGE_FILENAME}" \ 41 | && /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 \ 42 | && apk del build-dependencies \ 43 | && rm -rf /etc/apk/keys/sgerrand.rsa.pub \ 44 | && rm -rf /tmp/* 45 | 46 | #============== 47 | # Install gcc-libs & zlib 48 | # refer https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/11/jdk/alpine/Dockerfile.openj9.releases.full 49 | #============== 50 | 51 | RUN apk add --no-cache --virtual=build-dependencies binutils xz zstd \ 52 | && cd /tmp \ 53 | && mkdir /tmp/gcc \ 54 | && wget "${ARCHLINUX_BASE_URL}/g/gcc-libs/gcc-libs-${GCC_LIBS_VERSION}-x86_64.pkg.tar.zst" -O gcc-libs.tar.zst \ 55 | && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ 56 | && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ 57 | && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ 58 | && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ 59 | && mkdir /tmp/zlib \ 60 | && wget "${ARCHLINUX_BASE_URL}/z/zlib/zlib-1%3A${ZLIB_VERSION}-x86_64.pkg.tar.xz" -O zlib.pkg.tar.xz\ 61 | && tar xvJf zlib.pkg.tar.xz -C /tmp/zlib \ 62 | && mv /tmp/zlib/usr/lib/libz.so* /usr/glibc-compat/lib \ 63 | && apk del build-dependencies \ 64 | && rm -rf /tmp/* 65 | 66 | #============== 67 | # Install AdoptOpenJDK 68 | #============== 69 | RUN apk add --no-cache --virtual=build-dependencies wget unzip \ 70 | && mkdir -p ${JAVA_HOME} \ 71 | && cd /tmp \ 72 | && wget --no-check-certificate "${JAVA_BASE_URL}/jdk-${JAVA_DETAIL_VERSION}%2B${JAVA_UPDATE_SMALL_VERSION}/OpenJDK${JAVA_VERSION}U-jdk_x64_linux_hotspot_${JAVA_DETAIL_VERSION}_${JAVA_UPDATE_SMALL_VERSION}.tar.gz" \ 73 | && tar -xzf "OpenJDK${JAVA_VERSION}U-jdk_x64_linux_hotspot_${JAVA_DETAIL_VERSION}_${JAVA_UPDATE_SMALL_VERSION}.tar.gz" -C "${JAVA_HOME}" --strip-components=1 \ 74 | && ln -s ${JAVA_HOME}/bin/* /usr/bin/ \ 75 | && apk del build-dependencies \ 76 | && rm -rf /tmp/* 77 | 78 | #============== 79 | # Show version 80 | #============== 81 | RUN java -version \ 82 | && javac -version -------------------------------------------------------------------------------- /slim/jdk8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.12 2 | 3 | ENV LANG=en_US.UTF-8 \ 4 | LANGUAGE=en_US:en \ 5 | LC_ALL=en_US.UTF-8 \ 6 | JAVA_VERSION=8 \ 7 | JAVA_UPDATE=202 \ 8 | JAVA_UPDATE_SMALL_VERSION=08 \ 9 | JAVA_BASE_URL=https://download.oracle.com/otn-pub/java \ 10 | JAVA_BASE_MIRRORS_URL=https://repo.huaweicloud.com/java \ 11 | GLIBC_BASE_URL=https://github.com/sgerrand/alpine-pkg-glibc/releases/download \ 12 | GLIBC_PACKAGE_VERSION=2.31-r0 \ 13 | JAVA_HOME=/opt/java \ 14 | PATH=$PATH:${JAVA_HOME}/bin \ 15 | USER_HOME_DIR="/root" 16 | 17 | #======================== 18 | # Replace repositories to China Mirror 19 | # https://mirrors.ustc.edu.cn/help/alpine.html 20 | #======================== 21 | #RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories 22 | 23 | RUN apk update \ 24 | && apk add --no-cache ca-certificates bash git openssh zip subversion sshpass curl 25 | 26 | #==================== 27 | # Install GNU Libc 28 | #==================== 29 | 30 | RUN apk add --no-cache --virtual=build-dependencies wget \ 31 | && ALPINE_GLIBC_BASE_URL="${GLIBC_BASE_URL}/${GLIBC_PACKAGE_VERSION}" \ 32 | && ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-${GLIBC_PACKAGE_VERSION}.apk" \ 33 | && ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-${GLIBC_PACKAGE_VERSION}.apk" \ 34 | && ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-${GLIBC_PACKAGE_VERSION}.apk" \ 35 | && cd /tmp \ 36 | && wget -q -O "/etc/apk/keys/sgerrand.rsa.pub" "https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub" \ 37 | && wget "${ALPINE_GLIBC_BASE_URL}/${ALPINE_GLIBC_BASE_PACKAGE_FILENAME}" \ 38 | "${ALPINE_GLIBC_BASE_URL}/${ALPINE_GLIBC_BIN_PACKAGE_FILENAME}" \ 39 | "${ALPINE_GLIBC_BASE_URL}/${ALPINE_GLIBC_I18N_PACKAGE_FILENAME}" \ 40 | && apk add --no-cache \ 41 | "${ALPINE_GLIBC_BASE_PACKAGE_FILENAME}" \ 42 | "${ALPINE_GLIBC_BIN_PACKAGE_FILENAME}" \ 43 | "${ALPINE_GLIBC_I18N_PACKAGE_FILENAME}" \ 44 | && /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 \ 45 | && apk del build-dependencies \ 46 | && rm -rf /etc/apk/keys/sgerrand.rsa.pub \ 47 | && rm -rf /tmp/* 48 | 49 | #============== 50 | # Install Oracle JDK 51 | #============== 52 | RUN apk add --no-cache --virtual=build-dependencies wget unzip \ 53 | && mkdir -p /opt/java \ 54 | && cd /tmp \ 55 | && wget --no-check-certificate "${JAVA_BASE_MIRRORS_URL}/jdk/${JAVA_VERSION}u${JAVA_UPDATE}-b${JAVA_UPDATE_SMALL_VERSION}/jdk-${JAVA_VERSION}u${JAVA_UPDATE}-linux-x64.tar.gz" \ 56 | && tar -xzf "jdk-${JAVA_VERSION}u${JAVA_UPDATE}-linux-x64.tar.gz" -C "${JAVA_HOME}" --strip-components=1 \ 57 | && ln -s ${JAVA_HOME}/bin/* /usr/bin/ \ 58 | && rm -rf "${JAVA_HOME}/"*src.zip \ 59 | && wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" "${JAVA_BASE_URL}/jce/${JAVA_VERSION}/jce_policy-${JAVA_VERSION}.zip" \ 60 | && unzip -jo -d "${JAVA_HOME}/jre/lib/security" "jce_policy-${JAVA_VERSION}.zip" \ 61 | && rm "${JAVA_HOME}/jre/lib/security/README.txt" \ 62 | && apk del build-dependencies \ 63 | && rm -rf /tmp/* 64 | 65 | #============== 66 | # Show version 67 | #============== 68 | RUN java -version \ 69 | && javac -version -------------------------------------------------------------------------------- /slim/node10/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster-slim 2 | 3 | RUN groupadd --gid 1000 node \ 4 | && useradd --uid 1000 --gid node --shell /bin/bash --create-home node 5 | 6 | ENV NODE_VERSION 10.24.1 7 | 8 | RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ 9 | && case "${dpkgArch##*-}" in \ 10 | amd64) ARCH='x64';; \ 11 | ppc64el) ARCH='ppc64le';; \ 12 | s390x) ARCH='s390x';; \ 13 | arm64) ARCH='arm64';; \ 14 | armhf) ARCH='armv7l';; \ 15 | i386) ARCH='x86';; \ 16 | *) echo "unsupported architecture"; exit 1 ;; \ 17 | esac \ 18 | && set -ex \ 19 | # libatomic1 for arm 20 | && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \ 21 | && rm -rf /var/lib/apt/lists/* \ 22 | && for key in \ 23 | 4ED778F539E3634C779C87C6D7062848A1AB005C \ 24 | 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ 25 | 74F12602B6F1C4E913FAA37AD3A89613643B6201 \ 26 | 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ 27 | 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ 28 | C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ 29 | C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \ 30 | DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ 31 | A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ 32 | 108F52B48DB57BB0CC439B2997B01419BD92F80A \ 33 | B9E2F5981AA6E0CD28160D9FF13993A75599653C \ 34 | ; do \ 35 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ 36 | gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ 37 | gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ 38 | done \ 39 | && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ 40 | && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ 41 | && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ 42 | && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ 43 | && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ 44 | && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ 45 | && apt-mark auto '.*' > /dev/null \ 46 | && find /usr/local -type f -executable -exec ldd '{}' ';' \ 47 | | awk '/=>/ { print $(NF-1) }' \ 48 | | sort -u \ 49 | | xargs -r dpkg-query --search \ 50 | | cut -d: -f1 \ 51 | | sort -u \ 52 | | xargs -r apt-mark manual \ 53 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 54 | && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ 55 | # smoke tests 56 | && node --version \ 57 | && npm --version 58 | 59 | ENV YARN_VERSION 1.22.5 60 | 61 | RUN set -ex \ 62 | && savedAptMark="$(apt-mark showmanual)" \ 63 | && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \ 64 | && rm -rf /var/lib/apt/lists/* \ 65 | && for key in \ 66 | 6A010C5166006599AA17F08146C2130DFD2497F5 \ 67 | ; do \ 68 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ 69 | gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ 70 | gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ 71 | done \ 72 | && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ 73 | && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ 74 | && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ 75 | && mkdir -p /opt \ 76 | && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \ 77 | && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \ 78 | && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ 79 | && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ 80 | && apt-mark auto '.*' > /dev/null \ 81 | && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \ 82 | && find /usr/local -type f -executable -exec ldd '{}' ';' \ 83 | | awk '/=>/ { print $(NF-1) }' \ 84 | | sort -u \ 85 | | xargs -r dpkg-query --search \ 86 | | cut -d: -f1 \ 87 | | sort -u \ 88 | | xargs -r apt-mark manual \ 89 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 90 | # smoke test 91 | && yarn --version 92 | 93 | CMD [ "node" ] -------------------------------------------------------------------------------- /slim/node12/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster-slim 2 | 3 | RUN groupadd --gid 1000 node \ 4 | && useradd --uid 1000 --gid node --shell /bin/bash --create-home node 5 | 6 | ENV NODE_VERSION 12.22.1 7 | 8 | RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ 9 | && case "${dpkgArch##*-}" in \ 10 | amd64) ARCH='x64';; \ 11 | ppc64el) ARCH='ppc64le';; \ 12 | s390x) ARCH='s390x';; \ 13 | arm64) ARCH='arm64';; \ 14 | armhf) ARCH='armv7l';; \ 15 | i386) ARCH='x86';; \ 16 | *) echo "unsupported architecture"; exit 1 ;; \ 17 | esac \ 18 | && set -ex \ 19 | # libatomic1 for arm 20 | && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \ 21 | && rm -rf /var/lib/apt/lists/* \ 22 | && for key in \ 23 | 4ED778F539E3634C779C87C6D7062848A1AB005C \ 24 | 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ 25 | 74F12602B6F1C4E913FAA37AD3A89613643B6201 \ 26 | 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ 27 | 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ 28 | C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ 29 | C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \ 30 | DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ 31 | A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ 32 | 108F52B48DB57BB0CC439B2997B01419BD92F80A \ 33 | B9E2F5981AA6E0CD28160D9FF13993A75599653C \ 34 | ; do \ 35 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ 36 | gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ 37 | gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ 38 | done \ 39 | && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ 40 | && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ 41 | && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ 42 | && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ 43 | && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ 44 | && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ 45 | && apt-mark auto '.*' > /dev/null \ 46 | && find /usr/local -type f -executable -exec ldd '{}' ';' \ 47 | | awk '/=>/ { print $(NF-1) }' \ 48 | | sort -u \ 49 | | xargs -r dpkg-query --search \ 50 | | cut -d: -f1 \ 51 | | sort -u \ 52 | | xargs -r apt-mark manual \ 53 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 54 | && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ 55 | # smoke tests 56 | && node --version \ 57 | && npm --version 58 | 59 | ENV YARN_VERSION 1.22.5 60 | 61 | RUN set -ex \ 62 | && savedAptMark="$(apt-mark showmanual)" \ 63 | && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \ 64 | && rm -rf /var/lib/apt/lists/* \ 65 | && for key in \ 66 | 6A010C5166006599AA17F08146C2130DFD2497F5 \ 67 | ; do \ 68 | gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ 69 | gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ 70 | gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ 71 | done \ 72 | && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ 73 | && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ 74 | && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ 75 | && mkdir -p /opt \ 76 | && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \ 77 | && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \ 78 | && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ 79 | && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ 80 | && apt-mark auto '.*' > /dev/null \ 81 | && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \ 82 | && find /usr/local -type f -executable -exec ldd '{}' ';' \ 83 | | awk '/=>/ { print $(NF-1) }' \ 84 | | sort -u \ 85 | | xargs -r dpkg-query --search \ 86 | | cut -d: -f1 \ 87 | | sort -u \ 88 | | xargs -r apt-mark manual \ 89 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 90 | # smoke test 91 | && yarn --version 92 | 93 | CMD [ "node" ] -------------------------------------------------------------------------------- /slim/perl/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster-slim 2 | LABEL maintainer="Peter Martini , Zak B. Elep " 3 | 4 | COPY *.patch /usr/src/perl/ 5 | WORKDIR /usr/src/perl 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y --no-install-recommends \ 9 | bzip2 \ 10 | ca-certificates \ 11 | # cpio \ 12 | curl \ 13 | dpkg-dev \ 14 | # file \ 15 | gcc \ 16 | # g++ \ 17 | # libbz2-dev \ 18 | # libdb-dev \ 19 | libc6-dev \ 20 | # libgdbm-dev \ 21 | # liblzma-dev \ 22 | make \ 23 | netbase \ 24 | patch \ 25 | # procps \ 26 | # zlib1g-dev \ 27 | xz-utils \ 28 | && curl -SL https://www.cpan.org/src/5.0/perl-5.32.1.tar.xz -o perl-5.32.1.tar.xz \ 29 | && echo '57cc47c735c8300a8ce2fa0643507b44c4ae59012bfdad0121313db639e02309 *perl-5.32.1.tar.xz' | sha256sum -c - \ 30 | && tar --strip-components=1 -xaf perl-5.32.1.tar.xz -C /usr/src/perl \ 31 | && rm perl-5.32.1.tar.xz \ 32 | && cat *.patch | patch -p1 \ 33 | && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ 34 | && archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \ 35 | && archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \ 36 | && ./Configure -Darchname="$gnuArch" "$archFlag" -Duseshrplib -Dvendorprefix=/usr/local -des \ 37 | && make -j$(nproc) \ 38 | && TEST_JOBS=$(nproc) make test_harness \ 39 | && make install \ 40 | && cd /usr/src \ 41 | && curl -LO https://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz \ 42 | && echo '9b60767fe40752ef7a9d3f13f19060a63389a5c23acc3e9827e19b75500f81f3 *App-cpanminus-1.7044.tar.gz' | sha256sum -c - \ 43 | && tar -xzf App-cpanminus-1.7044.tar.gz && cd App-cpanminus-1.7044 && perl bin/cpanm . && cd /root \ 44 | && savedPackages="make netbase" \ 45 | && apt-mark auto '.*' > /dev/null \ 46 | && apt-mark manual $savedPackages \ 47 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 48 | && rm -fr /var/cache/apt/* /var/lib/apt/lists/* \ 49 | && rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/* 50 | 51 | WORKDIR / 52 | 53 | CMD ["perl5.32.1","-de0"] -------------------------------------------------------------------------------- /slim/python3.6/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" 3 | # 4 | # PLEASE DO NOT EDIT IT DIRECTLY. 5 | # 6 | 7 | FROM debian:buster-slim 8 | 9 | # ensure local python is preferred over distribution python 10 | ENV PATH /usr/local/bin:$PATH 11 | 12 | # http://bugs.python.org/issue19846 13 | # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. 14 | ENV LANG C.UTF-8 15 | 16 | # runtime dependencies 17 | RUN set -eux; \ 18 | apt-get update; \ 19 | apt-get install -y --no-install-recommends \ 20 | ca-certificates \ 21 | netbase \ 22 | ; \ 23 | rm -rf /var/lib/apt/lists/* 24 | 25 | ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D 26 | ENV PYTHON_VERSION 3.6.13 27 | 28 | RUN set -ex \ 29 | \ 30 | && savedAptMark="$(apt-mark showmanual)" \ 31 | && apt-get update && apt-get install -y --no-install-recommends \ 32 | dpkg-dev \ 33 | gcc \ 34 | libbluetooth-dev \ 35 | libbz2-dev \ 36 | libc6-dev \ 37 | libexpat1-dev \ 38 | libffi-dev \ 39 | libgdbm-dev \ 40 | liblzma-dev \ 41 | libncursesw5-dev \ 42 | libreadline-dev \ 43 | libsqlite3-dev \ 44 | libssl-dev \ 45 | make \ 46 | tk-dev \ 47 | wget \ 48 | xz-utils \ 49 | zlib1g-dev \ 50 | # as of Stretch, "gpg" is no longer included by default 51 | $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ 52 | \ 53 | && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ 54 | && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ 55 | && export GNUPGHOME="$(mktemp -d)" \ 56 | && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ 57 | && gpg --batch --verify python.tar.xz.asc python.tar.xz \ 58 | && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ 59 | && rm -rf "$GNUPGHOME" python.tar.xz.asc \ 60 | && mkdir -p /usr/src/python \ 61 | && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ 62 | && rm python.tar.xz \ 63 | \ 64 | && cd /usr/src/python \ 65 | && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ 66 | && ./configure \ 67 | --build="$gnuArch" \ 68 | --enable-loadable-sqlite-extensions \ 69 | --enable-optimizations \ 70 | --enable-option-checking=fatal \ 71 | --enable-shared \ 72 | --with-system-expat \ 73 | --with-system-ffi \ 74 | --without-ensurepip \ 75 | && make -j "$(nproc)" \ 76 | LDFLAGS="-Wl,--strip-all" \ 77 | # setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 78 | PROFILE_TASK='-m test.regrtest --pgo \ 79 | test_array \ 80 | test_base64 \ 81 | test_binascii \ 82 | test_binhex \ 83 | test_binop \ 84 | test_bytes \ 85 | test_c_locale_coercion \ 86 | test_class \ 87 | test_cmath \ 88 | test_codecs \ 89 | test_compile \ 90 | test_complex \ 91 | test_csv \ 92 | test_decimal \ 93 | test_dict \ 94 | test_float \ 95 | test_fstring \ 96 | test_hashlib \ 97 | test_io \ 98 | test_iter \ 99 | test_json \ 100 | test_long \ 101 | test_math \ 102 | test_memoryview \ 103 | test_pickle \ 104 | test_re \ 105 | test_set \ 106 | test_slice \ 107 | test_struct \ 108 | test_threading \ 109 | test_time \ 110 | test_traceback \ 111 | test_unicode \ 112 | ' \ 113 | && make install \ 114 | && rm -rf /usr/src/python \ 115 | \ 116 | && find /usr/local -depth \ 117 | \( \ 118 | \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ 119 | -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) \) \ 120 | -o \( -type f -a -name 'wininst-*.exe' \) \ 121 | \) -exec rm -rf '{}' + \ 122 | \ 123 | && ldconfig \ 124 | \ 125 | && apt-mark auto '.*' > /dev/null \ 126 | && apt-mark manual $savedAptMark \ 127 | && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ 128 | | awk '/=>/ { print $(NF-1) }' \ 129 | | sort -u \ 130 | | xargs -r dpkg-query --search \ 131 | | cut -d: -f1 \ 132 | | sort -u \ 133 | | xargs -r apt-mark manual \ 134 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 135 | && rm -rf /var/lib/apt/lists/* \ 136 | \ 137 | && python3 --version 138 | 139 | # make some useful symlinks that are expected to exist 140 | RUN cd /usr/local/bin \ 141 | && ln -s idle3 idle \ 142 | && ln -s pydoc3 pydoc \ 143 | && ln -s python3 python \ 144 | && ln -s python3-config python-config 145 | 146 | # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" 147 | ENV PYTHON_PIP_VERSION 21.0.1 148 | # https://github.com/pypa/get-pip 149 | ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/29f37dbe6b3842ccd52d61816a3044173962ebeb/public/get-pip.py 150 | ENV PYTHON_GET_PIP_SHA256 e03eb8a33d3b441ff484c56a436ff10680479d4bd14e59268e67977ed40904de 151 | 152 | RUN set -ex; \ 153 | \ 154 | savedAptMark="$(apt-mark showmanual)"; \ 155 | apt-get update; \ 156 | apt-get install -y --no-install-recommends wget; \ 157 | \ 158 | wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ 159 | echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \ 160 | \ 161 | apt-mark auto '.*' > /dev/null; \ 162 | [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ 163 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 164 | rm -rf /var/lib/apt/lists/*; \ 165 | \ 166 | python get-pip.py \ 167 | --disable-pip-version-check \ 168 | --no-cache-dir \ 169 | "pip==$PYTHON_PIP_VERSION" \ 170 | ; \ 171 | pip --version; \ 172 | \ 173 | find /usr/local -depth \ 174 | \( \ 175 | \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ 176 | -o \ 177 | \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ 178 | \) -exec rm -rf '{}' +; \ 179 | rm -f get-pip.py 180 | 181 | CMD ["python3"] -------------------------------------------------------------------------------- /slim/ruby/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster-slim 2 | 3 | RUN set -eux; \ 4 | apt-get update; \ 5 | apt-get install -y --no-install-recommends \ 6 | bzip2 \ 7 | ca-certificates \ 8 | libffi-dev \ 9 | libgmp-dev \ 10 | libssl-dev \ 11 | libyaml-dev \ 12 | procps \ 13 | zlib1g-dev \ 14 | ; \ 15 | rm -rf /var/lib/apt/lists/* 16 | 17 | # skip installing gem documentation 18 | RUN set -eux; \ 19 | mkdir -p /usr/local/etc; \ 20 | { \ 21 | echo 'install: --no-document'; \ 22 | echo 'update: --no-document'; \ 23 | } >> /usr/local/etc/gemrc 24 | 25 | ENV LANG C.UTF-8 26 | ENV RUBY_MAJOR 3.0 27 | ENV RUBY_VERSION 3.0.1 28 | ENV RUBY_DOWNLOAD_SHA256 d06bccd382d03724b69f674bc46cd6957ba08ed07522694ce44b9e8ffc9c48e2 29 | 30 | # some of ruby's build scripts are written in ruby 31 | # we purge system ruby later to make sure our final image uses what we just built 32 | RUN set -eux; \ 33 | \ 34 | savedAptMark="$(apt-mark showmanual)"; \ 35 | apt-get update; \ 36 | apt-get install -y --no-install-recommends \ 37 | autoconf \ 38 | bison \ 39 | dpkg-dev \ 40 | gcc \ 41 | libbz2-dev \ 42 | libgdbm-compat-dev \ 43 | libgdbm-dev \ 44 | libglib2.0-dev \ 45 | libncurses-dev \ 46 | libreadline-dev \ 47 | libxml2-dev \ 48 | libxslt-dev \ 49 | make \ 50 | ruby \ 51 | wget \ 52 | xz-utils \ 53 | ; \ 54 | rm -rf /var/lib/apt/lists/*; \ 55 | \ 56 | wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \ 57 | echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ 58 | \ 59 | mkdir -p /usr/src/ruby; \ 60 | tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ 61 | rm ruby.tar.xz; \ 62 | \ 63 | cd /usr/src/ruby; \ 64 | \ 65 | # hack in "ENABLE_PATH_CHECK" disabling to suppress: 66 | # warning: Insecure world writable dir 67 | { \ 68 | echo '#define ENABLE_PATH_CHECK 0'; \ 69 | echo; \ 70 | cat file.c; \ 71 | } > file.c.new; \ 72 | mv file.c.new file.c; \ 73 | \ 74 | autoconf; \ 75 | gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ 76 | ./configure \ 77 | --build="$gnuArch" \ 78 | --disable-install-doc \ 79 | --enable-shared \ 80 | ; \ 81 | make -j "$(nproc)"; \ 82 | make install; \ 83 | \ 84 | apt-mark auto '.*' > /dev/null; \ 85 | apt-mark manual $savedAptMark > /dev/null; \ 86 | find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ 87 | | awk '/=>/ { print $(NF-1) }' \ 88 | | sort -u \ 89 | | xargs -r dpkg-query --search \ 90 | | cut -d: -f1 \ 91 | | sort -u \ 92 | | xargs -r apt-mark manual \ 93 | ; \ 94 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ 95 | \ 96 | cd /; \ 97 | rm -r /usr/src/ruby; \ 98 | # verify we have no "ruby" packages installed 99 | ! dpkg -l | grep -i ruby; \ 100 | [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ 101 | # rough smoke test 102 | ruby --version; \ 103 | gem --version; \ 104 | bundle --version 105 | 106 | # don't create ".bundle" in all our apps 107 | ENV GEM_HOME /usr/local/bundle 108 | ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ 109 | BUNDLE_APP_CONFIG="$GEM_HOME" 110 | ENV PATH $GEM_HOME/bin:$PATH 111 | # adjust permissions of a few directories for running "gem install" as an arbitrary user 112 | RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME" 113 | 114 | CMD [ "irb" ] -------------------------------------------------------------------------------- /slim/rust/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster-slim 2 | 3 | ENV RUSTUP_HOME=/usr/local/rustup \ 4 | CARGO_HOME=/usr/local/cargo \ 5 | PATH=/usr/local/cargo/bin:$PATH \ 6 | RUST_VERSION=1.51.0 7 | 8 | RUN set -eux; \ 9 | apt-get update; \ 10 | apt-get install -y --no-install-recommends \ 11 | ca-certificates \ 12 | gcc \ 13 | libc6-dev \ 14 | wget \ 15 | ; \ 16 | dpkgArch="$(dpkg --print-architecture)"; \ 17 | case "${dpkgArch##*-}" in \ 18 | amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='ed7773edaf1d289656bdec2aacad12413b38ad0193fff54b2231f5140a4b07c5' ;; \ 19 | armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='7a7b9d246ad63358705d8d4a7d5c2ef1adfec24525d1d5c44a7739e1b867e84d' ;; \ 20 | arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='f80a0a792b3ab905ab4919474daf4d3f60e574fc6987e69bfba2fd877241a8de' ;; \ 21 | i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='4473c18286aa1831683a772706d9a5c98b87a61cc014d38063e00a63a480afef' ;; \ 22 | *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ 23 | esac; \ 24 | url="https://static.rust-lang.org/rustup/archive/1.23.1/${rustArch}/rustup-init"; \ 25 | wget "$url"; \ 26 | echo "${rustupSha256} *rustup-init" | sha256sum -c -; \ 27 | chmod +x rustup-init; \ 28 | ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}; \ 29 | rm rustup-init; \ 30 | chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \ 31 | rustup --version; \ 32 | cargo --version; \ 33 | rustc --version; \ 34 | apt-get remove -y --auto-remove \ 35 | wget \ 36 | ; \ 37 | rm -rf /var/lib/apt/lists/*; -------------------------------------------------------------------------------- /zsh/.p10k.zsh: -------------------------------------------------------------------------------- 1 | # Generated by Powerlevel10k configuration wizard on 2021-07-01 at 16:40 CST. 2 | # Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 43791. 3 | # Wizard options: ascii, lean, 12h time, 1 line, sparse, fluent, transient_prompt, 4 | # instant_prompt=verbose. 5 | # Type `p10k configure` to generate another config. 6 | # 7 | # Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate 8 | # your own config based on it. 9 | # 10 | # Tip: Looking for a nice color? Here's a one-liner to print colormap. 11 | # 12 | # for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done 13 | 14 | # Temporarily change options. 15 | 'builtin' 'local' '-a' 'p10k_config_opts' 16 | [[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') 17 | [[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') 18 | [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') 19 | 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' 20 | 21 | () { 22 | emulate -L zsh -o extended_glob 23 | 24 | # Unset all configuration options. This allows you to apply configuration changes without 25 | # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. 26 | unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' 27 | 28 | # Zsh >= 5.1 is required. 29 | autoload -Uz is-at-least && is-at-least 5.1 || return 30 | 31 | # The list of segments shown on the left. Fill it with the most important segments. 32 | typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( 33 | # os_icon # os identifier 34 | dir # current directory 35 | vcs # git status 36 | prompt_char # prompt symbol 37 | ) 38 | 39 | # The list of segments shown on the right. Fill it with less important segments. 40 | # Right prompt on the last prompt line (where you are typing your commands) gets 41 | # automatically hidden when the input line reaches it. Right prompt above the 42 | # last prompt line gets hidden if it would overlap with left prompt. 43 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( 44 | status # exit code of the last command 45 | command_execution_time # duration of the last command 46 | background_jobs # presence of background jobs 47 | direnv # direnv status (https://direnv.net/) 48 | asdf # asdf version manager (https://github.com/asdf-vm/asdf) 49 | virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) 50 | anaconda # conda environment (https://conda.io/) 51 | pyenv # python environment (https://github.com/pyenv/pyenv) 52 | goenv # go environment (https://github.com/syndbg/goenv) 53 | nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) 54 | nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) 55 | nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) 56 | # node_version # node.js version 57 | # go_version # go version (https://golang.org) 58 | # rust_version # rustc version (https://www.rust-lang.org) 59 | # dotnet_version # .NET version (https://dotnet.microsoft.com) 60 | # php_version # php version (https://www.php.net/) 61 | # laravel_version # laravel php framework version (https://laravel.com/) 62 | # java_version # java version (https://www.java.com/) 63 | # package # name@version from package.json (https://docs.npmjs.com/files/package.json) 64 | rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) 65 | rvm # ruby version from rvm (https://rvm.io) 66 | fvm # flutter version management (https://github.com/leoafarias/fvm) 67 | luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) 68 | jenv # java version from jenv (https://github.com/jenv/jenv) 69 | plenv # perl version from plenv (https://github.com/tokuhirom/plenv) 70 | phpenv # php version from phpenv (https://github.com/phpenv/phpenv) 71 | scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) 72 | haskell_stack # haskell version from stack (https://haskellstack.org/) 73 | kubecontext # current kubernetes context (https://kubernetes.io/) 74 | terraform # terraform workspace (https://www.terraform.io) 75 | aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) 76 | aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) 77 | azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) 78 | gcloud # google cloud cli account and project (https://cloud.google.com/) 79 | google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) 80 | context # user@hostname 81 | nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) 82 | ranger # ranger shell (https://github.com/ranger/ranger) 83 | nnn # nnn shell (https://github.com/jarun/nnn) 84 | vim_shell # vim shell indicator (:sh) 85 | midnight_commander # midnight commander shell (https://midnight-commander.org/) 86 | nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) 87 | # vpn_ip # virtual private network indicator 88 | # load # CPU load 89 | # disk_usage # disk usage 90 | # ram # free RAM 91 | # swap # used swap 92 | todo # todo items (https://github.com/todotxt/todo.txt-cli) 93 | timewarrior # timewarrior tracking status (https://timewarrior.net/) 94 | taskwarrior # taskwarrior task count (https://taskwarrior.org/) 95 | time # current time 96 | # ip # ip address and bandwidth usage for a specified network interface 97 | # public_ip # public IP address 98 | # proxy # system-wide http/https/ftp proxy 99 | # battery # internal battery 100 | # wifi # wifi speed 101 | # example # example user-defined segment (see prompt_example function below) 102 | ) 103 | 104 | # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. 105 | typeset -g POWERLEVEL9K_MODE=ascii 106 | # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid 107 | # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. 108 | typeset -g POWERLEVEL9K_ICON_PADDING=none 109 | 110 | # Basic style options that define the overall look of your prompt. You probably don't want to 111 | # change them. 112 | typeset -g POWERLEVEL9K_BACKGROUND= # transparent background 113 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace 114 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space 115 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol 116 | 117 | # When set to true, icons appear before content on both sides of the prompt. When set 118 | # to false, icons go after content. If empty or not set, icons go before content in the left 119 | # prompt and after content in the right prompt. 120 | # 121 | # You can also override it for a specific segment: 122 | # 123 | # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false 124 | # 125 | # Or for a specific segment in specific state: 126 | # 127 | # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false 128 | typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true 129 | 130 | # Add an empty line before each prompt. 131 | typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true 132 | 133 | # Connect left prompt lines with these symbols. 134 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= 135 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= 136 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= 137 | # Connect right prompt lines with these symbols. 138 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= 139 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= 140 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= 141 | 142 | # The left end of left prompt. 143 | typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= 144 | # The right end of right prompt. 145 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= 146 | 147 | # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll 148 | # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and 149 | # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below. 150 | typeset -g POWERLEVEL9K_SHOW_RULER=false 151 | typeset -g POWERLEVEL9K_RULER_CHAR='-' # reasonable alternative: '·' 152 | typeset -g POWERLEVEL9K_RULER_FOREGROUND=242 153 | 154 | # Filler between left and right prompt on the first prompt line. You can set it to '·' or '-' 155 | # to make it easier to see the alignment between left and right prompt and to separate prompt 156 | # from command output. It serves the same purpose as ruler (see above) without increasing 157 | # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false 158 | # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact 159 | # prompt. 160 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' 161 | if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then 162 | # The color of the filler. 163 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 164 | # Add a space between the end of left prompt and the filler. 165 | typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' ' 166 | # Add a space between the filler and the start of right prompt. 167 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' 168 | # Start filler from the edge of the screen if there are no left segments on the first line. 169 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' 170 | # End filler on the edge of the screen if there are no right segments on the first line. 171 | typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' 172 | fi 173 | 174 | #################################[ os_icon: os identifier ]################################## 175 | # OS identifier color. 176 | typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= 177 | # Custom icon. 178 | # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' 179 | 180 | ################################[ prompt_char: prompt symbol ]################################ 181 | # Green prompt symbol if the last command succeeded. 182 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 183 | # Red prompt symbol if the last command failed. 184 | typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 185 | # Default prompt symbol. 186 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='>' 187 | # Prompt symbol in command vi mode. 188 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='<' 189 | # Prompt symbol in visual vi mode. 190 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' 191 | # Prompt symbol in overwrite vi mode. 192 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='^' 193 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true 194 | # No line terminator if prompt_char is the last segment. 195 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' 196 | # No line introducer if prompt_char is the first segment. 197 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= 198 | 199 | ##################################[ dir: current directory ]################################## 200 | # Default current directory color. 201 | typeset -g POWERLEVEL9K_DIR_FOREGROUND=31 202 | # If directory is too long, shorten some of its segments to the shortest possible unique 203 | # prefix. The shortened directory can be tab-completed to the original. 204 | typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique 205 | # Replace removed segment suffixes with this symbol. 206 | typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= 207 | # Color of the shortened directory segments. 208 | typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 209 | # Color of the anchor directory segments. Anchor segments are never shortened. The first 210 | # segment is always an anchor. 211 | typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 212 | # Display anchor directory segments in bold. 213 | typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true 214 | # Don't shorten directories that contain any of these files. They are anchors. 215 | local anchor_files=( 216 | .bzr 217 | .citc 218 | .git 219 | .hg 220 | .node-version 221 | .python-version 222 | .go-version 223 | .ruby-version 224 | .lua-version 225 | .java-version 226 | .perl-version 227 | .php-version 228 | .tool-version 229 | .shorten_folder_marker 230 | .svn 231 | .terraform 232 | CVS 233 | Cargo.toml 234 | composer.json 235 | go.mod 236 | package.json 237 | stack.yaml 238 | ) 239 | typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" 240 | # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains 241 | # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is 242 | # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) 243 | # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers 244 | # and other directories don't. 245 | # 246 | # Optionally, "first" and "last" can be followed by ":" where is an integer. 247 | # This moves the truncation point to the right (positive offset) or to the left (negative offset) 248 | # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" 249 | # respectively. 250 | typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false 251 | # Don't shorten this many last directory segments. They are anchors. 252 | typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 253 | # Shorten directory if it's longer than this even if there is space for it. The value can 254 | # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, 255 | # directory will be shortened only when prompt doesn't fit or when other parameters demand it 256 | # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). 257 | # If set to `0`, directory will always be shortened to its minimum length. 258 | typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 259 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this 260 | # many columns for typing commands. 261 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 262 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least 263 | # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. 264 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 265 | # If set to true, embed a hyperlink into the directory. Useful for quickly 266 | # opening a directory in the file manager simply by clicking the link. 267 | # Can also be handy when the directory is shortened, as it allows you to see 268 | # the full directory that was used in previous commands. 269 | typeset -g POWERLEVEL9K_DIR_HYPERLINK=false 270 | 271 | # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON 272 | # and POWERLEVEL9K_DIR_CLASSES below. 273 | typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 274 | 275 | # The default icon shown next to non-writable and non-existent directories when 276 | # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. 277 | # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' 278 | 279 | # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different 280 | # directories. It must be an array with 3 * N elements. Each triplet consists of: 281 | # 282 | # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with 283 | # extended_glob option enabled. 284 | # 2. Directory class for the purpose of styling. 285 | # 3. An empty string. 286 | # 287 | # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. 288 | # 289 | # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories 290 | # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. 291 | # 292 | # For example, given these settings: 293 | # 294 | # typeset -g POWERLEVEL9K_DIR_CLASSES=( 295 | # '~/work(|/*)' WORK '' 296 | # '~(|/*)' HOME '' 297 | # '*' DEFAULT '') 298 | # 299 | # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one 300 | # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or 301 | # WORK_NON_EXISTENT. 302 | # 303 | # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an 304 | # option to define custom colors and icons for different directory classes. 305 | # 306 | # # Styling for WORK. 307 | # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' 308 | # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 309 | # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 310 | # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 311 | # 312 | # # Styling for WORK_NOT_WRITABLE. 313 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 314 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31 315 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 316 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 317 | # 318 | # # Styling for WORK_NON_EXISTENT. 319 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' 320 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31 321 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103 322 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39 323 | # 324 | # If a styling parameter isn't explicitly defined for some class, it falls back to the classless 325 | # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls 326 | # back to POWERLEVEL9K_DIR_FOREGROUND. 327 | # 328 | typeset -g POWERLEVEL9K_DIR_CLASSES=() 329 | 330 | # Custom prefix. 331 | # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin ' 332 | 333 | #####################################[ vcs: git status ]###################################### 334 | # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon. 335 | typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= 336 | 337 | # Untracked files icon. It's really a question mark, your font isn't broken. 338 | # Change the value of this parameter to show a different icon. 339 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' 340 | 341 | # Formatter for Git status. 342 | # 343 | # Example output: master <42>42 *42 merge ~42 +42 !42 ?42. 344 | # 345 | # You can edit the function to customize how Git status looks. 346 | # 347 | # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: 348 | # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. 349 | function my_git_formatter() { 350 | emulate -L zsh 351 | 352 | if [[ -n $P9K_CONTENT ]]; then 353 | # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from 354 | # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. 355 | typeset -g my_git_format=$P9K_CONTENT 356 | return 357 | fi 358 | 359 | if (( $1 )); then 360 | # Styling for up-to-date Git status. 361 | local meta='%f' # default foreground 362 | local clean='%76F' # green foreground 363 | local modified='%178F' # yellow foreground 364 | local untracked='%39F' # blue foreground 365 | local conflicted='%196F' # red foreground 366 | else 367 | # Styling for incomplete and stale Git status. 368 | local meta='%244F' # grey foreground 369 | local clean='%244F' # grey foreground 370 | local modified='%244F' # grey foreground 371 | local untracked='%244F' # grey foreground 372 | local conflicted='%244F' # grey foreground 373 | fi 374 | 375 | local res 376 | 377 | if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then 378 | local branch=${(V)VCS_STATUS_LOCAL_BRANCH} 379 | # If local branch name is at most 32 characters long, show it in full. 380 | # Otherwise show the first 12 .. the last 12. 381 | # Tip: To always show local branch name in full without truncation, delete the next line. 382 | (( $#branch > 32 )) && branch[13,-13]=".." # <-- this line 383 | res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" 384 | fi 385 | 386 | if [[ -n $VCS_STATUS_TAG 387 | # Show tag only if not on a branch. 388 | # Tip: To always show tag, delete the next line. 389 | && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line 390 | ]]; then 391 | local tag=${(V)VCS_STATUS_TAG} 392 | # If tag name is at most 32 characters long, show it in full. 393 | # Otherwise show the first 12 .. the last 12. 394 | # Tip: To always show tag name in full without truncation, delete the next line. 395 | (( $#tag > 32 )) && tag[13,-13]=".." # <-- this line 396 | res+="${meta}#${clean}${tag//\%/%%}" 397 | fi 398 | 399 | # Display the current Git commit if there is no branch and no tag. 400 | # Tip: To always display the current Git commit, delete the next line. 401 | [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line 402 | res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" 403 | 404 | # Show tracking branch name if it differs from local branch. 405 | if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then 406 | res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" 407 | fi 408 | 409 | # <42 if behind the remote. 410 | (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}<${VCS_STATUS_COMMITS_BEHIND}" 411 | # >42 if ahead of the remote; no leading space if also behind the remote: <42>42. 412 | (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " 413 | (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}>${VCS_STATUS_COMMITS_AHEAD}" 414 | # <-42 if behind the push remote. 415 | (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}<-${VCS_STATUS_PUSH_COMMITS_BEHIND}" 416 | (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " 417 | # ->42 if ahead of the push remote; no leading space if also behind: <-42->42. 418 | (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}->${VCS_STATUS_PUSH_COMMITS_AHEAD}" 419 | # *42 if have stashes. 420 | (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" 421 | # 'merge' if the repo is in an unusual state. 422 | [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" 423 | # ~42 if have merge conflicts. 424 | (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" 425 | # +42 if have staged changes. 426 | (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" 427 | # !42 if have unstaged changes. 428 | (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" 429 | # ?42 if have untracked files. It's really a question mark, your font isn't broken. 430 | # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. 431 | # Remove the next line if you don't want to see untracked files at all. 432 | (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" 433 | # "-" if the number of unstaged files is unknown. This can happen due to 434 | # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower 435 | # than the number of files in the Git index, or due to bash.showDirtyState being set to false 436 | # in the repository config. The number of staged and untracked files may also be unknown 437 | # in this case. 438 | (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}-" 439 | 440 | typeset -g my_git_format=$res 441 | } 442 | functions -M my_git_formatter 2>/dev/null 443 | 444 | # Don't count the number of unstaged, untracked and conflicted files in Git repositories with 445 | # more than this many files in the index. Negative value means infinity. 446 | # 447 | # If you are working in Git repositories with tens of millions of files and seeing performance 448 | # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output 449 | # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's 450 | # config: `git config bash.showDirtyState false`. 451 | typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 452 | 453 | # Don't show Git status in prompt for repositories whose workdir matches this pattern. 454 | # For example, if set to '~', the Git repository at $HOME/.git will be ignored. 455 | # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. 456 | typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' 457 | 458 | # Disable the default Git status formatting. 459 | typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true 460 | # Install our own Git status formatter. 461 | typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' 462 | typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' 463 | # Enable counters for staged, unstaged, etc. 464 | typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 465 | 466 | # Icon color. 467 | typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 468 | typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 469 | # Custom icon. 470 | typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= 471 | # Custom prefix. 472 | typeset -g POWERLEVEL9K_VCS_PREFIX='%fon ' 473 | 474 | # Show status of repositories of these types. You can add svn and/or hg if you are 475 | # using them. If you do, your prompt may become slow even when your current directory 476 | # isn't in an svn or hg reposotiry. 477 | typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) 478 | 479 | # These settings are used for repositories other than Git or when gitstatusd fails and 480 | # Powerlevel10k has to fall back to using vcs_info. 481 | typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 482 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 483 | typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 484 | 485 | ##########################[ status: exit code of the last command ]########################### 486 | # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and 487 | # style them independently from the regular OK and ERROR state. 488 | typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true 489 | 490 | # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as 491 | # it will signify success by turning green. 492 | typeset -g POWERLEVEL9K_STATUS_OK=false 493 | typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 494 | typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='ok' 495 | 496 | # Status when some part of a pipe command fails but the overall exit status is zero. It may look 497 | # like this: 1|0. 498 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true 499 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 500 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='ok' 501 | 502 | # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as 503 | # it will signify error by turning red. 504 | typeset -g POWERLEVEL9K_STATUS_ERROR=false 505 | typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 506 | typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='err' 507 | 508 | # Status when the last command was terminated by a signal. 509 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true 510 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 511 | # Use terse signal names: "INT" instead of "SIGINT(2)". 512 | typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false 513 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION= 514 | 515 | # Status when some part of a pipe command fails and the overall exit status is also non-zero. 516 | # It may look like this: 1|0. 517 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true 518 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 519 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='err' 520 | 521 | ###################[ command_execution_time: duration of the last command ]################### 522 | # Show duration of the last command if takes at least this many seconds. 523 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 524 | # Show this many fractional digits. Zero means round to seconds. 525 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 526 | # Execution time color. 527 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101 528 | # Duration format: 1d 2h 3m 4s. 529 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' 530 | # Custom icon. 531 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= 532 | # Custom prefix. 533 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook ' 534 | 535 | #######################[ background_jobs: presence of background jobs ]####################### 536 | # Don't show the number of background jobs. 537 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false 538 | # Background jobs color. 539 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70 540 | # Custom icon. 541 | # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' 542 | 543 | #######################[ direnv: direnv status (https://direnv.net/) ]######################## 544 | # Direnv color. 545 | typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 546 | # Custom icon. 547 | # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 548 | 549 | ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### 550 | # Default asdf color. Only used to display tools for which there is no color override (see below). 551 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND. 552 | typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66 553 | 554 | # There are four parameters that can be used to hide asdf tools. Each parameter describes 555 | # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at 556 | # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to 557 | # hide a tool, it gets shown. 558 | # 559 | # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and 560 | # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: 561 | # 562 | # asdf local python 3.8.1 563 | # asdf global python 3.8.1 564 | # 565 | # After running both commands the current python version is 3.8.1 and its source is "local" as 566 | # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, 567 | # it'll hide python version in this case because 3.8.1 is the same as the global version. 568 | # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't 569 | # contain "local". 570 | 571 | # Hide tool versions that don't come from one of these sources. 572 | # 573 | # Available sources: 574 | # 575 | # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" 576 | # - local `asdf current` says "set by /some/not/home/directory/file" 577 | # - global `asdf current` says "set by /home/username/file" 578 | # 579 | # Note: If this parameter is set to (shell local global), it won't hide tools. 580 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. 581 | typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) 582 | 583 | # If set to false, hide tool versions that are the same as global. 584 | # 585 | # Note: The name of this parameter doesn't reflect its meaning at all. 586 | # Note: If this parameter is set to true, it won't hide tools. 587 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. 588 | typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false 589 | 590 | # If set to false, hide tool versions that are equal to "system". 591 | # 592 | # Note: If this parameter is set to true, it won't hide tools. 593 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. 594 | typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true 595 | 596 | # If set to non-empty value, hide tools unless there is a file matching the specified file pattern 597 | # in the current directory, or its parent directory, or its grandparent directory, and so on. 598 | # 599 | # Note: If this parameter is set to empty value, it won't hide tools. 600 | # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. 601 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. 602 | # 603 | # Example: Hide nodejs version when there is no package.json and no *.js files in the current 604 | # directory, in `..`, in `../..` and so on. 605 | # 606 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' 607 | typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= 608 | 609 | # Ruby version from asdf. 610 | typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168 611 | # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' 612 | # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' 613 | 614 | # Python version from asdf. 615 | typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37 616 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' 617 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' 618 | 619 | # Go version from asdf. 620 | typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37 621 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 622 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 623 | 624 | # Node.js version from asdf. 625 | typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70 626 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' 627 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' 628 | 629 | # Rust version from asdf. 630 | typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37 631 | # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' 632 | # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' 633 | 634 | # .NET Core version from asdf. 635 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 636 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' 637 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar' 638 | 639 | # Flutter version from asdf. 640 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 641 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' 642 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' 643 | 644 | # Lua version from asdf. 645 | typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32 646 | # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' 647 | # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' 648 | 649 | # Java version from asdf. 650 | typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32 651 | # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' 652 | # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' 653 | 654 | # Perl version from asdf. 655 | typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67 656 | # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' 657 | # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' 658 | 659 | # Erlang version from asdf. 660 | typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125 661 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 662 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 663 | 664 | # Elixir version from asdf. 665 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129 666 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' 667 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' 668 | 669 | # Postgres version from asdf. 670 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31 671 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' 672 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' 673 | 674 | # PHP version from asdf. 675 | typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99 676 | # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' 677 | # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' 678 | 679 | # Haskell version from asdf. 680 | typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172 681 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 682 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' 683 | 684 | # Julia version from asdf. 685 | typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70 686 | # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' 687 | # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' 688 | 689 | ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### 690 | # NordVPN connection indicator color. 691 | typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 692 | # Hide NordVPN connection indicator when not connected. 693 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= 694 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= 695 | # Custom icon. 696 | # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' 697 | 698 | #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## 699 | # Ranger shell color. 700 | typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 701 | # Custom icon. 702 | # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' 703 | 704 | ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### 705 | # Nnn shell color. 706 | typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 707 | # Custom icon. 708 | # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' 709 | 710 | ###########################[ vim_shell: vim shell indicator (:sh) ]########################### 711 | # Vim shell indicator color. 712 | typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 713 | # Custom icon. 714 | # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 715 | 716 | ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### 717 | # Midnight Commander shell color. 718 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 719 | # Custom icon. 720 | # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' 721 | 722 | #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## 723 | # Nix shell color. 724 | typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 725 | 726 | # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. 727 | # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= 728 | 729 | # Custom icon. 730 | # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 731 | 732 | ##################################[ disk_usage: disk usage ]################################## 733 | # Colors for different levels of disk usage. 734 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 735 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220 736 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160 737 | # Thresholds for different levels of disk usage (percentage points). 738 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 739 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 740 | # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. 741 | typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false 742 | # Custom icon. 743 | # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 744 | 745 | ######################################[ ram: free RAM ]####################################### 746 | # RAM color. 747 | typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 748 | # Custom icon. 749 | # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' 750 | 751 | #####################################[ swap: used swap ]###################################### 752 | # Swap color. 753 | typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96 754 | # Custom icon. 755 | # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' 756 | 757 | ######################################[ load: CPU load ]###################################### 758 | # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. 759 | typeset -g POWERLEVEL9K_LOAD_WHICH=5 760 | # Load color when load is under 50%. 761 | typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 762 | # Load color when load is between 50% and 70%. 763 | typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 764 | # Load color when load is over 70%. 765 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 766 | # Custom icon. 767 | # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' 768 | 769 | ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ 770 | # Todo color. 771 | typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 772 | # Hide todo when the total number of tasks is zero. 773 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true 774 | # Hide todo when the number of tasks after filtering is zero. 775 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false 776 | 777 | # Todo format. The following parameters are available within the expansion. 778 | # 779 | # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. 780 | # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. 781 | # 782 | # These variables correspond to the last line of the output of `todo.sh -p ls`: 783 | # 784 | # TODO: 24 of 42 tasks shown 785 | # 786 | # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. 787 | # 788 | # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' 789 | 790 | # Custom icon. 791 | # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' 792 | 793 | ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ 794 | # Timewarrior color. 795 | typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110 796 | # If the tracked task is longer than 24 characters, truncate and append "..". 797 | # Tip: To always display tasks without truncation, delete the following parameter. 798 | # Tip: To hide task names and display just the icon when time tracking is enabled, set the 799 | # value of the following parameter to "". 800 | typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+..}' 801 | 802 | # Custom icon. 803 | # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 804 | 805 | ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## 806 | # Taskwarrior color. 807 | typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74 808 | 809 | # Taskwarrior segment format. The following parameters are available within the expansion. 810 | # 811 | # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. 812 | # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. 813 | # 814 | # Zero values are represented as empty parameters. 815 | # 816 | # The default format: 817 | # 818 | # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' 819 | # 820 | # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' 821 | 822 | # Custom icon. 823 | # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 824 | 825 | ##################################[ context: user@hostname ]################################## 826 | # Context color when running with privileges. 827 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 828 | # Context color in SSH without privileges. 829 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 830 | # Default context color (no privileges, no SSH). 831 | typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 832 | 833 | # Context format when running with privileges: bold user@hostname. 834 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' 835 | # Context format when in SSH without privileges: user@hostname. 836 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' 837 | # Default context format (no privileges, no SSH): user@hostname. 838 | typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' 839 | 840 | # Don't show context unless running with privileges or in SSH. 841 | # Tip: Remove the next line to always show context. 842 | typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= 843 | 844 | # Custom icon. 845 | # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' 846 | # Custom prefix. 847 | typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith ' 848 | 849 | ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### 850 | # Python virtual environment color. 851 | typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 852 | # Don't show Python version next to the virtual environment name. 853 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false 854 | # If set to "false", won't show virtualenv if pyenv is already shown. 855 | # If set to "if-different", won't show virtualenv if it's the same as pyenv. 856 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false 857 | # Separate environment name from Python version only with a space. 858 | typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= 859 | # Custom icon. 860 | # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 861 | 862 | #####################[ anaconda: conda environment (https://conda.io/) ]###################### 863 | # Anaconda environment color. 864 | typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 865 | 866 | # Anaconda segment format. The following parameters are available within the expansion. 867 | # 868 | # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. 869 | # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. 870 | # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). 871 | # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). 872 | # 873 | # CONDA_PROMPT_MODIFIER can be configured with the following command: 874 | # 875 | # conda config --set env_prompt '({default_env}) ' 876 | # 877 | # The last argument is a Python format string that can use the following variables: 878 | # 879 | # - prefix The same as CONDA_PREFIX. 880 | # - default_env The same as CONDA_DEFAULT_ENV. 881 | # - name The last segment of CONDA_PREFIX. 882 | # - stacked_env Comma-separated list of names in the environment stack. The first element is 883 | # always the same as default_env. 884 | # 885 | # Note: '({default_env}) ' is the default value of env_prompt. 886 | # 887 | # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER 888 | # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former 889 | # is empty. 890 | typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' 891 | 892 | # Custom icon. 893 | # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' 894 | 895 | ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ 896 | # Pyenv color. 897 | typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 898 | # Hide python version if it doesn't come from one of these sources. 899 | typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) 900 | # If set to false, hide python version if it's the same as global: 901 | # $(pyenv version-name) == $(pyenv global). 902 | typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false 903 | # If set to false, hide python version if it's equal to "system". 904 | typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true 905 | 906 | # Pyenv segment format. The following parameters are available within the expansion. 907 | # 908 | # - P9K_CONTENT Current pyenv environment (pyenv version-name). 909 | # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). 910 | # 911 | # The default format has the following logic: 912 | # 913 | # 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not 914 | # empty and unequal to $P9K_CONTENT. 915 | # 2. Otherwise display just "$P9K_CONTENT". 916 | typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}' 917 | 918 | # Custom icon. 919 | # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 920 | 921 | ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ 922 | # Goenv color. 923 | typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 924 | # Hide go version if it doesn't come from one of these sources. 925 | typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) 926 | # If set to false, hide go version if it's the same as global: 927 | # $(goenv version-name) == $(goenv global). 928 | typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false 929 | # If set to false, hide go version if it's equal to "system". 930 | typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true 931 | # Custom icon. 932 | # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 933 | 934 | ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## 935 | # Nodenv color. 936 | typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 937 | # Hide node version if it doesn't come from one of these sources. 938 | typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) 939 | # If set to false, hide node version if it's the same as global: 940 | # $(nodenv version-name) == $(nodenv global). 941 | typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false 942 | # If set to false, hide node version if it's equal to "system". 943 | typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true 944 | # Custom icon. 945 | # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 946 | 947 | ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### 948 | # Nvm color. 949 | typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 950 | # Custom icon. 951 | # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 952 | 953 | ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ 954 | # Nodeenv color. 955 | typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 956 | # Don't show Node version next to the environment name. 957 | typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false 958 | # Separate environment name from Node version only with a space. 959 | typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= 960 | # Custom icon. 961 | # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 962 | 963 | ##############################[ node_version: node.js version ]############################### 964 | # Node version color. 965 | typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 966 | # Show node version only when in a directory tree containing package.json. 967 | typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true 968 | # Custom icon. 969 | # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 970 | 971 | #######################[ go_version: go version (https://golang.org) ]######################## 972 | # Go version color. 973 | typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 974 | # Show go version only when in a go project subdirectory. 975 | typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true 976 | # Custom icon. 977 | # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 978 | 979 | #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## 980 | # Rust version color. 981 | typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 982 | # Show rust version only when in a rust project subdirectory. 983 | typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true 984 | # Custom icon. 985 | # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 986 | 987 | ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ 988 | # .NET version color. 989 | typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 990 | # Show .NET version only when in a .NET project subdirectory. 991 | typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true 992 | # Custom icon. 993 | # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 994 | 995 | #####################[ php_version: php version (https://www.php.net/) ]###################### 996 | # PHP version color. 997 | typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99 998 | # Show PHP version only when in a PHP project subdirectory. 999 | typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true 1000 | # Custom icon. 1001 | # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1002 | 1003 | ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### 1004 | # Laravel version color. 1005 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161 1006 | # Custom icon. 1007 | # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1008 | 1009 | ####################[ java_version: java version (https://www.java.com/) ]#################### 1010 | # Java version color. 1011 | typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32 1012 | # Show java version only when in a java project subdirectory. 1013 | typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true 1014 | # Show brief version. 1015 | typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false 1016 | # Custom icon. 1017 | # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1018 | 1019 | ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### 1020 | # Package color. 1021 | typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117 1022 | # Package format. The following parameters are available within the expansion. 1023 | # 1024 | # - P9K_PACKAGE_NAME The value of `name` field in package.json. 1025 | # - P9K_PACKAGE_VERSION The value of `version` field in package.json. 1026 | # 1027 | # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' 1028 | # Custom icon. 1029 | # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1030 | 1031 | #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## 1032 | # Rbenv color. 1033 | typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 1034 | # Hide ruby version if it doesn't come from one of these sources. 1035 | typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) 1036 | # If set to false, hide ruby version if it's the same as global: 1037 | # $(rbenv version-name) == $(rbenv global). 1038 | typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false 1039 | # If set to false, hide ruby version if it's equal to "system". 1040 | typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true 1041 | # Custom icon. 1042 | # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1043 | 1044 | #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## 1045 | # Rvm color. 1046 | typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 1047 | # Don't show @gemset at the end. 1048 | typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false 1049 | # Don't show ruby- at the front. 1050 | typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false 1051 | # Custom icon. 1052 | # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1053 | 1054 | ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ 1055 | # Fvm color. 1056 | typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 1057 | # Custom icon. 1058 | # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1059 | 1060 | ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### 1061 | # Lua color. 1062 | typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 1063 | # Hide lua version if it doesn't come from one of these sources. 1064 | typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) 1065 | # If set to false, hide lua version if it's the same as global: 1066 | # $(luaenv version-name) == $(luaenv global). 1067 | typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false 1068 | # If set to false, hide lua version if it's equal to "system". 1069 | typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true 1070 | # Custom icon. 1071 | # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1072 | 1073 | ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ 1074 | # Java color. 1075 | typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 1076 | # Hide java version if it doesn't come from one of these sources. 1077 | typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) 1078 | # If set to false, hide java version if it's the same as global: 1079 | # $(jenv version-name) == $(jenv global). 1080 | typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false 1081 | # If set to false, hide java version if it's equal to "system". 1082 | typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true 1083 | # Custom icon. 1084 | # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1085 | 1086 | ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ 1087 | # Perl color. 1088 | typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 1089 | # Hide perl version if it doesn't come from one of these sources. 1090 | typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) 1091 | # If set to false, hide perl version if it's the same as global: 1092 | # $(plenv version-name) == $(plenv global). 1093 | typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false 1094 | # If set to false, hide perl version if it's equal to "system". 1095 | typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true 1096 | # Custom icon. 1097 | # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1098 | 1099 | ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ 1100 | # PHP color. 1101 | typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99 1102 | # Hide php version if it doesn't come from one of these sources. 1103 | typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) 1104 | # If set to false, hide php version if it's the same as global: 1105 | # $(phpenv version-name) == $(phpenv global). 1106 | typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false 1107 | # If set to false, hide php version if it's equal to "system". 1108 | typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true 1109 | # Custom icon. 1110 | # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1111 | 1112 | #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### 1113 | # Scala color. 1114 | typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160 1115 | # Hide scala version if it doesn't come from one of these sources. 1116 | typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) 1117 | # If set to false, hide scala version if it's the same as global: 1118 | # $(scalaenv version-name) == $(scalaenv global). 1119 | typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false 1120 | # If set to false, hide scala version if it's equal to "system". 1121 | typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true 1122 | # Custom icon. 1123 | # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1124 | 1125 | ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### 1126 | # Haskell color. 1127 | typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 1128 | # Hide haskell version if it doesn't come from one of these sources. 1129 | # 1130 | # shell: version is set by STACK_YAML 1131 | # local: version is set by stack.yaml up the directory tree 1132 | # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) 1133 | typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) 1134 | # If set to false, hide haskell version if it's the same as in the implicit global project. 1135 | typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true 1136 | # Custom icon. 1137 | # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' 1138 | 1139 | #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# 1140 | # Show kubecontext only when the the command you are typing invokes one of these tools. 1141 | # Tip: Remove the next line to always show kubecontext. 1142 | typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|fluxctl|stern' 1143 | 1144 | # Kubernetes context classes for the purpose of using different colors, icons and expansions with 1145 | # different contexts. 1146 | # 1147 | # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element 1148 | # in each pair defines a pattern against which the current kubernetes context gets matched. 1149 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1150 | # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, 1151 | # you'll see this value in your prompt. The second element of each pair in 1152 | # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The 1153 | # first match wins. 1154 | # 1155 | # For example, given these settings: 1156 | # 1157 | # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1158 | # '*prod*' PROD 1159 | # '*test*' TEST 1160 | # '*' DEFAULT) 1161 | # 1162 | # If your current kubernetes context is "deathray-testing/default", its class is TEST 1163 | # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. 1164 | # 1165 | # You can define different colors, icons and content expansions for different classes: 1166 | # 1167 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 1168 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1169 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1170 | typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1171 | # '*prod*' PROD # These values are examples that are unlikely 1172 | # '*test*' TEST # to match your needs. Customize them as needed. 1173 | '*' DEFAULT) 1174 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 1175 | # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1176 | 1177 | # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext 1178 | # segment. Parameter expansions are very flexible and fast, too. See reference: 1179 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1180 | # 1181 | # Within the expansion the following parameters are always available: 1182 | # 1183 | # - P9K_CONTENT The content that would've been displayed if there was no content 1184 | # expansion defined. 1185 | # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the 1186 | # output of `kubectl config get-contexts`. 1187 | # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the 1188 | # output of `kubectl config get-contexts`. 1189 | # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE 1190 | # in the output of `kubectl config get-contexts`. If there is no 1191 | # namespace, the parameter is set to "default". 1192 | # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the 1193 | # output of `kubectl config get-contexts`. 1194 | # 1195 | # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), 1196 | # the following extra parameters are available: 1197 | # 1198 | # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". 1199 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. 1200 | # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. 1201 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. 1202 | # 1203 | # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, 1204 | # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": 1205 | # 1206 | # - P9K_KUBECONTEXT_CLOUD_NAME=gke 1207 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account 1208 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a 1209 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1210 | # 1211 | # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": 1212 | # 1213 | # - P9K_KUBECONTEXT_CLOUD_NAME=eks 1214 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 1215 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 1216 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1217 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= 1218 | # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. 1219 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' 1220 | # Append the current context's namespace if it's not "default". 1221 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' 1222 | 1223 | # Custom prefix. 1224 | typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' 1225 | 1226 | ################[ terraform: terraform workspace (https://www.terraform.io) ]################# 1227 | # Don't show terraform workspace if it's literally "default". 1228 | typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false 1229 | # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element 1230 | # in each pair defines a pattern against which the current terraform workspace gets matched. 1231 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1232 | # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, 1233 | # you'll see this value in your prompt. The second element of each pair in 1234 | # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The 1235 | # first match wins. 1236 | # 1237 | # For example, given these settings: 1238 | # 1239 | # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1240 | # '*prod*' PROD 1241 | # '*test*' TEST 1242 | # '*' OTHER) 1243 | # 1244 | # If your current terraform workspace is "project_test", its class is TEST because "project_test" 1245 | # doesn't match the pattern '*prod*' but does match '*test*'. 1246 | # 1247 | # You can define different colors, icons and content expansions for different classes: 1248 | # 1249 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 1250 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1251 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1252 | typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1253 | # '*prod*' PROD # These values are examples that are unlikely 1254 | # '*test*' TEST # to match your needs. Customize them as needed. 1255 | '*' OTHER) 1256 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 1257 | # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' 1258 | 1259 | #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# 1260 | # Show aws only when the the command you are typing invokes one of these tools. 1261 | # Tip: Remove the next line to always show aws. 1262 | typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' 1263 | 1264 | # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element 1265 | # in each pair defines a pattern against which the current AWS profile gets matched. 1266 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1267 | # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, 1268 | # you'll see this value in your prompt. The second element of each pair in 1269 | # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The 1270 | # first match wins. 1271 | # 1272 | # For example, given these settings: 1273 | # 1274 | # typeset -g POWERLEVEL9K_AWS_CLASSES=( 1275 | # '*prod*' PROD 1276 | # '*test*' TEST 1277 | # '*' DEFAULT) 1278 | # 1279 | # If your current AWS profile is "company_test", its class is TEST 1280 | # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. 1281 | # 1282 | # You can define different colors, icons and content expansions for different classes: 1283 | # 1284 | # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 1285 | # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1286 | # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1287 | typeset -g POWERLEVEL9K_AWS_CLASSES=( 1288 | # '*prod*' PROD # These values are examples that are unlikely 1289 | # '*test*' TEST # to match your needs. Customize them as needed. 1290 | '*' DEFAULT) 1291 | typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 1292 | # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1293 | 1294 | #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# 1295 | # AWS Elastic Beanstalk environment color. 1296 | typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 1297 | # Custom icon. 1298 | # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1299 | 1300 | ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## 1301 | # Show azure only when the the command you are typing invokes one of these tools. 1302 | # Tip: Remove the next line to always show azure. 1303 | typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' 1304 | # Azure account name color. 1305 | typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 1306 | # Custom icon. 1307 | # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1308 | 1309 | ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### 1310 | # Show gcloud only when the the command you are typing invokes one of these tools. 1311 | # Tip: Remove the next line to always show gcloud. 1312 | typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' 1313 | # Google cloud color. 1314 | typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 1315 | 1316 | # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or 1317 | # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative 1318 | # enough. You can use the following parameters in the expansions. Each of them corresponds to the 1319 | # output of `gcloud` tool. 1320 | # 1321 | # Parameter | Source 1322 | # -------------------------|-------------------------------------------------------------------- 1323 | # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' 1324 | # P9K_GCLOUD_ACCOUNT | gcloud config get-value account 1325 | # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project 1326 | # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' 1327 | # 1328 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. 1329 | # 1330 | # Obtaining project name requires sending a request to Google servers. This can take a long time 1331 | # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud 1332 | # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets 1333 | # set and gcloud prompt segment transitions to state COMPLETE. 1334 | # 1335 | # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL 1336 | # and COMPLETE. You can also hide gcloud in state PARTIAL by setting 1337 | # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and 1338 | # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. 1339 | typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' 1340 | typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' 1341 | 1342 | # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name 1343 | # this often. Negative value disables periodic polling. In this mode project name is retrieved 1344 | # only when the current configuration, account or project id changes. 1345 | typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 1346 | 1347 | # Custom icon. 1348 | # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' 1349 | 1350 | #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# 1351 | # Show google_app_cred only when the the command you are typing invokes one of these tools. 1352 | # Tip: Remove the next line to always show google_app_cred. 1353 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' 1354 | 1355 | # Google application credentials classes for the purpose of using different colors, icons and 1356 | # expansions with different credentials. 1357 | # 1358 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first 1359 | # element in each pair defines a pattern against which the current kubernetes context gets 1360 | # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion 1361 | # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION 1362 | # parameters, you'll see this value in your prompt. The second element of each pair in 1363 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. 1364 | # The first match wins. 1365 | # 1366 | # For example, given these settings: 1367 | # 1368 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1369 | # '*:*prod*:*' PROD 1370 | # '*:*test*:*' TEST 1371 | # '*' DEFAULT) 1372 | # 1373 | # If your current Google application credentials is "service_account deathray-testing x@y.com", 1374 | # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. 1375 | # 1376 | # You can define different colors, icons and content expansions for different classes: 1377 | # 1378 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 1379 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1380 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' 1381 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1382 | # '*:*prod*:*' PROD # These values are examples that are unlikely 1383 | # '*:*test*:*' TEST # to match your needs. Customize them as needed. 1384 | '*' DEFAULT) 1385 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 1386 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1387 | 1388 | # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by 1389 | # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: 1390 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1391 | # 1392 | # You can use the following parameters in the expansion. Each of them corresponds to one of the 1393 | # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. 1394 | # 1395 | # Parameter | JSON key file field 1396 | # ---------------------------------+--------------- 1397 | # P9K_GOOGLE_APP_CRED_TYPE | type 1398 | # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id 1399 | # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email 1400 | # 1401 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. 1402 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' 1403 | 1404 | ###############################[ public_ip: public IP address ]############################### 1405 | # Public IP color. 1406 | typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 1407 | # Custom icon. 1408 | # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1409 | 1410 | ########################[ vpn_ip: virtual private network indicator ]######################### 1411 | # VPN IP color. 1412 | typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 1413 | # When on VPN, show just an icon without the IP address. 1414 | # Tip: To display the private IP address when on VPN, remove the next line. 1415 | typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= 1416 | # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN 1417 | # to see the name of the interface. 1418 | typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*' 1419 | # If set to true, show one segment per matching network interface. If set to false, show only 1420 | # one segment corresponding to the first matching network interface. 1421 | # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. 1422 | typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false 1423 | # Custom icon. 1424 | # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1425 | 1426 | ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### 1427 | # IP color. 1428 | typeset -g POWERLEVEL9K_IP_FOREGROUND=38 1429 | # The following parameters are accessible within the expansion: 1430 | # 1431 | # Parameter | Meaning 1432 | # ----------------------+--------------- 1433 | # P9K_IP_IP | IP address 1434 | # P9K_IP_INTERFACE | network interface 1435 | # P9K_IP_RX_BYTES | total number of bytes received 1436 | # P9K_IP_TX_BYTES | total number of bytes sent 1437 | # P9K_IP_RX_RATE | receive rate (since last prompt) 1438 | # P9K_IP_TX_RATE | send rate (since last prompt) 1439 | typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F<$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F>$P9K_IP_TX_RATE}' 1440 | # Show information for the first network interface whose name matches this regular expression. 1441 | # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. 1442 | typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' 1443 | # Custom icon. 1444 | # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1445 | 1446 | #########################[ proxy: system-wide http/https/ftp proxy ]########################## 1447 | # Proxy color. 1448 | typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 1449 | # Custom icon. 1450 | # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' 1451 | 1452 | ################################[ battery: internal battery ]################################# 1453 | # Show battery in red when it's below this level and not connected to power supply. 1454 | typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 1455 | typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 1456 | # Show battery in green when it's charging or fully charged. 1457 | typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 1458 | # Show battery in yellow when it's discharging. 1459 | typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 1460 | # Battery pictograms going from low to high level of charge. 1461 | typeset -g POWERLEVEL9K_BATTERY_STAGES=('battery') 1462 | # Don't show the remaining time to charge/discharge. 1463 | typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false 1464 | 1465 | #####################################[ wifi: wifi speed ]##################################### 1466 | # WiFi color. 1467 | typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68 1468 | # Custom icon. 1469 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' 1470 | 1471 | # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). 1472 | # 1473 | # # Wifi colors and icons for different signal strength levels (low to high). 1474 | # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values 1475 | # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values 1476 | # 1477 | # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' 1478 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' 1479 | # 1480 | # The following parameters are accessible within the expansions: 1481 | # 1482 | # Parameter | Meaning 1483 | # ----------------------+--------------- 1484 | # P9K_WIFI_SSID | service set identifier, a.k.a. network name 1485 | # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown 1486 | # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second 1487 | # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 1488 | # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 1489 | # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) 1490 | 1491 | ####################################[ time: current time ]#################################### 1492 | # Current time color. 1493 | typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 1494 | # Format for the current time: 09:51:02. See `man 3 strftime`. 1495 | typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%I:%M:%S %p}' 1496 | # If set to true, time will update when you hit enter. This way prompts for the past 1497 | # commands will contain the start times of their commands as opposed to the default 1498 | # behavior where they contain the end times of their preceding commands. 1499 | typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false 1500 | # Custom icon. 1501 | typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= 1502 | # Custom prefix. 1503 | typeset -g POWERLEVEL9K_TIME_PREFIX='%fat ' 1504 | 1505 | # Example of a user-defined prompt segment. Function prompt_example will be called on every 1506 | # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or 1507 | # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. 1508 | # 1509 | # Type `p10k help segment` for documentation and a more sophisticated example. 1510 | function prompt_example() { 1511 | p10k segment -f 208 -i '*' -t 'hello, %n' 1512 | } 1513 | 1514 | # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job 1515 | # is to generate the prompt segment for display in instant prompt. See 1516 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1517 | # 1518 | # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function 1519 | # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k 1520 | # will replay these calls without actually calling instant_prompt_*. It is imperative that 1521 | # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this 1522 | # rule is not observed, the content of instant prompt will be incorrect. 1523 | # 1524 | # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If 1525 | # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. 1526 | function instant_prompt_example() { 1527 | # Since prompt_example always makes the same `p10k segment` calls, we can call it from 1528 | # instant_prompt_example. This will give us the same `example` prompt segment in the instant 1529 | # and regular prompts. 1530 | prompt_example 1531 | } 1532 | 1533 | # User-defined prompt segments can be customized the same way as built-in segments. 1534 | # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 1535 | # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1536 | 1537 | # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt 1538 | # when accepting a command line. Supported values: 1539 | # 1540 | # - off: Don't change prompt when accepting a command line. 1541 | # - always: Trim down prompt when accepting a command line. 1542 | # - same-dir: Trim down prompt when accepting a command line unless this is the first command 1543 | # typed after changing current working directory. 1544 | typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always 1545 | 1546 | # Instant prompt mode. 1547 | # 1548 | # - off: Disable instant prompt. Choose this if you've tried instant prompt and found 1549 | # it incompatible with your zsh configuration files. 1550 | # - quiet: Enable instant prompt and don't print warnings when detecting console output 1551 | # during zsh initialization. Choose this if you've read and understood 1552 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1553 | # - verbose: Enable instant prompt and print a warning when detecting console output during 1554 | # zsh initialization. Choose this if you've never tried instant prompt, haven't 1555 | # seen the warning, or if you are unsure what this all means. 1556 | typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose 1557 | 1558 | # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. 1559 | # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload 1560 | # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you 1561 | # really need it. 1562 | typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true 1563 | 1564 | # If p10k is already loaded, reload configuration. 1565 | # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. 1566 | (( ! $+functions[p10k] )) || p10k reload 1567 | } 1568 | 1569 | # Tell `p10k configure` which file it should overwrite. 1570 | typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} 1571 | 1572 | (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} 1573 | 'builtin' 'unset' 'p10k_config_opts' 1574 | -------------------------------------------------------------------------------- /zsh/.tmux.conf: -------------------------------------------------------------------------------- 1 | setw -g mode-keys vi 2 | set -g mouse on -------------------------------------------------------------------------------- /zsh/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License (MIT) 2 | Copyright 2019 Deluan Quintao 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 5 | associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 7 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or 11 | substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 16 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT 17 | OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /zsh/zsh-in-docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | THEME=powerlevel10k/powerlevel10k 5 | PLUGINS="" 6 | ZSHRC_APPEND="" 7 | 8 | while getopts ":t:p:a:" opt; do 9 | case ${opt} in 10 | t) THEME=$OPTARG 11 | ;; 12 | p) PLUGINS="${PLUGINS}$OPTARG " 13 | ;; 14 | a) ZSHRC_APPEND="$ZSHRC_APPEND\n$OPTARG" 15 | ;; 16 | \?) 17 | echo "Invalid option: $OPTARG" 1>&2 18 | ;; 19 | :) 20 | echo "Invalid option: $OPTARG requires an argument" 1>&2 21 | ;; 22 | esac 23 | done 24 | shift $((OPTIND -1)) 25 | 26 | echo 27 | echo "Installing Oh-My-Zsh with:" 28 | echo " THEME = $THEME" 29 | echo " PLUGINS = $PLUGINS" 30 | echo 31 | 32 | check_dist() { 33 | ( 34 | . /etc/os-release 35 | echo $ID 36 | ) 37 | } 38 | 39 | check_version() { 40 | ( 41 | . /etc/os-release 42 | echo $VERSION_ID 43 | ) 44 | } 45 | 46 | install_dependencies() { 47 | DIST=`check_dist` 48 | VERSION=`check_version` 49 | echo "###### Installing dependencies for $DIST" 50 | 51 | if [ "`id -u`" = "0" ]; then 52 | Sudo='' 53 | elif which sudo; then 54 | Sudo='sudo' 55 | else 56 | echo "WARNING: 'sudo' command not found. Skipping the installation of dependencies. " 57 | echo "If this fails, you need to do one of these options:" 58 | echo " 1) Install 'sudo' before calling this script" 59 | echo "OR" 60 | echo " 2) Install the required dependencies: git curl zsh" 61 | return 62 | fi 63 | 64 | case $DIST in 65 | alpine) 66 | $Sudo apk add --update --no-cache git curl zsh 67 | ;; 68 | centos | amzn) 69 | $Sudo yum update -y 70 | $Sudo yum install -y git curl 71 | $Sudo yum install -y ncurses-compat-libs # this is required for AMZN Linux (ref: https://github.com/emqx/emqx/issues/2503) 72 | $Sudo curl http://mirror.ghettoforge.org/distributions/gf/el/7/plus/x86_64/zsh-5.1-1.gf.el7.x86_64.rpm > zsh-5.1-1.gf.el7.x86_64.rpm 73 | $Sudo rpm -i zsh-5.1-1.gf.el7.x86_64.rpm 74 | $Sudo rm zsh-5.1-1.gf.el7.x86_64.rpm 75 | ;; 76 | *) 77 | $Sudo apt-get update 78 | $Sudo apt-get -y --force-yes install git curl zsh locales 79 | if [ "$VERSION" != "14.04" ]; then 80 | $Sudo apt-get -y --force-yes install locales-all 81 | fi 82 | $Sudo locale-gen en_US.UTF-8 83 | esac 84 | } 85 | 86 | zshrc_template() { 87 | _HOME=$1; 88 | _THEME=$2; shift; shift 89 | _PLUGINS=$*; 90 | 91 | cat < $HOME/.zshrc 162 | 163 | # Install powerlevel10k if no other theme was specified 164 | if [ "$THEME" = "powerlevel10k/powerlevel10k" ]; then 165 | git clone https://github.com/romkatv/powerlevel10k $HOME/.oh-my-zsh/custom/themes/powerlevel10k 166 | powerline10k_config | cat - $HOME/.zshrc > temp && mv temp $HOME/.zshrc 167 | powerline10k_config_end >> $HOME/.zshrc 168 | fi 169 | --------------------------------------------------------------------------------