From 40aa73807f3105f8a522933b316d8f1efe0d66a6 Mon Sep 17 00:00:00 2001 From: Afonso Costa Date: Sat, 24 Jan 2026 21:42:43 +0000 Subject: [PATCH 01/17] Installed pre-commit, sops and updated linters --- .sops.yaml | 4 ++++ .yamllint | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.sops.yaml b/.sops.yaml index 6f58482..c160c03 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -1,10 +1,14 @@ --- creation_rules: - path_regex: "config.sops.yml" +<<<<<<< HEAD encrypted_regex: ^(dotfiles_auth_home|dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ key_groups: - age: [age1n2g0g2z9jdgnqx826e8d0d78y8z0lc7ngdadm3jw9gzpxj2nf5rs0hm6p6] - path_regex: "config.work.sops.yml" +======= + encrypted_regex: ^(dotfiles_repo)$ +>>>>>>> adb52b6 (Installed pre-commit, sops and updated linters) key_groups: - age: [age1n2g0g2z9jdgnqx826e8d0d78y8z0lc7ngdadm3jw9gzpxj2nf5rs0hm6p6] - age: age1n2g0g2z9jdgnqx826e8d0d78y8z0lc7ngdadm3jw9gzpxj2nf5rs0hm6p6 diff --git a/.yamllint b/.yamllint index cd5d58e..7e428ec 100644 --- a/.yamllint +++ b/.yamllint @@ -4,7 +4,11 @@ extends: default ignore: - .venv/ - .ansible/ +<<<<<<< HEAD - "*.sops.y*ml" +======= + - '*.sops.y*ml' +>>>>>>> adb52b6 (Installed pre-commit, sops and updated linters) rules: comments: From b205df2607ef78c6dbdff0522bda4550d1855289 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Sat, 24 Jan 2026 23:50:19 +0000 Subject: [PATCH 02/17] Merged dotfiles from afonsoc12/dotfiles --- .sops.yaml | 4 +++ dotfiles/gh/config.yml | 5 ++++ dotfiles/git/config.j2 | 3 ++ dotfiles/gnupg/gpg-agent.conf | 5 ++++ dotfiles/k9s/config.yaml.j2 | 4 +++ dotfiles/vscode/settings.json | 19 +++++++++++++ dotfiles/zsh/.zshenv | 48 ++++++++++++++++++++++++++++++++ dotfiles/zsh/.zshrc | 12 ++++++++ dotfiles/zsh/aliases.zsh | 12 ++++++++ roles/dotfiles/defaults/main.yml | 4 +++ roles/dotfiles/tasks/install.yml | 7 +++++ roles/dotfiles/tasks/links.yml | 19 +++++++++++++ roles/dotfiles/tasks/main.yml | 5 ++++ 13 files changed, 147 insertions(+) create mode 100644 dotfiles/zsh/.zshenv diff --git a/.sops.yaml b/.sops.yaml index c160c03..7c55d2a 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -1,6 +1,7 @@ --- creation_rules: - path_regex: "config.sops.yml" +<<<<<<< HEAD <<<<<<< HEAD encrypted_regex: ^(dotfiles_auth_home|dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ key_groups: @@ -9,6 +10,9 @@ creation_rules: ======= encrypted_regex: ^(dotfiles_repo)$ >>>>>>> adb52b6 (Installed pre-commit, sops and updated linters) +======= + encrypted_regex: ^(dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) key_groups: - age: [age1n2g0g2z9jdgnqx826e8d0d78y8z0lc7ngdadm3jw9gzpxj2nf5rs0hm6p6] - age: age1n2g0g2z9jdgnqx826e8d0d78y8z0lc7ngdadm3jw9gzpxj2nf5rs0hm6p6 diff --git a/dotfiles/gh/config.yml b/dotfiles/gh/config.yml index 1c3e3de..8920073 100644 --- a/dotfiles/gh/config.yml +++ b/dotfiles/gh/config.yml @@ -5,7 +5,12 @@ editor: nano prompt: enabled pager: cat aliases: +<<<<<<< HEAD prc: pr create -f prcd: pr create -f --draft prdy: pr ready v: pr view --web +======= + co: pr checkout + ghw: pr view --web +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) diff --git a/dotfiles/git/config.j2 b/dotfiles/git/config.j2 index 5a6f06a..4def3b7 100644 --- a/dotfiles/git/config.j2 +++ b/dotfiles/git/config.j2 @@ -14,6 +14,7 @@ defaultBranch = master [push] autoSetupRemote = true +<<<<<<< HEAD [alias] rebase-dance = "!f() { \ upstream=$(git remote show origin | awk '/HEAD branch/ {print $NF}'); \ @@ -34,3 +35,5 @@ fi; \ echo '✅ Rebase dance complete!'; \ }; f" +======= +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) diff --git a/dotfiles/gnupg/gpg-agent.conf b/dotfiles/gnupg/gpg-agent.conf index beab335..56325d8 100644 --- a/dotfiles/gnupg/gpg-agent.conf +++ b/dotfiles/gnupg/gpg-agent.conf @@ -1,3 +1,8 @@ pinentry-program /opt/homebrew/bin/pinentry-mac +<<<<<<< HEAD default-cache-ttl 2592000 # 1 month max-cache-ttl 2592000 # 1 month +======= +default-cache-ttl 0 +max-cache-ttl 0 +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) diff --git a/dotfiles/k9s/config.yaml.j2 b/dotfiles/k9s/config.yaml.j2 index d031e27..fefed83 100644 --- a/dotfiles/k9s/config.yaml.j2 +++ b/dotfiles/k9s/config.yaml.j2 @@ -1,7 +1,11 @@ --- k9s: liveViewAutoRefresh: false +<<<<<<< HEAD screenDumpDir: {{ XDG_BASE_DIRS.XDG_STATE_HOME }}/k9s/screen-dumps +======= + screenDumpDir: {{ ansible_facts.env.XDG_STATE_HOME }}/k9s/screen-dumps +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) refreshRate: 2 maxConnRetry: 5 readOnly: false diff --git a/dotfiles/vscode/settings.json b/dotfiles/vscode/settings.json index 0de05de..384e1d4 100644 --- a/dotfiles/vscode/settings.json +++ b/dotfiles/vscode/settings.json @@ -1,6 +1,9 @@ { "explorer.confirmDragAndDrop": false, +<<<<<<< HEAD "files.autoSave": "onFocusChange", +======= +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) "files.exclude": { "**/.git": false }, @@ -10,6 +13,7 @@ "git.confirmSync": false, "git.enableCommitSigning": true, "security.workspace.trust.untrustedFiles": "open", +<<<<<<< HEAD "terminal.integrated.cursorBlinking": true, "terminal.integrated.cursorStyle": "line", "terminal.integrated.cursorWidth": 2, @@ -20,10 +24,17 @@ "window.title": "${activeRepositoryName}", "window.zoomLevel": 1, "window.zoomPerWindow": false, +======= + "window.zoomLevel": 2, + "workbench.iconTheme": "vscode-icons", + "files.autoSave": "onFocusChange", + "workbench.colorTheme": "Default Dark+", +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) "workbench.colorCustomizations": { "editorCursor.foreground": "#ff0000", "editorMultiCursor.primary.foreground": "#ff0000", "editorMultiCursor.secondary.foreground": "#ff8000", +<<<<<<< HEAD "editor.findMatchHighlightBackground": "#dba80daa", "editor.findMatchHighlightForeground": "#000000", "editor.findMatchBackground": "#0ddb10aa", @@ -33,4 +44,12 @@ "workbench.colorTheme": "JetBrains Darcula Theme", "workbench.iconTheme": "vscode-icons", "workbench.tree.indent": 16 +======= + "terminalCursor.foreground": "#ff0000" + + }, + "terminal.integrated.cursorStyle": "line", + "terminal.integrated.cursorBlinking": true, + "terminal.integrated.cursorWidth": 2 +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) } diff --git a/dotfiles/zsh/.zshenv b/dotfiles/zsh/.zshenv new file mode 100644 index 0000000..bd002b4 --- /dev/null +++ b/dotfiles/zsh/.zshenv @@ -0,0 +1,48 @@ +# ~/.zshenv +# Essential environment variables for Zsh and tools. +# Sourced by all shells (login/non-login, interactive/non-interactive). +# Do NOT put aliases, prompts, or commands that produce output here. +# +# The following lines need to be placed in /etc/zshenv +# export ZDOTDIR=$HOME/.config/zsh +# echo ". $ZDOTDIR/.zshenv" + +# ─────────── XDG Base Directory Specification ─────────── +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.local/cache}" +export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" +export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-$HOME/.local/run}" +export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" +export XDG_BIN_HOME="${XDG_BIN_HOME:-$HOME/.local/bin}" + +# ─────────── Zsh ─────────── +export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export ZSH="$XDG_DATA_HOME/oh-my-zsh" +export HISTFILE="$XDG_STATE_HOME/zsh/history" + +# ─────────── General ─────────── +export EDITOR="nano" +export LESSHISTFILE="$XDG_STATE_HOME/less/history" + +# ─────────── uv ─────────── +export UV_NATIVE_TLS=true +export UV_VENV_SEED=true + +# ─────────── Pyenv ─────────── +export PYENV_ROOT="$XDG_DATA_HOME/pyenv" + +# ─────────── GPG ─────────── +export GNUPGHOME="$HOME/.auth/gnupg" + +# ─────────── Docker ─────────── +export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker" + +# ─────────── Kubernetes ─────────── +export KUBECONFIG="$HOME/.auth/kube/config" +export KUBE_EDITOR="nano" + +# ─────────── Ansible ─────────── +export ANSIBLE_HOME="$XDG_DATA_HOME/ansible" + +# ─────────── OCI CLI ─────────── +export OCI_CLI_CONFIG_FILE="$HOME/.auth/oci/config" diff --git a/dotfiles/zsh/.zshrc b/dotfiles/zsh/.zshrc index 5bc2d75..e61c8c9 100644 --- a/dotfiles/zsh/.zshrc +++ b/dotfiles/zsh/.zshrc @@ -6,6 +6,7 @@ export ZSH="$XDG_DATA_HOME/oh-my-zsh" COMPLETION_WAITING_DOTS="true" zstyle ':omz:update' frequency 15 +<<<<<<< HEAD plugins=(aliases alias-finder) [ -f "$ZSH/oh-my-zsh.sh" ] && source "$ZSH/oh-my-zsh.sh" @@ -13,6 +14,14 @@ plugins=(aliases alias-finder) zstyle ':omz:plugins:alias-finder' autoload yes # ─────────── Pure Prompt ─────────── +======= +plugins=(git) + +[ -f "$ZSH/oh-my-zsh.sh" ] && source "$ZSH/oh-my-zsh.sh" + +# ─────────── Pure Prompt ─────────── +fpath+=("$(brew --prefix)/share/zsh/site-functions") +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) autoload -U promptinit; promptinit prompt pure @@ -33,6 +42,9 @@ zstyle :prompt:pure:suspended_jobs color red zstyle :prompt:pure:user color 242 zstyle :prompt:pure:user:root color default zstyle :prompt:pure:virtualenv show yes +<<<<<<< HEAD # ─────────── Aliases ─────────── source $ZDOTDIR/aliases.zsh +======= +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) diff --git a/dotfiles/zsh/aliases.zsh b/dotfiles/zsh/aliases.zsh index 5e9c6bb..f311e1c 100644 --- a/dotfiles/zsh/aliases.zsh +++ b/dotfiles/zsh/aliases.zsh @@ -7,19 +7,27 @@ alias cdd="cd ~/Desktop" alias cdh="cd ~" command -v eza >/dev/null && alias v="eza -lah" || alias v="ls -lah" +<<<<<<< HEAD # ─────────── Tools ─────────── alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts" +======= +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) # ─────────── Kubernetes ─────────── alias k="kubectl" export do="--dry-run=client -oyaml" export now="--grace-period=0 --force" +<<<<<<< HEAD +======= + +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) alias kn="kubectl config set-context --current --namespace" alias ka="kubectl apply -f" alias kc="kubectl create" alias kr="kubectl run" alias kg="kubectl get" alias kd="kubectl describe" +<<<<<<< HEAD alias kdel="kubectl delete" alias kdebug="kubectl run --rm -i --restart=Never" alias hi="helm install --update" @@ -46,3 +54,7 @@ alias gst="git stash" alias gsta="git stash apply" gcm() { git commit -m "$*"; } gcmp() { gcm "$@" && git push ; } +======= +alias kdebug="kubectl run --rm -i --restart=Never" +alias kubeseal="kubeseal --controller-name=sealed-secrets --controller-namespace=utils" +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) diff --git a/roles/dotfiles/defaults/main.yml b/roles/dotfiles/defaults/main.yml index eefdcbf..43f7d73 100644 --- a/roles/dotfiles/defaults/main.yml +++ b/roles/dotfiles/defaults/main.yml @@ -5,7 +5,11 @@ dotfiles_secrets_dest: "{{ ansible_env.HOME }}" dotfiles_use_links: true dotfiles_links_vscode_settings_dir: "{{ lookup('env', 'HOME') }}/Library/Application Support/Code/User" +<<<<<<< HEAD dotfiles_auth_home: "{{ lookup('env', 'HOME') }}/.secrets" +======= +dotfiles_links_vscode_settings_src: "{{ XDG_BASE_DIRS.XDG_CONFIG_HOME ~ '/vscode' }}" +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) # XDG Base Directory Specification (https://specifications.freedesktop.org/basedir/latest/) XDG_BASE_DIRS: # noqa var-naming[pattern] diff --git a/roles/dotfiles/tasks/install.yml b/roles/dotfiles/tasks/install.yml index 8bfa26c..0be3102 100644 --- a/roles/dotfiles/tasks/install.yml +++ b/roles/dotfiles/tasks/install.yml @@ -10,7 +10,10 @@ find: paths: "{{ dotfiles_dir }}" file_type: file +<<<<<<< HEAD hidden: true +======= +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) recurse: true register: dotfiles_found changed_when: false @@ -68,7 +71,11 @@ {{ XDG_BASE_DIRS.XDG_CONFIG_HOME ~ '/' ~ (item.path | dirname | regex_replace('^' + dotfiles_dir + '/','')) ~ '/' ~ +<<<<<<< HEAD (item.path | basename | regex_replace('\.j2$', '')) +======= + (item.path | basename | regex_replace('\\.j2$','')) +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) }} mode: "0644" loop: "{{ dotfiles_templates }}" diff --git a/roles/dotfiles/tasks/links.yml b/roles/dotfiles/tasks/links.yml index 5905c88..e307d46 100644 --- a/roles/dotfiles/tasks/links.yml +++ b/roles/dotfiles/tasks/links.yml @@ -5,6 +5,7 @@ state: directory mode: "0755" +<<<<<<< HEAD - name: Build list of VS Code files for symlinking set_fact: dotfiles_vscode_files: >- @@ -58,3 +59,21 @@ loop: "{{ dotfiles_gnupg_files }}" loop_control: label: "{{ item.basename }}" +======= +- name: Find VS Code config files + find: + paths: "{{ dotfiles_links_vscode_settings_src }}" + file_type: "{{ 'link' if dotfiles_use_links is truthy else 'file' }}" + recurse: false + register: dotfiles_vscode_files + +- name: Symlink VS Code config files + file: + src: "{{ item.path }}" + dest: "{{ dotfiles_links_vscode_settings_dir }}/{{ item.path | basename }}" + state: link + force: true + loop: "{{ dotfiles_vscode_files.files }}" + loop_control: + label: "{{ item.path | basename }}" +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) diff --git a/roles/dotfiles/tasks/main.yml b/roles/dotfiles/tasks/main.yml index c777e70..b33b9fc 100644 --- a/roles/dotfiles/tasks/main.yml +++ b/roles/dotfiles/tasks/main.yml @@ -2,8 +2,13 @@ - name: Install dotfiles include_tasks: install.yml +<<<<<<< HEAD - name: Link dotfiles that cannot be used from XDG_CONFIG_HOME include_tasks: links.yml +======= +# - name: Link dotfiles that cannot be used from XDG_CONFIG_HOME +# include_tasks: links.yml +>>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) # - name: Append extra block to .zshrc # blockinfile: From 7bd0e785a33cc46e8f5fc1f96111f32909f96aad Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Sat, 24 Jan 2026 23:52:51 +0000 Subject: [PATCH 03/17] SOPS role to provision and load sops secrets --- .yamllint | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.yamllint b/.yamllint index 7e428ec..f00ce9b 100644 --- a/.yamllint +++ b/.yamllint @@ -4,11 +4,15 @@ extends: default ignore: - .venv/ - .ansible/ +<<<<<<< HEAD <<<<<<< HEAD - "*.sops.y*ml" ======= - '*.sops.y*ml' >>>>>>> adb52b6 (Installed pre-commit, sops and updated linters) +======= + - "*.sops.y*ml" +>>>>>>> 16f169a (SOPS role to provision and load sops secrets) rules: comments: From aad965d8af1a0fcc68c3c04a75e6a3fb70e01722 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Sun, 25 Jan 2026 13:30:22 +0000 Subject: [PATCH 04/17] Add bootstrap script, license and updated readme --- README.md | 96 ++++++++++++++++++++++++++++++++ bootstrap.sh | 60 ++++++++++++++++++++ dotfiles/k9s/config.yaml.j2 | 4 ++ main.yml | 1 + roles/dotfiles/tasks/install.yml | 4 ++ 5 files changed, 165 insertions(+) diff --git a/README.md b/README.md index f9b81b8..3d7c82a 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ This repository codifies workstation setup with version-controlled configuration - **Git** configuration and repository cloning - **Zsh** shell setup with Oh My Zsh - **Editor / IDE / terminal** configuration +<<<<<<< HEAD +======= ### 📁 Dotfiles Management Dotfiles are now **first-class citizens** of this project. @@ -48,6 +50,34 @@ Dotfiles are now **first-class citizens** of this project. ### Prerequisites +- macOS 12 or later (tested only on 26+) +- Approximately 30 minutes +- Internet connection +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) + +### 📁 Dotfiles Management +Dotfiles are now **first-class citizens** of this project. + +<<<<<<< HEAD +- 📂 XDG Base Directory compliant (where possible) +- 🏠 Minimal `$HOME` clutter +- 🔗 Deploy via symlink or copy +- ⚙️ Templated with Ansible +- 🔐 Secrets management via SOPS + +**Pre-configured for:** +- zsh, Git, GnuPG, VS Code, rclone, rsync, k9s, and more + +### 🎨 macOS Customization +- 🔧 System defaults +- 📌 Dock layout and ordering +- 💡 Developer-focused tweaks + +--- +## Getting Started + +### Prerequisites + - macOS 12 or later (tested only on 26+) - Approximately 30 minutes - Internet connection @@ -136,6 +166,72 @@ ansible-playbook main.yml -e sops_file= --ask-become-pass --- +======= +## Installation Options + +### ⚡ One-Command Bootstrap + +This method is ideal if you want a **fully automated setup**. It will: + +- Install XCode Command Line Tools +- Clone this repository to `~/.local/share/ready-set-develop` (XDG-compliant) +- Install Python packages and Ansible with system python +- Install Ansible Galaxy packages +- Run the full playbook + +**Run:** + +```bash +curl -fsSL https://raw.githubusercontent.com/afonsoc12/ready-set-develop/main/bootstrap.zsh | SOPS_AGE_KEY_FILE= zsh - +``` + +### Step-by-step Installation + +#### 1️⃣ Install Command Line Tools + +```bash +xcode-select --install +``` + +Accept the license when prompted. + +#### 2️⃣ Set Environment Variables + +```bash +export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH" +export ANSIBLE_HOME="$HOME/.local/share/ansible" +``` + +#### 3️⃣ Install Ansible + +```bash +/usr/bin/pip3 install --upgrade pip +/usr/bin/pip3 install ansible +``` + +#### 4️⃣ Clone Repository + +```bash +git clone https://github.com/afonsoc12/ready-set-develop.git +cd ready-set-develop +``` + +#### 5️⃣ Install Ansible Requirements + +```bash +ansible-galaxy install -r requirements.yml +``` + +#### 6️⃣ Run Playbook + +```bash +export SOPS_AGE_KEY_FILE= +ansible-playbook main.yml --ask-become-pass +``` + +--- + +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) ## Running ### Standard Execution diff --git a/bootstrap.sh b/bootstrap.sh index 1b51c11..e333864 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -2,6 +2,7 @@ set -euo pipefail # ----------------------------- +<<<<<<< HEAD # Defaults # ----------------------------- RSD_REPO_URL="${RSD_REPO_URL:-https://github.com/afonsoc12/ready-set-develop.git}" @@ -17,6 +18,21 @@ export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH" # Optional SOPS file RSD_SOPS_FILE="${RSD_SOPS_FILE:-}" +======= +# Configuration +# ----------------------------- +REPO_URL="https://github.com/afonsoc12/ready-set-develop.git" + +# XDG defaults +export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" +export ANSIBLE_HOME="$XDG_DATA_HOME/ansible" + +REPO_DIR="$XDG_DATA_HOME/ready-set-develop" + +# Python user bin (3.*) +export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH" + +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) echo echo "🚀 Ready, Set, Develop — bootstrap" echo @@ -47,13 +63,25 @@ fi # ----------------------------- if [[ -z "${SOPS_AGE_KEY_FILE:-}" ]]; then echo "❌ SOPS_AGE_KEY_FILE is not set." +<<<<<<< HEAD + echo "Export your AGE key file before running:" + echo " export SOPS_AGE_KEY_FILE=" +======= + echo echo "Export your AGE key file before running:" echo " export SOPS_AGE_KEY_FILE=" + echo +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) exit 1 fi if [[ ! -f "$SOPS_AGE_KEY_FILE" ]]; then +<<<<<<< HEAD echo "❌ SOPS_AGE_KEY_FILE does not exist: $SOPS_AGE_KEY_FILE" +======= + echo "❌ SOPS_AGE_KEY_FILE does not exist:" + echo " $SOPS_AGE_KEY_FILE" +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) exit 1 fi @@ -63,7 +91,14 @@ echo "🔐 SOPS AGE key detected" # 4. Ensure directories exist # ----------------------------- echo "📁 Ensuring directories exist" +<<<<<<< HEAD mkdir -p "$XDG_DATA_HOME" "$RSD_ANSIBLE_HOME" +======= + +mkdir -p \ + "$XDG_DATA_HOME" \ + "$ANSIBLE_HOME" +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) # ----------------------------- # 5. Install Ansible (user) @@ -79,6 +114,7 @@ fi # ----------------------------- # 6. Clone repository # ----------------------------- +<<<<<<< HEAD if [[ -d "$RSD_REPO_DIR" && "${RSD_FORCE_REPO:-false}" == "true" ]]; then echo "⚠️ RSD_FORCE_REPO=true, removing existing repo: $RSD_REPO_DIR" rm -rf "$RSD_REPO_DIR" @@ -115,21 +151,45 @@ fi # ----------------------------- # 8. Install Ansible requirements +======= +if [[ ! -d "$REPO_DIR" ]]; then + echo "📥 Cloning ready-set-develop into:" + echo " $REPO_DIR" + git clone "$REPO_URL" "$REPO_DIR" +else + echo "📂 Repository already exists:" + echo " $REPO_DIR" +fi + +cd "$REPO_DIR" + +# ----------------------------- +# 7. Install Ansible requirements +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) # ----------------------------- echo "📚 Installing Ansible Galaxy requirements" ansible-galaxy install -r requirements.yml # ----------------------------- +<<<<<<< HEAD # 9. Run playbook +======= +# 8. Run playbook +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) # ----------------------------- echo echo "▶️ Running Ansible playbook" echo +<<<<<<< HEAD ANSIBLE_CMD="ansible-playbook main.yml --ask-become-pass -v" [[ -n "$RSD_SOPS_FILE" ]] && ANSIBLE_CMD+=" -e sops_file=$RSD_SOPS_FILE" eval "$ANSIBLE_CMD" +======= +ansible-playbook main.yml --ask-become-pass -v + +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) echo echo "🎉 Ready, Set, Develop completed successfully" diff --git a/dotfiles/k9s/config.yaml.j2 b/dotfiles/k9s/config.yaml.j2 index fefed83..0b403f6 100644 --- a/dotfiles/k9s/config.yaml.j2 +++ b/dotfiles/k9s/config.yaml.j2 @@ -1,11 +1,15 @@ --- k9s: liveViewAutoRefresh: false +<<<<<<< HEAD <<<<<<< HEAD screenDumpDir: {{ XDG_BASE_DIRS.XDG_STATE_HOME }}/k9s/screen-dumps ======= screenDumpDir: {{ ansible_facts.env.XDG_STATE_HOME }}/k9s/screen-dumps >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= + screenDumpDir: {{ XDG_BASE_DIRS.XDG_STATE_HOME }}/k9s/screen-dumps +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) refreshRate: 2 maxConnRetry: 5 readOnly: false diff --git a/main.yml b/main.yml index 9dd02a6..fb2e820 100644 --- a/main.yml +++ b/main.yml @@ -6,6 +6,7 @@ vars_files: - config.default.yml + - config.sops.yml # Can't be loaded with -e @config.sops.yml, because precedence would be higher than set_fact pre_tasks: - name: Python interpreter diff --git a/roles/dotfiles/tasks/install.yml b/roles/dotfiles/tasks/install.yml index 0be3102..07b0bd7 100644 --- a/roles/dotfiles/tasks/install.yml +++ b/roles/dotfiles/tasks/install.yml @@ -10,10 +10,14 @@ find: paths: "{{ dotfiles_dir }}" file_type: file +<<<<<<< HEAD <<<<<<< HEAD hidden: true ======= >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= + hidden: true +>>>>>>> a7efc97 (Add bootstrap script, license and updated readme) recurse: true register: dotfiles_found changed_when: false From 51e8c61c336494e37822d8e91e792df26361eef0 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Sun, 25 Jan 2026 13:50:32 +0000 Subject: [PATCH 05/17] Disable IT tests (for now) --- .github/workflows/lint.yml | 10 ++++++++++ config.sops.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5326277..72d6b77 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,11 +1,18 @@ name: Lint +<<<<<<< HEAD on: # yamllint disable-line rule:truthy workflow_dispatch: pull_request: types: [ready_for_review, reopened] # synchronize makes CI too chatt pull_request_review: types: [submitted] +======= +on: + workflow_dispatch: + pull_request: + types: [opened, synchronize, reopened] +>>>>>>> 37ec88c (Disable IT tests (for now)) jobs: lint: @@ -28,9 +35,12 @@ jobs: - name: Sync dependencies run: uv sync --dev +<<<<<<< HEAD - name: Install Ansible Galaxy collections run: ansible-galaxy install -r requirements.yml +======= +>>>>>>> 37ec88c (Disable IT tests (for now)) - name: YAML lint run: yamllint . diff --git a/config.sops.yml b/config.sops.yml index 636306a..43fd1c7 100644 --- a/config.sops.yml +++ b/config.sops.yml @@ -3,6 +3,7 @@ # ================================================== # Recursively merges itself with the unencrypted # variables in this file +<<<<<<< HEAD # Add this flag when running the playbook: # -e sops_file=config.sops.yml # ================================================== @@ -14,6 +15,17 @@ dotfiles_secrets: git: email: ENC[AES256_GCM,data:utnhj+BNEf2PY0Ac+y89JYYMwI7VqMzYhIXubtlULvgp8yT3tWpFxkKAGw==,iv:xc23TQXhp6EOPXazZR8Rjh4vFccXPBAB94oGkXyyIqg=,tag:6y+FSKORxBNr2BIHwb6Xgg==,type:str] signing_key: ENC[AES256_GCM,data:UWfSnN3ECfgErbHL/V0+Ag==,iv:E1ukvftoEOUZ0hlzHr9kEV2MQVbgKxl+VZRE66Sjwtk=,tag:NERv2hNd3bqYjTbQCIpuhQ==,type:str] +======= +sops_file: config.sops.yml +# ================================================== +# Role: dotfiles +# ================================================== +dotfiles_secrets_src: ENC[AES256_GCM,data:YeVwiPjKPpC7f3/bOldKf8pshF8TxscT6g==,iv:GBx5OyEtwSeV+JP43xvER7hlV1TpXQO/5A7gcJ8+VYs=,tag:rrHpEZhdp3KCdyJkFpzh0w==,type:str] +dotfiles_secrets: + git: + email: ENC[AES256_GCM,data:+aCz6zdPrlgifCXbAgNK6IbL/ePVz7ib5QGa6s39XumDeYzOTWfzY6jDBg==,iv:ZGoBY0P6eqhJUoMOt09MTgrh9VAknpbTmY2h2wHV8qg=,tag:ji53Gj60pbdpEP/bNU7VaA==,type:str] + signing_key: ENC[AES256_GCM,data:9V744hYXxgt5a5f2RwwdUg==,iv:xeQ0uPLf7hMup2HNgsPwq3pcrYfeTLho5EkAF2NIoRY=,tag:k42hRcc22UbV8W0ZfpQskg==,type:str] +>>>>>>> 37ec88c (Disable IT tests (for now)) # ================================================== # Role: geerlingguy.mac.homebrew # - docs: https://github.com/geerlingguy/ansible-collection-mac/blob/master/roles/homebrew/README.md @@ -43,7 +55,10 @@ homebrew_installed_packages: - git - gnupg - pinentry-mac +<<<<<<< HEAD - sops +======= +>>>>>>> 37ec88c (Disable IT tests (for now)) # Kubernetes / Cloud / DevOps - ansible - argocd @@ -164,7 +179,10 @@ python_uv_versions: [] python_uv_tools: - ansible - black +<<<<<<< HEAD - pre-commit +======= +>>>>>>> 37ec88c (Disable IT tests (for now)) - firefly-cli - isort - versioneer @@ -373,7 +391,10 @@ macos_add_adobe_hosts: true # Role: ide # ================================================== ide_vscode_extensions: +<<<<<<< HEAD - Anan.jetbrains-darcula-theme +======= +>>>>>>> 37ec88c (Disable IT tests (for now)) - github.copilot - github.copilot-chat - github.vscode-github-actions @@ -390,6 +411,7 @@ sops: - recipient: age1n2g0g2z9jdgnqx826e8d0d78y8z0lc7ngdadm3jw9gzpxj2nf5rs0hm6p6 enc: | -----BEGIN AGE ENCRYPTED FILE----- +<<<<<<< HEAD YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4SmFVdzM2WDR4MmxxSFlG UWdDUzM5R0RzRkgzQXZvUGhzVmF4TU9mSmhjCkxlU2ZWWGhYS1ZpM3BHZHp3d01v Y1Azb3lYdjJyTzdhRVZJSmVsTlpST3MKLS0tIGgvcG4vbGNVd3RiS1ZOTFUxNFpE @@ -399,4 +421,15 @@ sops: lastmodified: "2026-01-27T00:08:14Z" mac: ENC[AES256_GCM,data:4GWBPHWZzzbK+RW/hvJ7KsWhJS1kt4uVQPQyrU++JWNAynjvKupXL4ggraWPHA5bzxj7t3Yh0w5BAw26Mjncg6TQKM9X5rsIrqax5SaGq4Ym3og12ChbciErXEHAeSw5eNbWbej1JIfji0NLImVQypGJ4pYDfvQD9x2mqRhet0o=,iv:s60huC9tjr19rvZly3TzhDuRowJ+F+OMeaCzWjNkr+Y=,tag:sVJg7X4pUc2Hq4xbN04dqw==,type:str] encrypted_regex: ^(dotfiles_auth_home|dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ +======= + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUeTVvQUM5TDM3NGljYm9u + a3hYSmYrYUtRQlo1U3N3cnZTUlk4elMxNm1BCnFQeTJJVkdpNm5VeEREOTExNXpT + OW1YUDlkb3lKdmZBRU1TVDVEd1o0ODQKLS0tIDFSak5ISk9XUkNOdUVvMXlpS2Ur + SjlORWhPZWFtT0NubC95WlZhT1p5T3MKADyhh7HtyyH/46ypcQNb1qES1ilHjLkE + qY7/YPalK8FWXZ/wLwjVguczAkhRe6LuSTBsfghgkVhXtt9nUidgMA== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2026-01-25T12:50:19Z" + mac: ENC[AES256_GCM,data:9sWTIonuFM7JCvruaBRvCh5XkVWJYfGYlEbWKuvltw3fuLxc4yn5FSb/pxvbZKyqK2AgoZj1HOzPcR76hCLfzbZbUwDU0rN06R/ysVdEwAIcNIrkP7pQeLfCShlXD00y5+piQgc7nsk/Zc9eg7PM1/uGX+FNfiXygczGOx7W/ec=,iv:/ousGrLbomSp6uEVkrHFcxerZcVsj++WNhF2WWvoWlo=,tag:0DmX9VgQGGeOCD4x1OK4HA==,type:str] + encrypted_regex: ^(dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ +>>>>>>> 37ec88c (Disable IT tests (for now)) version: 3.11.0 From cde0adc0a306ae56406239c48320c0cf63ef4142 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:43:15 +0000 Subject: [PATCH 06/17] Updated configs --- .github/workflows/lint.yml | 4 ++++ .sops.yaml | 3 +++ README.md | 3 +++ config.sops.yml | 17 +++++++++++++++-- config.work.sops.yml | 15 +++++++++++++++ main.yml | 1 - 6 files changed, 40 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 72d6b77..3866eb0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,6 @@ name: Lint +<<<<<<< HEAD <<<<<<< HEAD on: # yamllint disable-line rule:truthy workflow_dispatch: @@ -9,6 +10,9 @@ on: # yamllint disable-line rule:truthy types: [submitted] ======= on: +======= +on: # yamllint disable-line rule:truthy +>>>>>>> 2439371 (Updated configs) workflow_dispatch: pull_request: types: [opened, synchronize, reopened] diff --git a/.sops.yaml b/.sops.yaml index 7c55d2a..f33b581 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -15,4 +15,7 @@ creation_rules: >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) key_groups: - age: [age1n2g0g2z9jdgnqx826e8d0d78y8z0lc7ngdadm3jw9gzpxj2nf5rs0hm6p6] + - path_regex: "config.work.sops.yml" + key_groups: + - age: [age1n2g0g2z9jdgnqx826e8d0d78y8z0lc7ngdadm3jw9gzpxj2nf5rs0hm6p6] - age: age1n2g0g2z9jdgnqx826e8d0d78y8z0lc7ngdadm3jw9gzpxj2nf5rs0hm6p6 diff --git a/README.md b/README.md index 3d7c82a..92b0635 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,9 @@ ansible-galaxy install -r requirements.yml ```bash export SOPS_AGE_KEY_FILE= ansible-playbook main.yml --ask-become-pass + +# If passing a sops encrypted vars +ansible-playbook main.yml -e sops_file= --ask-become-pass ``` --- diff --git a/config.sops.yml b/config.sops.yml index 43fd1c7..485e169 100644 --- a/config.sops.yml +++ b/config.sops.yml @@ -4,6 +4,7 @@ # Recursively merges itself with the unencrypted # variables in this file <<<<<<< HEAD +<<<<<<< HEAD # Add this flag when running the playbook: # -e sops_file=config.sops.yml # ================================================== @@ -17,6 +18,10 @@ dotfiles_secrets: signing_key: ENC[AES256_GCM,data:UWfSnN3ECfgErbHL/V0+Ag==,iv:E1ukvftoEOUZ0hlzHr9kEV2MQVbgKxl+VZRE66Sjwtk=,tag:NERv2hNd3bqYjTbQCIpuhQ==,type:str] ======= sops_file: config.sops.yml +======= +# Add this flag when running the playbook: +# -e sops_file=config.sops.yml +>>>>>>> 2439371 (Updated configs) # ================================================== # Role: dotfiles # ================================================== @@ -55,10 +60,14 @@ homebrew_installed_packages: - git - gnupg - pinentry-mac +<<<<<<< HEAD <<<<<<< HEAD - sops ======= >>>>>>> 37ec88c (Disable IT tests (for now)) +======= + - sops +>>>>>>> 2439371 (Updated configs) # Kubernetes / Cloud / DevOps - ansible - argocd @@ -179,10 +188,14 @@ python_uv_versions: [] python_uv_tools: - ansible - black +<<<<<<< HEAD <<<<<<< HEAD - pre-commit ======= >>>>>>> 37ec88c (Disable IT tests (for now)) +======= + - pre-commit +>>>>>>> 2439371 (Updated configs) - firefly-cli - isort - versioneer @@ -428,8 +441,8 @@ sops: SjlORWhPZWFtT0NubC95WlZhT1p5T3MKADyhh7HtyyH/46ypcQNb1qES1ilHjLkE qY7/YPalK8FWXZ/wLwjVguczAkhRe6LuSTBsfghgkVhXtt9nUidgMA== -----END AGE ENCRYPTED FILE----- - lastmodified: "2026-01-25T12:50:19Z" - mac: ENC[AES256_GCM,data:9sWTIonuFM7JCvruaBRvCh5XkVWJYfGYlEbWKuvltw3fuLxc4yn5FSb/pxvbZKyqK2AgoZj1HOzPcR76hCLfzbZbUwDU0rN06R/ysVdEwAIcNIrkP7pQeLfCShlXD00y5+piQgc7nsk/Zc9eg7PM1/uGX+FNfiXygczGOx7W/ec=,iv:/ousGrLbomSp6uEVkrHFcxerZcVsj++WNhF2WWvoWlo=,tag:0DmX9VgQGGeOCD4x1OK4HA==,type:str] + lastmodified: "2026-01-26T10:41:06Z" + mac: ENC[AES256_GCM,data:y5T9If+axZ93zVj8UQS5xUQAMRTBjqPhO8AtTKJ433uZKixXUwlRUfxc1HpKO2N970Q6YV8oh/tpo/y6i7ASRqhZ4z5YSIJvIp1zvoHWHnpkD4Tb/q18wkMubaA2CqJCd+OEGbWASLzrVPcZA7Hychf/gFPDFwVHXbCA6OXWLos=,iv:IXrSzWkSBy0SmSzh3XMXhTmRkdwgWV3cvacJYSj+S3Y=,tag:tyPM9HIqKIRtmsaelPyWoA==,type:str] encrypted_regex: ^(dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ >>>>>>> 37ec88c (Disable IT tests (for now)) version: 3.11.0 diff --git a/config.work.sops.yml b/config.work.sops.yml index 3035aa4..1044087 100644 --- a/config.work.sops.yml +++ b/config.work.sops.yml @@ -8,7 +8,10 @@ #ENC[AES256_GCM,data:hjcyMCansc4bGbqQxJM9z1kkKhnIOIOttlhXiHKEMYzVmNSs1vl+rMxsRzOTx08pyLf2,iv:6M/Itf6ZKjCZRsDDFLr64NaZBC0vXsKB7pA6YqXmVFI=,tag:5yHtB5E586XNtkhOe1sdpQ==,type:comment] #ENC[AES256_GCM,data:J17exn6sKZviCWXxK5G9,iv:5siNx0sfSkcBo8SmuhVAvAiLkpuQtqfOVQLd6w6Y6LE=,tag:aVXj7hKTC98pP40ZRUu8Eg==,type:comment] #ENC[AES256_GCM,data:hjcyMCansc4bGbqQxJM9z1kkKhnIOIOttlhXiHKEMYzVmNSs1vl+rMxsRzOTx08pyLf2,iv:6M/Itf6ZKjCZRsDDFLr64NaZBC0vXsKB7pA6YqXmVFI=,tag:5yHtB5E586XNtkhOe1sdpQ==,type:comment] +<<<<<<< HEAD dotfiles_auth_home_name: ENC[AES256_GCM,data:lDBrFtY=,iv:fr6Jr7GHdvAg57r5UOVGJMoN3SYhPRdm2Tj1kI4eYX8=,tag:JGTXihfNqA3lPkU5EbZb9g==,type:str] +======= +>>>>>>> 2439371 (Updated configs) dotfiles_secrets: git: email: ENC[AES256_GCM,data:RspmyRq4nIfHtyjxYdO5YcVv,iv:YQjzHUnIwRQ+CyeNL3R4Gm+zLEu7zzcynn1cquiTKxQ=,tag:vma3cF1I8xbLIw+AexH3PA==,type:str] @@ -255,7 +258,10 @@ macos_ini_properties: null #ENC[AES256_GCM,data:8oIZSQElQrAhuQ==,iv:j4I6ZCQzTUa04nxkGYhBcLebqx9QXjehRyOh9tHKGFo=,tag:C/BtgnETp7v9jbt2jC+HtQ==,type:comment] #ENC[AES256_GCM,data:hjcyMCansc4bGbqQxJM9z1kkKhnIOIOttlhXiHKEMYzVmNSs1vl+rMxsRzOTx08pyLf2,iv:6M/Itf6ZKjCZRsDDFLr64NaZBC0vXsKB7pA6YqXmVFI=,tag:5yHtB5E586XNtkhOe1sdpQ==,type:comment] ide_vscode_extensions: +<<<<<<< HEAD - ENC[AES256_GCM,data:Jj0hdSjasMDGu8Si7iXIvXYDG0DDIf1TnOYO7w==,iv:v/ArO+aENF0jAckVeiMwpA6lqTGlVG83PhFmADgAiWY=,tag:FUskdGeRfh1b1slRnJItvQ==,type:str] +======= +>>>>>>> 2439371 (Updated configs) - ENC[AES256_GCM,data:1stsb8X/wV1DkJIB1ik=,iv:npzfLxVHSYzatv2OPm0ndHwWH7jAgbAm9kywdXsqYV8=,tag:I+8lPgdE+DPIDV42Ptr9Iw==,type:str] - ENC[AES256_GCM,data:JFSqDzl/yGWwOzTRsZpghT6wLA==,iv:yLF1y5dG8ibXweH6gcKnAWPTu5YTFkc3qmqW5WfjWJk=,tag:SgAzo+zTLSlFG3O/sZqVVg==,type:str] - ENC[AES256_GCM,data:Y9dQfTZ3UAAtYZgbqNO/atN3XN3kNlLQ1RR8hQ==,iv:5c9adQro3KJ/cjOzhrxfSlTFk0MYHqK85tBHe1MDItE=,tag:fJTwWBnFxN3B7g9RbKHyyA==,type:str] @@ -263,7 +269,11 @@ ide_vscode_extensions: - ENC[AES256_GCM,data:VBqoeN/FLC3KUjbaZbeXGEY=,iv:wQRutX6srS6otju1rYK5HIgpfNv1m2j7AqKoCq3v+Jg=,tag:yPwJegVJzQvlkhKE6cP6lA==,type:str] - ENC[AES256_GCM,data:TbwKxe07x0Ha/WpjBiYKuw==,iv:1dcMVNMxciN+idM/pYoROJAf/bdRxq3PxjTm2cNJQ80=,tag:MBj8r6Z9YB37ZG/+GDnYRw==,type:str] - ENC[AES256_GCM,data:b/sSnEHnWsrwK5TSj8XGCVaq,iv:pn5i99AHQMeUF4g4guI+0n37Jv6V07xJ8yuEEPekXoY=,tag:8oCVUQfwEmYU95j9YK0gtg==,type:str] +<<<<<<< HEAD - ENC[AES256_GCM,data:XhpjblfMjV36Wjs1JEUQAfzBNriCtA==,iv:DwAq8daqDwvEGh8UkpX8QqKU35sfey8KuZBaaM/OeKA=,tag:h41U7ejs4LMfaAeXgBh6GA==,type:str] +======= + - ENC[AES256_GCM,data:hMOoYZqLgxdUKey5IkZiP83ML+N6l51lnbwInLiiIA==,iv:14qA/ellib2oLkuyU4+xONG61G1Bib04LlKsQyfCWzk=,tag:aYt/UeJudng1e6jdNt6uwQ==,type:str] +>>>>>>> 2439371 (Updated configs) - ENC[AES256_GCM,data:qQ9L3wjJ4yHXHdqe26ED1pkBEeb8rW5F+jUjO5WF,iv:Amj6o3jO6jUM7oZ6oMrypd1CvZJAoWsTSEfrSGMYqUY=,tag:Hiitv1de2KCzPB2/D0ofAQ==,type:str] sops: age: @@ -276,7 +286,12 @@ sops: ckZ0ZFprZnhRMmJ2TXNCOVJRam1xNVUK+YjMpjIPt0FJXurXmfREgeF9N187wRJt lHCEd6yyW8Lhbo+lbhybgvmJpy4zz16X2TfLAr9FGtPzJy66vnDv1A== -----END AGE ENCRYPTED FILE----- +<<<<<<< HEAD lastmodified: "2026-01-26T19:30:13Z" mac: ENC[AES256_GCM,data:yETMY2opUxfvx2y+F0NIQls8yJNE96B2Kk/itZGnWfEp3FSciuJ4j8jA/NRbY4KiCAB4HRDgNYrvKIbFLA0CaKuTT3tE4PQDd6izdI0uHKYA+KWjTvzw0jxMg/lE/tfYBrJF1mfAWgLoA/yJSJa5dh3GKRm+PfmM8lh1FCgjalI=,iv:HqlExk2mcdFix8uPnfp9qpz8RDVWTEbEfU7qHiDzWsA=,tag:rNHFkfy35TbOjqvmzOA6KQ==,type:str] +======= + lastmodified: "2026-01-25T15:27:16Z" + mac: ENC[AES256_GCM,data:lO9ZgGtcqnCXhehy3bMdb8pj9ePcUduz080JU9K/ARBAvneAx1XaVY40gyxDL6/NQ/EjpduOLOcP+OQaicFvj9K/X84RadvpA3BW+YcBaoeGjVIoE9t7qukE/WUbcvn5hNfz+P2/XuelI//SsdE+Yb1qr4U5n6GbUer2EUKy930=,iv:jGtBLbjNlrvj9vhQ14kyxTAXqypNjFkO13rbClm9yy0=,tag:L5opJ63rCPnRJcz9cNw9Qw==,type:str] +>>>>>>> 2439371 (Updated configs) unencrypted_suffix: _unencrypted version: 3.11.0 diff --git a/main.yml b/main.yml index fb2e820..9dd02a6 100644 --- a/main.yml +++ b/main.yml @@ -6,7 +6,6 @@ vars_files: - config.default.yml - - config.sops.yml # Can't be loaded with -e @config.sops.yml, because precedence would be higher than set_fact pre_tasks: - name: Python interpreter From 1672c0e382a9148794e71921e0d3830f89bc7ef1 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:20:46 +0000 Subject: [PATCH 07/17] Dotfiles installation for gnupg --- .sops.yaml | 4 +++ config.sops.yml | 21 ++++++++++++++ config.work.sops.yml | 17 +++++++++++ dotfiles/git/config.j2 | 6 ++++ dotfiles/gnupg/gpg-agent.conf | 5 ++++ dotfiles/vscode/settings.json | 23 ++++++++++++++- dotfiles/zsh/.zshenv | 48 -------------------------------- dotfiles/zsh/.zshrc | 16 +++++++++++ dotfiles/zsh/aliases.zsh | 37 ++++++++++++++++++++++++ roles/dotfiles/defaults/main.yml | 4 +++ roles/dotfiles/tasks/install.yml | 4 +++ roles/dotfiles/tasks/links.yml | 44 +++++++++++++++++++++++++++-- roles/dotfiles/tasks/main.yml | 5 ++++ 13 files changed, 182 insertions(+), 52 deletions(-) delete mode 100644 dotfiles/zsh/.zshenv diff --git a/.sops.yaml b/.sops.yaml index f33b581..bdeb5ba 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -2,6 +2,7 @@ creation_rules: - path_regex: "config.sops.yml" <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD encrypted_regex: ^(dotfiles_auth_home|dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ key_groups: @@ -13,6 +14,9 @@ creation_rules: ======= encrypted_regex: ^(dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= + encrypted_regex: ^(dotfiles_auth_home|dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) key_groups: - age: [age1n2g0g2z9jdgnqx826e8d0d78y8z0lc7ngdadm3jw9gzpxj2nf5rs0hm6p6] - path_regex: "config.work.sops.yml" diff --git a/config.sops.yml b/config.sops.yml index 485e169..2bfdfa2 100644 --- a/config.sops.yml +++ b/config.sops.yml @@ -12,6 +12,7 @@ # ================================================== dotfiles_auth_home: ENC[AES256_GCM,data:UM3lDorFJ+TbUVc=,iv:NxZZtldyZMhYvtwttdagt9XzlANyd+8OYCtWcx6xaMQ=,tag:OmBSTNVAIOV/DYA0BNVQFw==,type:str] dotfiles_secrets_src: ENC[AES256_GCM,data:TQDNo2oTU15/lqcUiuBC0LL3E+mOY0ThMQ==,iv:ctPgOi2JMo6DNXpja1NV1wIP9veVqHKziD/LX6Ts6dI=,tag:zGdmqMJTR/V09UIig8SJXw==,type:str] +<<<<<<< HEAD dotfiles_secrets: git: email: ENC[AES256_GCM,data:utnhj+BNEf2PY0Ac+y89JYYMwI7VqMzYhIXubtlULvgp8yT3tWpFxkKAGw==,iv:xc23TQXhp6EOPXazZR8Rjh4vFccXPBAB94oGkXyyIqg=,tag:6y+FSKORxBNr2BIHwb6Xgg==,type:str] @@ -31,6 +32,12 @@ dotfiles_secrets: email: ENC[AES256_GCM,data:+aCz6zdPrlgifCXbAgNK6IbL/ePVz7ib5QGa6s39XumDeYzOTWfzY6jDBg==,iv:ZGoBY0P6eqhJUoMOt09MTgrh9VAknpbTmY2h2wHV8qg=,tag:ji53Gj60pbdpEP/bNU7VaA==,type:str] signing_key: ENC[AES256_GCM,data:9V744hYXxgt5a5f2RwwdUg==,iv:xeQ0uPLf7hMup2HNgsPwq3pcrYfeTLho5EkAF2NIoRY=,tag:k42hRcc22UbV8W0ZfpQskg==,type:str] >>>>>>> 37ec88c (Disable IT tests (for now)) +======= +dotfiles_secrets: + git: + email: ENC[AES256_GCM,data:utnhj+BNEf2PY0Ac+y89JYYMwI7VqMzYhIXubtlULvgp8yT3tWpFxkKAGw==,iv:xc23TQXhp6EOPXazZR8Rjh4vFccXPBAB94oGkXyyIqg=,tag:6y+FSKORxBNr2BIHwb6Xgg==,type:str] + signing_key: ENC[AES256_GCM,data:DVR2TH+WKDCNMvAB3ZWQyg==,iv:6pLPczRa7JfP5e5LSQ3rhmWRxDJ+xhg2xMrOv0QHdNc=,tag:MpNlDHseyxL2EK236f54aw==,type:str] +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) # ================================================== # Role: geerlingguy.mac.homebrew # - docs: https://github.com/geerlingguy/ansible-collection-mac/blob/master/roles/homebrew/README.md @@ -404,10 +411,14 @@ macos_add_adobe_hosts: true # Role: ide # ================================================== ide_vscode_extensions: +<<<<<<< HEAD <<<<<<< HEAD - Anan.jetbrains-darcula-theme ======= >>>>>>> 37ec88c (Disable IT tests (for now)) +======= + - Anan.jetbrains-darcula-theme +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) - github.copilot - github.copilot-chat - github.vscode-github-actions @@ -425,11 +436,15 @@ sops: enc: | -----BEGIN AGE ENCRYPTED FILE----- <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4SmFVdzM2WDR4MmxxSFlG UWdDUzM5R0RzRkgzQXZvUGhzVmF4TU9mSmhjCkxlU2ZWWGhYS1ZpM3BHZHp3d01v Y1Azb3lYdjJyTzdhRVZJSmVsTlpST3MKLS0tIGgvcG4vbGNVd3RiS1ZOTFUxNFpE QVJaRmNIS3pkeFZJMTYwenhyemJ2Z1EKO0sv8VtyfEsuN51R3fR+6rkkrTbdvZjG 07jWmJjRDoYmQrle5ERGKf9PJRiUFPo9ztvWs+9j009Iw6rSJrAW+Q== +<<<<<<< HEAD -----END AGE ENCRYPTED FILE----- lastmodified: "2026-01-27T00:08:14Z" mac: ENC[AES256_GCM,data:4GWBPHWZzzbK+RW/hvJ7KsWhJS1kt4uVQPQyrU++JWNAynjvKupXL4ggraWPHA5bzxj7t3Yh0w5BAw26Mjncg6TQKM9X5rsIrqax5SaGq4Ym3og12ChbciErXEHAeSw5eNbWbej1JIfji0NLImVQypGJ4pYDfvQD9x2mqRhet0o=,iv:s60huC9tjr19rvZly3TzhDuRowJ+F+OMeaCzWjNkr+Y=,tag:sVJg7X4pUc2Hq4xbN04dqw==,type:str] @@ -445,4 +460,10 @@ sops: mac: ENC[AES256_GCM,data:y5T9If+axZ93zVj8UQS5xUQAMRTBjqPhO8AtTKJ433uZKixXUwlRUfxc1HpKO2N970Q6YV8oh/tpo/y6i7ASRqhZ4z5YSIJvIp1zvoHWHnpkD4Tb/q18wkMubaA2CqJCd+OEGbWASLzrVPcZA7Hychf/gFPDFwVHXbCA6OXWLos=,iv:IXrSzWkSBy0SmSzh3XMXhTmRkdwgWV3cvacJYSj+S3Y=,tag:tyPM9HIqKIRtmsaelPyWoA==,type:str] encrypted_regex: ^(dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ >>>>>>> 37ec88c (Disable IT tests (for now)) +======= + -----END AGE ENCRYPTED FILE----- + lastmodified: "2026-01-26T23:20:02Z" + mac: ENC[AES256_GCM,data:chmGc/kMsFpBHeNUbSVltN2MAM/YB9qXLKLwTp27f6UUenlVULVq+LGhjMit5olgLm3IKhWSqZVdI7U7mq38JTiel/s0YnZOBAaiFe4RRhD7sExhRhGV9MimsS1j8Y/Lk3ObVOa93LTmCIvB7tR0zs4oPvwiT8yqcDzZ8mPoGas=,iv:feDzO4WeJscpnxLjS5eOoeUb53qsQrwS4r6D0QBqWYg=,tag:jCJTx9Cyta4ZmTlutYoeww==,type:str] + encrypted_regex: ^(dotfiles_auth_home|dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) version: 3.11.0 diff --git a/config.work.sops.yml b/config.work.sops.yml index 1044087..882a57a 100644 --- a/config.work.sops.yml +++ b/config.work.sops.yml @@ -9,9 +9,13 @@ #ENC[AES256_GCM,data:J17exn6sKZviCWXxK5G9,iv:5siNx0sfSkcBo8SmuhVAvAiLkpuQtqfOVQLd6w6Y6LE=,tag:aVXj7hKTC98pP40ZRUu8Eg==,type:comment] #ENC[AES256_GCM,data:hjcyMCansc4bGbqQxJM9z1kkKhnIOIOttlhXiHKEMYzVmNSs1vl+rMxsRzOTx08pyLf2,iv:6M/Itf6ZKjCZRsDDFLr64NaZBC0vXsKB7pA6YqXmVFI=,tag:5yHtB5E586XNtkhOe1sdpQ==,type:comment] <<<<<<< HEAD +<<<<<<< HEAD dotfiles_auth_home_name: ENC[AES256_GCM,data:lDBrFtY=,iv:fr6Jr7GHdvAg57r5UOVGJMoN3SYhPRdm2Tj1kI4eYX8=,tag:JGTXihfNqA3lPkU5EbZb9g==,type:str] ======= >>>>>>> 2439371 (Updated configs) +======= +dotfiles_auth_home_name: ENC[AES256_GCM,data:lDBrFtY=,iv:fr6Jr7GHdvAg57r5UOVGJMoN3SYhPRdm2Tj1kI4eYX8=,tag:JGTXihfNqA3lPkU5EbZb9g==,type:str] +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) dotfiles_secrets: git: email: ENC[AES256_GCM,data:RspmyRq4nIfHtyjxYdO5YcVv,iv:YQjzHUnIwRQ+CyeNL3R4Gm+zLEu7zzcynn1cquiTKxQ=,tag:vma3cF1I8xbLIw+AexH3PA==,type:str] @@ -258,10 +262,14 @@ macos_ini_properties: null #ENC[AES256_GCM,data:8oIZSQElQrAhuQ==,iv:j4I6ZCQzTUa04nxkGYhBcLebqx9QXjehRyOh9tHKGFo=,tag:C/BtgnETp7v9jbt2jC+HtQ==,type:comment] #ENC[AES256_GCM,data:hjcyMCansc4bGbqQxJM9z1kkKhnIOIOttlhXiHKEMYzVmNSs1vl+rMxsRzOTx08pyLf2,iv:6M/Itf6ZKjCZRsDDFLr64NaZBC0vXsKB7pA6YqXmVFI=,tag:5yHtB5E586XNtkhOe1sdpQ==,type:comment] ide_vscode_extensions: +<<<<<<< HEAD <<<<<<< HEAD - ENC[AES256_GCM,data:Jj0hdSjasMDGu8Si7iXIvXYDG0DDIf1TnOYO7w==,iv:v/ArO+aENF0jAckVeiMwpA6lqTGlVG83PhFmADgAiWY=,tag:FUskdGeRfh1b1slRnJItvQ==,type:str] ======= >>>>>>> 2439371 (Updated configs) +======= + - ENC[AES256_GCM,data:Jj0hdSjasMDGu8Si7iXIvXYDG0DDIf1TnOYO7w==,iv:v/ArO+aENF0jAckVeiMwpA6lqTGlVG83PhFmADgAiWY=,tag:FUskdGeRfh1b1slRnJItvQ==,type:str] +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) - ENC[AES256_GCM,data:1stsb8X/wV1DkJIB1ik=,iv:npzfLxVHSYzatv2OPm0ndHwWH7jAgbAm9kywdXsqYV8=,tag:I+8lPgdE+DPIDV42Ptr9Iw==,type:str] - ENC[AES256_GCM,data:JFSqDzl/yGWwOzTRsZpghT6wLA==,iv:yLF1y5dG8ibXweH6gcKnAWPTu5YTFkc3qmqW5WfjWJk=,tag:SgAzo+zTLSlFG3O/sZqVVg==,type:str] - ENC[AES256_GCM,data:Y9dQfTZ3UAAtYZgbqNO/atN3XN3kNlLQ1RR8hQ==,iv:5c9adQro3KJ/cjOzhrxfSlTFk0MYHqK85tBHe1MDItE=,tag:fJTwWBnFxN3B7g9RbKHyyA==,type:str] @@ -269,11 +277,15 @@ ide_vscode_extensions: - ENC[AES256_GCM,data:VBqoeN/FLC3KUjbaZbeXGEY=,iv:wQRutX6srS6otju1rYK5HIgpfNv1m2j7AqKoCq3v+Jg=,tag:yPwJegVJzQvlkhKE6cP6lA==,type:str] - ENC[AES256_GCM,data:TbwKxe07x0Ha/WpjBiYKuw==,iv:1dcMVNMxciN+idM/pYoROJAf/bdRxq3PxjTm2cNJQ80=,tag:MBj8r6Z9YB37ZG/+GDnYRw==,type:str] - ENC[AES256_GCM,data:b/sSnEHnWsrwK5TSj8XGCVaq,iv:pn5i99AHQMeUF4g4guI+0n37Jv6V07xJ8yuEEPekXoY=,tag:8oCVUQfwEmYU95j9YK0gtg==,type:str] +<<<<<<< HEAD <<<<<<< HEAD - ENC[AES256_GCM,data:XhpjblfMjV36Wjs1JEUQAfzBNriCtA==,iv:DwAq8daqDwvEGh8UkpX8QqKU35sfey8KuZBaaM/OeKA=,tag:h41U7ejs4LMfaAeXgBh6GA==,type:str] ======= - ENC[AES256_GCM,data:hMOoYZqLgxdUKey5IkZiP83ML+N6l51lnbwInLiiIA==,iv:14qA/ellib2oLkuyU4+xONG61G1Bib04LlKsQyfCWzk=,tag:aYt/UeJudng1e6jdNt6uwQ==,type:str] >>>>>>> 2439371 (Updated configs) +======= + - ENC[AES256_GCM,data:XhpjblfMjV36Wjs1JEUQAfzBNriCtA==,iv:DwAq8daqDwvEGh8UkpX8QqKU35sfey8KuZBaaM/OeKA=,tag:h41U7ejs4LMfaAeXgBh6GA==,type:str] +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) - ENC[AES256_GCM,data:qQ9L3wjJ4yHXHdqe26ED1pkBEeb8rW5F+jUjO5WF,iv:Amj6o3jO6jUM7oZ6oMrypd1CvZJAoWsTSEfrSGMYqUY=,tag:Hiitv1de2KCzPB2/D0ofAQ==,type:str] sops: age: @@ -286,6 +298,7 @@ sops: ckZ0ZFprZnhRMmJ2TXNCOVJRam1xNVUK+YjMpjIPt0FJXurXmfREgeF9N187wRJt lHCEd6yyW8Lhbo+lbhybgvmJpy4zz16X2TfLAr9FGtPzJy66vnDv1A== -----END AGE ENCRYPTED FILE----- +<<<<<<< HEAD <<<<<<< HEAD lastmodified: "2026-01-26T19:30:13Z" mac: ENC[AES256_GCM,data:yETMY2opUxfvx2y+F0NIQls8yJNE96B2Kk/itZGnWfEp3FSciuJ4j8jA/NRbY4KiCAB4HRDgNYrvKIbFLA0CaKuTT3tE4PQDd6izdI0uHKYA+KWjTvzw0jxMg/lE/tfYBrJF1mfAWgLoA/yJSJa5dh3GKRm+PfmM8lh1FCgjalI=,iv:HqlExk2mcdFix8uPnfp9qpz8RDVWTEbEfU7qHiDzWsA=,tag:rNHFkfy35TbOjqvmzOA6KQ==,type:str] @@ -293,5 +306,9 @@ sops: lastmodified: "2026-01-25T15:27:16Z" mac: ENC[AES256_GCM,data:lO9ZgGtcqnCXhehy3bMdb8pj9ePcUduz080JU9K/ARBAvneAx1XaVY40gyxDL6/NQ/EjpduOLOcP+OQaicFvj9K/X84RadvpA3BW+YcBaoeGjVIoE9t7qukE/WUbcvn5hNfz+P2/XuelI//SsdE+Yb1qr4U5n6GbUer2EUKy930=,iv:jGtBLbjNlrvj9vhQ14kyxTAXqypNjFkO13rbClm9yy0=,tag:L5opJ63rCPnRJcz9cNw9Qw==,type:str] >>>>>>> 2439371 (Updated configs) +======= + lastmodified: "2026-01-26T19:30:13Z" + mac: ENC[AES256_GCM,data:yETMY2opUxfvx2y+F0NIQls8yJNE96B2Kk/itZGnWfEp3FSciuJ4j8jA/NRbY4KiCAB4HRDgNYrvKIbFLA0CaKuTT3tE4PQDd6izdI0uHKYA+KWjTvzw0jxMg/lE/tfYBrJF1mfAWgLoA/yJSJa5dh3GKRm+PfmM8lh1FCgjalI=,iv:HqlExk2mcdFix8uPnfp9qpz8RDVWTEbEfU7qHiDzWsA=,tag:rNHFkfy35TbOjqvmzOA6KQ==,type:str] +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) unencrypted_suffix: _unencrypted version: 3.11.0 diff --git a/dotfiles/git/config.j2 b/dotfiles/git/config.j2 index 4def3b7..cea34b5 100644 --- a/dotfiles/git/config.j2 +++ b/dotfiles/git/config.j2 @@ -15,6 +15,9 @@ [push] autoSetupRemote = true <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) [alias] rebase-dance = "!f() { \ upstream=$(git remote show origin | awk '/HEAD branch/ {print $NF}'); \ @@ -35,5 +38,8 @@ fi; \ echo '✅ Rebase dance complete!'; \ }; f" +<<<<<<< HEAD ======= >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) diff --git a/dotfiles/gnupg/gpg-agent.conf b/dotfiles/gnupg/gpg-agent.conf index 56325d8..7c2ff79 100644 --- a/dotfiles/gnupg/gpg-agent.conf +++ b/dotfiles/gnupg/gpg-agent.conf @@ -1,8 +1,13 @@ pinentry-program /opt/homebrew/bin/pinentry-mac <<<<<<< HEAD +<<<<<<< HEAD default-cache-ttl 2592000 # 1 month max-cache-ttl 2592000 # 1 month ======= default-cache-ttl 0 max-cache-ttl 0 >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= +default-cache-ttl 2592000 # 1 month +max-cache-ttl 2592000 # 1 month +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) diff --git a/dotfiles/vscode/settings.json b/dotfiles/vscode/settings.json index 384e1d4..848ea70 100644 --- a/dotfiles/vscode/settings.json +++ b/dotfiles/vscode/settings.json @@ -1,9 +1,13 @@ { "explorer.confirmDragAndDrop": false, +<<<<<<< HEAD <<<<<<< HEAD "files.autoSave": "onFocusChange", ======= >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= + "files.autoSave": "onFocusChange", +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) "files.exclude": { "**/.git": false }, @@ -14,6 +18,9 @@ "git.enableCommitSigning": true, "security.workspace.trust.untrustedFiles": "open", <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) "terminal.integrated.cursorBlinking": true, "terminal.integrated.cursorStyle": "line", "terminal.integrated.cursorWidth": 2, @@ -24,32 +31,46 @@ "window.title": "${activeRepositoryName}", "window.zoomLevel": 1, "window.zoomPerWindow": false, +<<<<<<< HEAD ======= "window.zoomLevel": 2, "workbench.iconTheme": "vscode-icons", "files.autoSave": "onFocusChange", "workbench.colorTheme": "Default Dark+", >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) "workbench.colorCustomizations": { "editorCursor.foreground": "#ff0000", "editorMultiCursor.primary.foreground": "#ff0000", "editorMultiCursor.secondary.foreground": "#ff8000", <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) "editor.findMatchHighlightBackground": "#dba80daa", "editor.findMatchHighlightForeground": "#000000", "editor.findMatchBackground": "#0ddb10aa", "editor.findMatchForeground": "#000000", +<<<<<<< HEAD "terminalCursor.foreground": "#ff0000" }, "workbench.colorTheme": "JetBrains Darcula Theme", "workbench.iconTheme": "vscode-icons", "workbench.tree.indent": 16 ======= +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) "terminalCursor.foreground": "#ff0000" - }, +<<<<<<< HEAD "terminal.integrated.cursorStyle": "line", "terminal.integrated.cursorBlinking": true, "terminal.integrated.cursorWidth": 2 >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= + "workbench.colorTheme": "JetBrains Darcula Theme", + "workbench.iconTheme": "vscode-icons", + "workbench.tree.indent": 16 +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) } diff --git a/dotfiles/zsh/.zshenv b/dotfiles/zsh/.zshenv deleted file mode 100644 index bd002b4..0000000 --- a/dotfiles/zsh/.zshenv +++ /dev/null @@ -1,48 +0,0 @@ -# ~/.zshenv -# Essential environment variables for Zsh and tools. -# Sourced by all shells (login/non-login, interactive/non-interactive). -# Do NOT put aliases, prompts, or commands that produce output here. -# -# The following lines need to be placed in /etc/zshenv -# export ZDOTDIR=$HOME/.config/zsh -# echo ". $ZDOTDIR/.zshenv" - -# ─────────── XDG Base Directory Specification ─────────── -export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.local/cache}" -export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" -export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-$HOME/.local/run}" -export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" -export XDG_BIN_HOME="${XDG_BIN_HOME:-$HOME/.local/bin}" - -# ─────────── Zsh ─────────── -export ZDOTDIR="$XDG_CONFIG_HOME/zsh" -export ZSH="$XDG_DATA_HOME/oh-my-zsh" -export HISTFILE="$XDG_STATE_HOME/zsh/history" - -# ─────────── General ─────────── -export EDITOR="nano" -export LESSHISTFILE="$XDG_STATE_HOME/less/history" - -# ─────────── uv ─────────── -export UV_NATIVE_TLS=true -export UV_VENV_SEED=true - -# ─────────── Pyenv ─────────── -export PYENV_ROOT="$XDG_DATA_HOME/pyenv" - -# ─────────── GPG ─────────── -export GNUPGHOME="$HOME/.auth/gnupg" - -# ─────────── Docker ─────────── -export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker" - -# ─────────── Kubernetes ─────────── -export KUBECONFIG="$HOME/.auth/kube/config" -export KUBE_EDITOR="nano" - -# ─────────── Ansible ─────────── -export ANSIBLE_HOME="$XDG_DATA_HOME/ansible" - -# ─────────── OCI CLI ─────────── -export OCI_CLI_CONFIG_FILE="$HOME/.auth/oci/config" diff --git a/dotfiles/zsh/.zshrc b/dotfiles/zsh/.zshrc index e61c8c9..3b8c235 100644 --- a/dotfiles/zsh/.zshrc +++ b/dotfiles/zsh/.zshrc @@ -7,6 +7,7 @@ export ZSH="$XDG_DATA_HOME/oh-my-zsh" COMPLETION_WAITING_DOTS="true" zstyle ':omz:update' frequency 15 <<<<<<< HEAD +<<<<<<< HEAD plugins=(aliases alias-finder) [ -f "$ZSH/oh-my-zsh.sh" ] && source "$ZSH/oh-my-zsh.sh" @@ -17,11 +18,20 @@ zstyle ':omz:plugins:alias-finder' autoload yes ======= plugins=(git) +======= +plugins=(aliases alias-finder) +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) [ -f "$ZSH/oh-my-zsh.sh" ] && source "$ZSH/oh-my-zsh.sh" +# ─────────── plugins:alias-finder ─────────── +zstyle ':omz:plugins:alias-finder' autoload yes + # ─────────── Pure Prompt ─────────── +<<<<<<< HEAD fpath+=("$(brew --prefix)/share/zsh/site-functions") >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) autoload -U promptinit; promptinit prompt pure @@ -43,8 +53,14 @@ zstyle :prompt:pure:user color 242 zstyle :prompt:pure:user:root color default zstyle :prompt:pure:virtualenv show yes <<<<<<< HEAD +<<<<<<< HEAD # ─────────── Aliases ─────────── source $ZDOTDIR/aliases.zsh ======= >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= + +# ─────────── Aliases ─────────── +source $ZDOTDIR/aliases.zsh +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) diff --git a/dotfiles/zsh/aliases.zsh b/dotfiles/zsh/aliases.zsh index f311e1c..cc3aa99 100644 --- a/dotfiles/zsh/aliases.zsh +++ b/dotfiles/zsh/aliases.zsh @@ -7,20 +7,29 @@ alias cdd="cd ~/Desktop" alias cdh="cd ~" command -v eza >/dev/null && alias v="eza -lah" || alias v="ls -lah" +<<<<<<< HEAD <<<<<<< HEAD # ─────────── Tools ─────────── alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts" ======= >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= +# ─────────── Tools ─────────── +alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts" + +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) # ─────────── Kubernetes ─────────── alias k="kubectl" export do="--dry-run=client -oyaml" export now="--grace-period=0 --force" <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) alias kn="kubectl config set-context --current --namespace" alias ka="kubectl apply -f" alias kc="kubectl create" @@ -28,6 +37,7 @@ alias kr="kubectl run" alias kg="kubectl get" alias kd="kubectl describe" <<<<<<< HEAD +<<<<<<< HEAD alias kdel="kubectl delete" alias kdebug="kubectl run --rm -i --restart=Never" alias hi="helm install --update" @@ -58,3 +68,30 @@ gcmp() { gcm "$@" && git push ; } alias kdebug="kubectl run --rm -i --restart=Never" alias kubeseal="kubeseal --controller-name=sealed-secrets --controller-namespace=utils" >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= +alias kdel="kubectl delete" +alias kdebug="kubectl run --rm -i --restart=Never" +alias hi="helm install --update" +alias hdel="helm install --update" + +# ─────────── Docker ─────────── +alias d="docker" +alias dc="docker compose" +alias dcu="docker compose up" +alias dcud="docker compose up -d" +alias dcd="docker compose down" + +# ─────────── Git ───────────" +alias g="git" +alias gs="git status" +alias ga="git add" +alias gp="git push" +alias gl="git log --oneline --graph --decorate" +alias gco="git checkout" +alias gcb="git checkout -b" +alias gpl="git pull" +alias gst="git stash" +alias gsta="git stash apply" +gc() { git commit -m "$*"; } +gcmp() { gcm "$@" && git push ; } +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) diff --git a/roles/dotfiles/defaults/main.yml b/roles/dotfiles/defaults/main.yml index 43f7d73..986f473 100644 --- a/roles/dotfiles/defaults/main.yml +++ b/roles/dotfiles/defaults/main.yml @@ -6,10 +6,14 @@ dotfiles_use_links: true dotfiles_links_vscode_settings_dir: "{{ lookup('env', 'HOME') }}/Library/Application Support/Code/User" <<<<<<< HEAD +<<<<<<< HEAD dotfiles_auth_home: "{{ lookup('env', 'HOME') }}/.secrets" ======= dotfiles_links_vscode_settings_src: "{{ XDG_BASE_DIRS.XDG_CONFIG_HOME ~ '/vscode' }}" >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= +dotfiles_auth_home: "{{ lookup('env', 'HOME') }}/.secrets" +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) # XDG Base Directory Specification (https://specifications.freedesktop.org/basedir/latest/) XDG_BASE_DIRS: # noqa var-naming[pattern] diff --git a/roles/dotfiles/tasks/install.yml b/roles/dotfiles/tasks/install.yml index 07b0bd7..80b2714 100644 --- a/roles/dotfiles/tasks/install.yml +++ b/roles/dotfiles/tasks/install.yml @@ -75,11 +75,15 @@ {{ XDG_BASE_DIRS.XDG_CONFIG_HOME ~ '/' ~ (item.path | dirname | regex_replace('^' + dotfiles_dir + '/','')) ~ '/' ~ +<<<<<<< HEAD <<<<<<< HEAD (item.path | basename | regex_replace('\.j2$', '')) ======= (item.path | basename | regex_replace('\\.j2$','')) >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= + (item.path | basename | regex_replace('\.j2$', '')) +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) }} mode: "0644" loop: "{{ dotfiles_templates }}" diff --git a/roles/dotfiles/tasks/links.yml b/roles/dotfiles/tasks/links.yml index e307d46..5dbe6bc 100644 --- a/roles/dotfiles/tasks/links.yml +++ b/roles/dotfiles/tasks/links.yml @@ -6,6 +6,9 @@ mode: "0755" <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) - name: Build list of VS Code files for symlinking set_fact: dotfiles_vscode_files: >- @@ -21,6 +24,7 @@ loop: "{{ dotfiles_found.files | selectattr('path', 'search', '(^|/)vscode(/|$)') | list }}" loop_control: label: "{{ item.path }}" +<<<<<<< HEAD - name: Symlink VS Code config files file: @@ -66,14 +70,48 @@ file_type: "{{ 'link' if dotfiles_use_links is truthy else 'file' }}" recurse: false register: dotfiles_vscode_files +======= +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) - name: Symlink VS Code config files file: - src: "{{ item.path }}" - dest: "{{ dotfiles_links_vscode_settings_dir }}/{{ item.path | basename }}" + src: "{{ item.src }}" + dest: "{{ item.dest }}" state: link force: true - loop: "{{ dotfiles_vscode_files.files }}" + loop: "{{ dotfiles_vscode_files }}" loop_control: +<<<<<<< HEAD label: "{{ item.path | basename }}" >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= + label: "{{ item.basename }}" + +- name: Find GNUPG config files + set_fact: + dotfiles_gnupg_files: >- + {{ (dotfiles_gnupg_files | default([])) + + [{ + 'src': XDG_BASE_DIRS.XDG_CONFIG_HOME ~ '/' ~ (item.path | regex_replace('^' + dotfiles_dir + '/', '')), + 'dest': dotfiles_auth_home ~ '/' ~ (item.path | regex_replace('^' + dotfiles_dir + '/', '')), + 'basename': item.path | basename + }]}} + loop: >- + {{ + dotfiles_found.files + | selectattr('path', 'search', '(^|/)gnupg(/|$)') + | list + }} + loop_control: + label: "{{ item.path }}" + +- name: Symlink GNUPG config files + file: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + state: link + force: true + loop: "{{ dotfiles_gnupg_files }}" + loop_control: + label: "{{ item.basename }}" +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) diff --git a/roles/dotfiles/tasks/main.yml b/roles/dotfiles/tasks/main.yml index b33b9fc..1e1b004 100644 --- a/roles/dotfiles/tasks/main.yml +++ b/roles/dotfiles/tasks/main.yml @@ -2,6 +2,7 @@ - name: Install dotfiles include_tasks: install.yml +<<<<<<< HEAD <<<<<<< HEAD - name: Link dotfiles that cannot be used from XDG_CONFIG_HOME include_tasks: links.yml @@ -9,6 +10,10 @@ # - name: Link dotfiles that cannot be used from XDG_CONFIG_HOME # include_tasks: links.yml >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= +- name: Link dotfiles that cannot be used from XDG_CONFIG_HOME + include_tasks: links.yml +>>>>>>> 4dc2d0a (Dotfiles installation for gnupg) # - name: Append extra block to .zshrc # blockinfile: From 13e81208f7bfc1c86dc5cf9806af7e0e4efcefb9 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:30:49 +0000 Subject: [PATCH 08/17] Update bootstrap script --- README.md | 5 ++++- bootstrap.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 92b0635..703ecfc 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,10 @@ This method is ideal if you want a **fully automated setup**. It will: **Run:** ```bash -curl -fsSL https://raw.githubusercontent.com/afonsoc12/ready-set-develop/main/bootstrap.zsh | SOPS_AGE_KEY_FILE= zsh - +curl -sSL https://raw.githubusercontent.com/afonsoc12/ready-set-develop/main/bootstrap.sh | SOPS_AGE_KEY_FILE= zsh -s -- + +# With sops encrypted config +curl -sSL https://raw.githubusercontent.com/afonsoc12/ready-set-develop/main/bootstrap.sh | SOPS_AGE_KEY_FILE= zsh -s -- -e sops_file= ``` ### Step-by-step Installation diff --git a/bootstrap.sh b/bootstrap.sh index e333864..1e2f0d2 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -3,6 +3,7 @@ set -euo pipefail # ----------------------------- <<<<<<< HEAD +<<<<<<< HEAD # Defaults # ----------------------------- RSD_REPO_URL="${RSD_REPO_URL:-https://github.com/afonsoc12/ready-set-develop.git}" @@ -20,19 +21,34 @@ RSD_SOPS_FILE="${RSD_SOPS_FILE:-}" ======= # Configuration +======= +# Defaults +>>>>>>> c5bbe95 (Update bootstrap script) # ----------------------------- REPO_URL="https://github.com/afonsoc12/ready-set-develop.git" -# XDG defaults export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" export ANSIBLE_HOME="$XDG_DATA_HOME/ansible" - REPO_DIR="$XDG_DATA_HOME/ready-set-develop" - -# Python user bin (3.*) export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH" +<<<<<<< HEAD >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) +======= +# Optional SOPS file +SOPS_FILE="" + +# ----------------------------- +# Parse flags +# ----------------------------- +while getopts ":e:" opt; do + case $opt in + e) SOPS_FILE="$OPTARG" ;; + *) echo "Usage: $0 [-e sops_file]"; exit 1 ;; + esac +done + +>>>>>>> c5bbe95 (Update bootstrap script) echo echo "🚀 Ready, Set, Develop — bootstrap" echo @@ -63,6 +79,7 @@ fi # ----------------------------- if [[ -z "${SOPS_AGE_KEY_FILE:-}" ]]; then echo "❌ SOPS_AGE_KEY_FILE is not set." +<<<<<<< HEAD <<<<<<< HEAD echo "Export your AGE key file before running:" echo " export SOPS_AGE_KEY_FILE=" @@ -72,26 +89,43 @@ if [[ -z "${SOPS_AGE_KEY_FILE:-}" ]]; then echo " export SOPS_AGE_KEY_FILE=" echo >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) +======= + echo "Export your AGE key file before running:" + echo " export SOPS_AGE_KEY_FILE=" +>>>>>>> c5bbe95 (Update bootstrap script) exit 1 fi if [[ ! -f "$SOPS_AGE_KEY_FILE" ]]; then +<<<<<<< HEAD <<<<<<< HEAD echo "❌ SOPS_AGE_KEY_FILE does not exist: $SOPS_AGE_KEY_FILE" ======= echo "❌ SOPS_AGE_KEY_FILE does not exist:" echo " $SOPS_AGE_KEY_FILE" >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) +======= + echo "❌ SOPS_AGE_KEY_FILE does not exist: $SOPS_AGE_KEY_FILE" +>>>>>>> c5bbe95 (Update bootstrap script) exit 1 fi echo "🔐 SOPS AGE key detected" +if [[ -n "$SOPS_FILE" ]]; then + if [[ ! -f "$SOPS_FILE" ]]; then + echo "❌ Provided SOPS file does not exist: $SOPS_FILE" + exit 1 + fi + echo "🗝 Using SOPS file: $SOPS_FILE" +fi + # ----------------------------- # 4. Ensure directories exist # ----------------------------- echo "📁 Ensuring directories exist" <<<<<<< HEAD +<<<<<<< HEAD mkdir -p "$XDG_DATA_HOME" "$RSD_ANSIBLE_HOME" ======= @@ -99,6 +133,9 @@ mkdir -p \ "$XDG_DATA_HOME" \ "$ANSIBLE_HOME" >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) +======= +mkdir -p "$XDG_DATA_HOME" "$ANSIBLE_HOME" +>>>>>>> c5bbe95 (Update bootstrap script) # ----------------------------- # 5. Install Ansible (user) @@ -153,12 +190,10 @@ fi # 8. Install Ansible requirements ======= if [[ ! -d "$REPO_DIR" ]]; then - echo "📥 Cloning ready-set-develop into:" - echo " $REPO_DIR" + echo "📥 Cloning ready-set-develop into: $REPO_DIR" git clone "$REPO_URL" "$REPO_DIR" else - echo "📂 Repository already exists:" - echo " $REPO_DIR" + echo "📂 Repository already exists: $REPO_DIR" fi cd "$REPO_DIR" @@ -181,6 +216,7 @@ echo echo "▶️ Running Ansible playbook" echo +<<<<<<< HEAD <<<<<<< HEAD ANSIBLE_CMD="ansible-playbook main.yml --ask-become-pass -v" [[ -n "$RSD_SOPS_FILE" ]] && ANSIBLE_CMD+=" -e sops_file=$RSD_SOPS_FILE" @@ -190,6 +226,12 @@ eval "$ANSIBLE_CMD" ansible-playbook main.yml --ask-become-pass -v >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) +======= +ANSIBLE_CMD="ansible-playbook main.yml --ask-become-pass -v" +[[ -n "$SOPS_FILE" ]] && ANSIBLE_CMD+=" -e sops_file=$SOPS_FILE" + +eval "$ANSIBLE_CMD" +>>>>>>> c5bbe95 (Update bootstrap script) echo echo "🎉 Ready, Set, Develop completed successfully" From b660a14f64120fbfef47a825f1a253eb2d9e91ec Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:34:05 +0000 Subject: [PATCH 09/17] Updated bootstrap script --- bootstrap.sh | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 1e2f0d2..b2bce86 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -32,10 +32,14 @@ export ANSIBLE_HOME="$XDG_DATA_HOME/ansible" REPO_DIR="$XDG_DATA_HOME/ready-set-develop" export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH" +<<<<<<< HEAD <<<<<<< HEAD >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) ======= # Optional SOPS file +======= +# Optional SOPS file (relative to repo) +>>>>>>> 39093e3 (Updated bootstrap script) SOPS_FILE="" # ----------------------------- @@ -75,7 +79,7 @@ else fi # ----------------------------- -# 3. SOPS check +# 3. SOPS AGE key check # ----------------------------- if [[ -z "${SOPS_AGE_KEY_FILE:-}" ]]; then echo "❌ SOPS_AGE_KEY_FILE is not set." @@ -112,14 +116,6 @@ fi echo "🔐 SOPS AGE key detected" -if [[ -n "$SOPS_FILE" ]]; then - if [[ ! -f "$SOPS_FILE" ]]; then - echo "❌ Provided SOPS file does not exist: $SOPS_FILE" - exit 1 - fi - echo "🗝 Using SOPS file: $SOPS_FILE" -fi - # ----------------------------- # 4. Ensure directories exist # ----------------------------- @@ -199,18 +195,37 @@ fi cd "$REPO_DIR" # ----------------------------- +<<<<<<< HEAD # 7. Install Ansible requirements >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) +======= +# 7. Optional SOPS file check +# ----------------------------- +if [[ -n "$SOPS_FILE" ]]; then + if [[ ! -f "$SOPS_FILE" ]]; then + echo "❌ Provided SOPS file does not exist in repo: $SOPS_FILE" + exit 1 + fi + echo "🗝 Using SOPS file: $SOPS_FILE" +fi + +# ----------------------------- +# 8. Install Ansible requirements +>>>>>>> 39093e3 (Updated bootstrap script) # ----------------------------- echo "📚 Installing Ansible Galaxy requirements" ansible-galaxy install -r requirements.yml # ----------------------------- <<<<<<< HEAD +<<<<<<< HEAD # 9. Run playbook ======= # 8. Run playbook >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) +======= +# 9. Run playbook +>>>>>>> 39093e3 (Updated bootstrap script) # ----------------------------- echo echo "▶️ Running Ansible playbook" From 5a094bf2aafaa4b4d49750d85338bc5342469734 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:37:03 +0000 Subject: [PATCH 10/17] Update bootstrap script --- bootstrap.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index b2bce86..43095f7 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -2,8 +2,6 @@ set -euo pipefail # ----------------------------- -<<<<<<< HEAD -<<<<<<< HEAD # Defaults # ----------------------------- RSD_REPO_URL="${RSD_REPO_URL:-https://github.com/afonsoc12/ready-set-develop.git}" @@ -196,16 +194,22 @@ cd "$REPO_DIR" # ----------------------------- <<<<<<< HEAD +<<<<<<< HEAD # 7. Install Ansible requirements >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) ======= # 7. Optional SOPS file check +======= +# 7. Optional SOPS file check (inside repo!) +>>>>>>> c078f01 (Update bootstrap script) # ----------------------------- if [[ -n "$SOPS_FILE" ]]; then - if [[ ! -f "$SOPS_FILE" ]]; then + if [[ ! -f "$REPO_DIR/$SOPS_FILE" ]]; then echo "❌ Provided SOPS file does not exist in repo: $SOPS_FILE" exit 1 fi + # Make path absolute inside repo + SOPS_FILE="$REPO_DIR/$SOPS_FILE" echo "🗝 Using SOPS file: $SOPS_FILE" fi From 2696d835a0041cf5bea05b6751950d2ebed8d803 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:52:11 +0000 Subject: [PATCH 11/17] Improve docs --- .cirrus.yml | 10 +++++++++ README.md | 3 +++ bootstrap.sh | 61 ++++++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 63 insertions(+), 11 deletions(-) create mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 0000000..b8ad2ab --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,10 @@ +task: + name: hello + macos_instance: + # can be a remote or a local virtual machine + image: ghcr.io/cirruslabs/macos-tahoe-base:latest + hello_script: + - echo "Hello from within a Tart VM!" + - echo "Here is my CPU info:" + - sysctl -n machdep.cpu.brand_string + - sleep 15 diff --git a/README.md b/README.md index 703ecfc..b2872aa 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ Dotfiles are now **first-class citizens** of this project. - Internet connection >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) +<<<<<<< HEAD ### 📁 Dotfiles Management Dotfiles are now **first-class citizens** of this project. @@ -82,6 +83,8 @@ Dotfiles are now **first-class citizens** of this project. - Approximately 30 minutes - Internet connection +======= +>>>>>>> 6e9a1ea (Improve docs) ## Environment Variables | Variable | Default | Description | diff --git a/bootstrap.sh b/bootstrap.sh index 43095f7..4185006 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -5,6 +5,7 @@ set -euo pipefail # Defaults # ----------------------------- RSD_REPO_URL="${RSD_REPO_URL:-https://github.com/afonsoc12/ready-set-develop.git}" +<<<<<<< HEAD export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" export RSD_ANSIBLE_HOME="${RSD_ANSIBLE_HOME:-$XDG_DATA_HOME/ansible}" @@ -24,12 +25,18 @@ RSD_SOPS_FILE="${RSD_SOPS_FILE:-}" >>>>>>> c5bbe95 (Update bootstrap script) # ----------------------------- REPO_URL="https://github.com/afonsoc12/ready-set-develop.git" +======= +>>>>>>> 6e9a1ea (Improve docs) export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" -export ANSIBLE_HOME="$XDG_DATA_HOME/ansible" -REPO_DIR="$XDG_DATA_HOME/ready-set-develop" +export RSD_ANSIBLE_HOME="${RSD_ANSIBLE_HOME:-$XDG_DATA_HOME/ansible}" + +# Repo defaults +RSD_REPO_DIR="${RSD_REPO_DIR:-$XDG_DATA_HOME/ready-set-develop}" + export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH" +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) @@ -49,6 +56,10 @@ while getopts ":e:" opt; do *) echo "Usage: $0 [-e sops_file]"; exit 1 ;; esac done +======= +# Optional SOPS file +RSD_SOPS_FILE="${RSD_SOPS_FILE:-}" +>>>>>>> 6e9a1ea (Improve docs) >>>>>>> c5bbe95 (Update bootstrap script) echo @@ -77,7 +88,7 @@ else fi # ----------------------------- -# 3. SOPS AGE key check +# 3. SOPS check # ----------------------------- if [[ -z "${SOPS_AGE_KEY_FILE:-}" ]]; then echo "❌ SOPS_AGE_KEY_FILE is not set." @@ -120,6 +131,7 @@ echo "🔐 SOPS AGE key detected" echo "📁 Ensuring directories exist" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD mkdir -p "$XDG_DATA_HOME" "$RSD_ANSIBLE_HOME" ======= @@ -130,6 +142,9 @@ mkdir -p \ ======= mkdir -p "$XDG_DATA_HOME" "$ANSIBLE_HOME" >>>>>>> c5bbe95 (Update bootstrap script) +======= +mkdir -p "$XDG_DATA_HOME" "$RSD_ANSIBLE_HOME" +>>>>>>> 6e9a1ea (Improve docs) # ----------------------------- # 5. Install Ansible (user) @@ -146,6 +161,7 @@ fi # 6. Clone repository # ----------------------------- <<<<<<< HEAD +<<<<<<< HEAD if [[ -d "$RSD_REPO_DIR" && "${RSD_FORCE_REPO:-false}" == "true" ]]; then echo "⚠️ RSD_FORCE_REPO=true, removing existing repo: $RSD_REPO_DIR" rm -rf "$RSD_REPO_DIR" @@ -188,13 +204,26 @@ if [[ ! -d "$REPO_DIR" ]]; then git clone "$REPO_URL" "$REPO_DIR" else echo "📂 Repository already exists: $REPO_DIR" +======= +if [[ -d "$RSD_REPO_DIR" && "${RSD_FORCE_REPO:-false}" == "true" ]]; then + echo "⚠️ RSD_FORCE_REPO=true, removing existing repo: $RSD_REPO_DIR" + rm -rf "$RSD_REPO_DIR" +>>>>>>> 6e9a1ea (Improve docs) +fi + +if [[ ! -d "$RSD_REPO_DIR" ]]; then + echo "📥 Cloning ready-set-develop into: $RSD_REPO_DIR" + git clone "$RSD_REPO_URL" "$RSD_REPO_DIR" +else + echo "📂 Repository already exists: $RSD_REPO_DIR" fi -cd "$REPO_DIR" +cd "$RSD_REPO_DIR" # ----------------------------- <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD # 7. Install Ansible requirements >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) ======= @@ -202,15 +231,25 @@ cd "$REPO_DIR" ======= # 7. Optional SOPS file check (inside repo!) >>>>>>> c078f01 (Update bootstrap script) +======= +# Checkout version if specified +>>>>>>> 6e9a1ea (Improve docs) +# ----------------------------- +if [[ -n "${RSD_REPO_VERSION:-}" ]]; then + echo "🔀 Checking out version: $RSD_REPO_VERSION" + git fetch --all + git checkout "$RSD_REPO_VERSION" +fi + +# ----------------------------- +# 7. SOPS file (inside repo) # ----------------------------- -if [[ -n "$SOPS_FILE" ]]; then - if [[ ! -f "$REPO_DIR/$SOPS_FILE" ]]; then - echo "❌ Provided SOPS file does not exist in repo: $SOPS_FILE" +if [[ -n "$RSD_SOPS_FILE" ]]; then + if [[ ! -f "$RSD_SOPS_FILE" ]]; then + echo "❌ Provided SOPS file does not exist inside repo: $RSD_SOPS_FILE" exit 1 fi - # Make path absolute inside repo - SOPS_FILE="$REPO_DIR/$SOPS_FILE" - echo "🗝 Using SOPS file: $SOPS_FILE" + echo "🗝 Using SOPS file: $RSD_SOPS_FILE" fi # ----------------------------- @@ -247,7 +286,7 @@ ansible-playbook main.yml --ask-become-pass -v >>>>>>> a7efc97 (Add bootstrap script, license and updated readme) ======= ANSIBLE_CMD="ansible-playbook main.yml --ask-become-pass -v" -[[ -n "$SOPS_FILE" ]] && ANSIBLE_CMD+=" -e sops_file=$SOPS_FILE" +[[ -n "$RSD_SOPS_FILE" ]] && ANSIBLE_CMD+=" -e sops_file=$RSD_SOPS_FILE" eval "$ANSIBLE_CMD" >>>>>>> c5bbe95 (Update bootstrap script) From 1201a36c153bc8f9499464b893a7cfda52864b13 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:54:41 +0000 Subject: [PATCH 12/17] Added gh aliases --- dotfiles/gh/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dotfiles/gh/config.yml b/dotfiles/gh/config.yml index 8920073..41a1d1b 100644 --- a/dotfiles/gh/config.yml +++ b/dotfiles/gh/config.yml @@ -6,11 +6,17 @@ prompt: enabled pager: cat aliases: <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> de4d691 (Added gh aliases) prc: pr create -f prcd: pr create -f --draft prdy: pr ready v: pr view --web +<<<<<<< HEAD ======= co: pr checkout ghw: pr view --web >>>>>>> c57576d (Merged dotfiles from afonsoc12/dotfiles) +======= +>>>>>>> de4d691 (Added gh aliases) From 683ea97a26948f713686a42cc0f7d201ac8d5e22 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Tue, 27 Jan 2026 00:17:21 +0000 Subject: [PATCH 13/17] Rolled GPG key --- config.sops.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config.sops.yml b/config.sops.yml index 2bfdfa2..f9d9db7 100644 --- a/config.sops.yml +++ b/config.sops.yml @@ -36,8 +36,12 @@ dotfiles_secrets: dotfiles_secrets: git: email: ENC[AES256_GCM,data:utnhj+BNEf2PY0Ac+y89JYYMwI7VqMzYhIXubtlULvgp8yT3tWpFxkKAGw==,iv:xc23TQXhp6EOPXazZR8Rjh4vFccXPBAB94oGkXyyIqg=,tag:6y+FSKORxBNr2BIHwb6Xgg==,type:str] +<<<<<<< HEAD signing_key: ENC[AES256_GCM,data:DVR2TH+WKDCNMvAB3ZWQyg==,iv:6pLPczRa7JfP5e5LSQ3rhmWRxDJ+xhg2xMrOv0QHdNc=,tag:MpNlDHseyxL2EK236f54aw==,type:str] >>>>>>> 4dc2d0a (Dotfiles installation for gnupg) +======= + signing_key: ENC[AES256_GCM,data:UWfSnN3ECfgErbHL/V0+Ag==,iv:E1ukvftoEOUZ0hlzHr9kEV2MQVbgKxl+VZRE66Sjwtk=,tag:NERv2hNd3bqYjTbQCIpuhQ==,type:str] +>>>>>>> b73e4a9 (Rolled GPG key) # ================================================== # Role: geerlingguy.mac.homebrew # - docs: https://github.com/geerlingguy/ansible-collection-mac/blob/master/roles/homebrew/README.md @@ -462,8 +466,8 @@ sops: >>>>>>> 37ec88c (Disable IT tests (for now)) ======= -----END AGE ENCRYPTED FILE----- - lastmodified: "2026-01-26T23:20:02Z" - mac: ENC[AES256_GCM,data:chmGc/kMsFpBHeNUbSVltN2MAM/YB9qXLKLwTp27f6UUenlVULVq+LGhjMit5olgLm3IKhWSqZVdI7U7mq38JTiel/s0YnZOBAaiFe4RRhD7sExhRhGV9MimsS1j8Y/Lk3ObVOa93LTmCIvB7tR0zs4oPvwiT8yqcDzZ8mPoGas=,iv:feDzO4WeJscpnxLjS5eOoeUb53qsQrwS4r6D0QBqWYg=,tag:jCJTx9Cyta4ZmTlutYoeww==,type:str] + lastmodified: "2026-01-27T00:08:14Z" + mac: ENC[AES256_GCM,data:4GWBPHWZzzbK+RW/hvJ7KsWhJS1kt4uVQPQyrU++JWNAynjvKupXL4ggraWPHA5bzxj7t3Yh0w5BAw26Mjncg6TQKM9X5rsIrqax5SaGq4Ym3og12ChbciErXEHAeSw5eNbWbej1JIfji0NLImVQypGJ4pYDfvQD9x2mqRhet0o=,iv:s60huC9tjr19rvZly3TzhDuRowJ+F+OMeaCzWjNkr+Y=,tag:sVJg7X4pUc2Hq4xbN04dqw==,type:str] encrypted_regex: ^(dotfiles_auth_home|dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ >>>>>>> 4dc2d0a (Dotfiles installation for gnupg) version: 3.11.0 From 3101c8aace95dd8d9472bc7d6067fd4edca92a4a Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Tue, 27 Jan 2026 00:20:15 +0000 Subject: [PATCH 14/17] git alias to show signature --- dotfiles/zsh/aliases.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles/zsh/aliases.zsh b/dotfiles/zsh/aliases.zsh index cc3aa99..d00997d 100644 --- a/dotfiles/zsh/aliases.zsh +++ b/dotfiles/zsh/aliases.zsh @@ -87,11 +87,12 @@ alias gs="git status" alias ga="git add" alias gp="git push" alias gl="git log --oneline --graph --decorate" +alias gls="gl --show-signature" alias gco="git checkout" alias gcb="git checkout -b" alias gpl="git pull" alias gst="git stash" alias gsta="git stash apply" -gc() { git commit -m "$*"; } +gcm() { git commit -m "$*"; } gcmp() { gcm "$@" && git push ; } >>>>>>> 4dc2d0a (Dotfiles installation for gnupg) From cb11e751ada93763721fd3700b2f9657d6050ce9 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Tue, 27 Jan 2026 00:25:21 +0000 Subject: [PATCH 15/17] fix ci --- .github/workflows/lint.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3866eb0..f0571d7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -39,12 +39,18 @@ jobs: - name: Sync dependencies run: uv sync --dev +<<<<<<< HEAD <<<<<<< HEAD - name: Install Ansible Galaxy collections run: ansible-galaxy install -r requirements.yml ======= >>>>>>> 37ec88c (Disable IT tests (for now)) +======= + - name: Install Ansible Galaxy collections + run: ansible-galaxy install -r requirements.yml + +>>>>>>> 5283b6c (fix ci) - name: YAML lint run: yamllint . From dbe7ecebc1e021a186f93db333b8123f6d502a32 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Tue, 27 Jan 2026 00:31:31 +0000 Subject: [PATCH 16/17] Disable CI on synchronize PR --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f0571d7..c27b2d4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,6 +8,7 @@ on: # yamllint disable-line rule:truthy types: [ready_for_review, reopened] # synchronize makes CI too chatt pull_request_review: types: [submitted] +<<<<<<< HEAD ======= on: ======= @@ -17,6 +18,8 @@ on: # yamllint disable-line rule:truthy pull_request: types: [opened, synchronize, reopened] >>>>>>> 37ec88c (Disable IT tests (for now)) +======= +>>>>>>> 509c33f (Disable CI on synchronize PR) jobs: lint: From 619dea367ed2936ad558cebacb657434e9c5ad70 Mon Sep 17 00:00:00 2001 From: Afonso Costa <20598780+afonsoc12@users.noreply.github.com> Date: Wed, 28 Jan 2026 13:45:48 +0000 Subject: [PATCH 17/17] Added p10k, removed pure --- README.md | 30 +- bootstrap.sh | 4 + config.sops.yml | 5 +- config.work.sops.yml | 16 +- dotfiles/zsh/.zshrc | 15 + dotfiles/zsh/p10k.zsh | 1711 ++++++++++++++++++++++++++++++++++ main.yml | 2 +- roles/ide/tasks/terminal.yml | 4 +- 8 files changed, 1762 insertions(+), 25 deletions(-) create mode 100644 dotfiles/zsh/p10k.zsh diff --git a/README.md b/README.md index b2872aa..c2acb7f 100644 --- a/README.md +++ b/README.md @@ -113,18 +113,20 @@ This method is ideal if you want a **fully automated setup**. It will: **Run:** -```bash -curl -sSL https://raw.githubusercontent.com/afonsoc12/ready-set-develop/main/bootstrap.sh | SOPS_AGE_KEY_FILE= zsh -s -- +```zsh +# Default values +SOPS_AGE_KEY_FILE=zsh -i <(curl -fsSL https://raw.githubusercontent.com/afonsoc12/ready-set-develop/master/bootstrap.sh ) +```zsh # With sops encrypted config -curl -sSL https://raw.githubusercontent.com/afonsoc12/ready-set-develop/main/bootstrap.sh | SOPS_AGE_KEY_FILE= zsh -s -- -e sops_file= +SOPS_AGE_KEY_FILE= RSD_SOPS_FILE=config.sops.yml zsh -i <(curl -fsSL https://raw.githubusercontent.com/afonsoc12/ready-set-develop/master/bootstrap.sh ) ``` ### Step-by-step Installation #### 1️⃣ Install Command Line Tools -```bash +```zsh xcode-select --install ``` @@ -132,34 +134,34 @@ Accept the license when prompted. #### 2️⃣ Set Environment Variables -```bash +```zsh export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH" export ANSIBLE_HOME="$HOME/.local/share/ansible" ``` #### 3️⃣ Install Ansible -```bash +```zsh /usr/bin/pip3 install --upgrade pip /usr/bin/pip3 install ansible ``` #### 4️⃣ Clone Repository -```bash +```zsh git clone https://github.com/afonsoc12/ready-set-develop.git cd ready-set-develop ``` #### 5️⃣ Install Ansible Requirements -```bash +```zsh ansible-galaxy install -r requirements.yml ``` #### 6️⃣ Run Playbook -```bash +```zsh export SOPS_AGE_KEY_FILE= ansible-playbook main.yml --ask-become-pass @@ -247,7 +249,7 @@ ansible-playbook main.yml -e sops_file= --ask-become-pass Run the full playbook: -```bash +```zsh ansible-playbook main.yml --ask-become-pass ``` @@ -257,7 +259,7 @@ ansible-playbook main.yml --ask-become-pass Override default settings: -```bash +```zsh ansible-playbook main.yml -e @myconfig.yml --ask-become-pass ``` @@ -277,14 +279,14 @@ Or replace `config.yml` with your own configuration file. This project uses [uv](https://docs.astral.sh/uv/) to manage Python dev dependencies and sync them. -```bash +```zsh uv sync --dev pre-commit install ``` #### 2️⃣ Activate virtual environment -```bash +```zsh source .venv/bin/activate ``` @@ -292,7 +294,7 @@ source .venv/bin/activate Before committing changes, run the following checks: -```bash +```zsh pre-commit run --all-files # OR diff --git a/bootstrap.sh b/bootstrap.sh index 4185006..afc0243 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -274,9 +274,13 @@ echo echo "▶️ Running Ansible playbook" echo +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD ANSIBLE_CMD="ansible-playbook main.yml --ask-become-pass -v" +======= +ANSIBLE_CMD="ansible-playbook main.yml --ask-become-pass" +>>>>>>> 0f5bfca (Added p10k, removed pure) [[ -n "$RSD_SOPS_FILE" ]] && ANSIBLE_CMD+=" -e sops_file=$RSD_SOPS_FILE" eval "$ANSIBLE_CMD" diff --git a/config.sops.yml b/config.sops.yml index f9d9db7..cb3b1d6 100644 --- a/config.sops.yml +++ b/config.sops.yml @@ -60,7 +60,6 @@ homebrew_installed_packages: - iftop - jq - make - - pure - rsync - tree - watch @@ -450,8 +449,8 @@ sops: 07jWmJjRDoYmQrle5ERGKf9PJRiUFPo9ztvWs+9j009Iw6rSJrAW+Q== <<<<<<< HEAD -----END AGE ENCRYPTED FILE----- - lastmodified: "2026-01-27T00:08:14Z" - mac: ENC[AES256_GCM,data:4GWBPHWZzzbK+RW/hvJ7KsWhJS1kt4uVQPQyrU++JWNAynjvKupXL4ggraWPHA5bzxj7t3Yh0w5BAw26Mjncg6TQKM9X5rsIrqax5SaGq4Ym3og12ChbciErXEHAeSw5eNbWbej1JIfji0NLImVQypGJ4pYDfvQD9x2mqRhet0o=,iv:s60huC9tjr19rvZly3TzhDuRowJ+F+OMeaCzWjNkr+Y=,tag:sVJg7X4pUc2Hq4xbN04dqw==,type:str] + lastmodified: "2026-01-28T13:29:16Z" + mac: ENC[AES256_GCM,data:cBNt+jvD8B+r1L/3pJjERdGi+0dyqQNHx8zYawLStU3YkcuFQJC80H17ZXgH0NGSHQjbIYLh7lgugKk9YTFPqV0gujEXhqGOqfc/Q2t0PJIbHdvYH78IwLoKeDft0JXqfdSouWRMJ852bXuwVNYay3vor2tEPeyJ7eyZNQeh4fc=,iv:sB4CbwwSzf/Nn72pIofA7h3NP28b/OukgpQThLZjTys=,tag:hg+VcW0T0Rw4OLFNXkOC6w==,type:str] encrypted_regex: ^(dotfiles_auth_home|dotfiles_repo|dotfiles_secrets_src|dotfiles_secrets)$ ======= YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUeTVvQUM5TDM3NGljYm9u diff --git a/config.work.sops.yml b/config.work.sops.yml index 882a57a..b1de4f6 100644 --- a/config.work.sops.yml +++ b/config.work.sops.yml @@ -10,16 +10,20 @@ #ENC[AES256_GCM,data:hjcyMCansc4bGbqQxJM9z1kkKhnIOIOttlhXiHKEMYzVmNSs1vl+rMxsRzOTx08pyLf2,iv:6M/Itf6ZKjCZRsDDFLr64NaZBC0vXsKB7pA6YqXmVFI=,tag:5yHtB5E586XNtkhOe1sdpQ==,type:comment] <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD dotfiles_auth_home_name: ENC[AES256_GCM,data:lDBrFtY=,iv:fr6Jr7GHdvAg57r5UOVGJMoN3SYhPRdm2Tj1kI4eYX8=,tag:JGTXihfNqA3lPkU5EbZb9g==,type:str] ======= >>>>>>> 2439371 (Updated configs) ======= dotfiles_auth_home_name: ENC[AES256_GCM,data:lDBrFtY=,iv:fr6Jr7GHdvAg57r5UOVGJMoN3SYhPRdm2Tj1kI4eYX8=,tag:JGTXihfNqA3lPkU5EbZb9g==,type:str] >>>>>>> 4dc2d0a (Dotfiles installation for gnupg) +======= +dotfiles_auth_home: ENC[AES256_GCM,data:Cp6MuHdLrZ7K/xg=,iv:RhjGae8t2CPDPu5YnUMWEfdQkCOsz7essZbGj9rTMxE=,tag:gPUVS8uiToyiNXKz0bfBXg==,type:str] +>>>>>>> 0f5bfca (Added p10k, removed pure) dotfiles_secrets: git: email: ENC[AES256_GCM,data:RspmyRq4nIfHtyjxYdO5YcVv,iv:YQjzHUnIwRQ+CyeNL3R4Gm+zLEu7zzcynn1cquiTKxQ=,tag:vma3cF1I8xbLIw+AexH3PA==,type:str] - signing_key: ENC[AES256_GCM,data:tPTOoEV6mcafvkh0GUmjnQ==,iv:wBORd5q/1quLCWDx2+xTrId/iriX98Og1H0JLKIkdwM=,tag:HxjvPMRUDJSL516JDUVwMA==,type:str] + signing_key: ENC[AES256_GCM,data:kqGn735hjzLorwbWj2ekwA==,iv:iIM25Y5yKDmxMi1DioJbfxc9H2nXpDxqslz8PECcKd0=,tag:8zsH0jymrWVtuZyIqCkmDA==,type:str] #ENC[AES256_GCM,data:hjcyMCansc4bGbqQxJM9z1kkKhnIOIOttlhXiHKEMYzVmNSs1vl+rMxsRzOTx08pyLf2,iv:6M/Itf6ZKjCZRsDDFLr64NaZBC0vXsKB7pA6YqXmVFI=,tag:5yHtB5E586XNtkhOe1sdpQ==,type:comment] #ENC[AES256_GCM,data:LjTPMALh4a8rzejQwIH0ETsu7LBg1h8rsje24MWAbA==,iv:SE99pKTkjxEwtKesugbYuDNi2eAXuqvPLXVXIrZWd64=,tag:y/U9Yz9BMfFZumA20hANTw==,type:comment] #ENC[AES256_GCM,data:BfUmhmMatg4tGxaVg1wxoCMfvw7utN5j9oMWrctbnRKU506M7VG4EdaaHladhNBX/miXrD2Da9FP307tT68bXUWubm2gOQeE1eWyG+Is+SR+YL5oB5wrLKPCBVrNrMO77DYkSWY=,iv:fN8k9KdnoIcZY80hOmvdiFzFfoCPyPF5kEtijThD4A4=,tag:cL22C2+1zhCweM9fxDbipQ==,type:comment] @@ -37,7 +41,7 @@ homebrew_installed_packages: - ENC[AES256_GCM,data:CZ52uCo=,iv:1lFHQNOoKtEKusUCLPRWFH002hjHR5tB+g1qE81+0cU=,tag:OluOz1EPNYPIrl2O3cTSig==,type:str] - ENC[AES256_GCM,data:HAs=,iv:96ql1VIDjJmpQt5gwDv3OEZDS4aGRo3BtYRRfOLE/IM=,tag:HzjdA2iwX605w2f9e4eeFw==,type:str] - ENC[AES256_GCM,data:iLTdeg==,iv:wSR7FzHMlumwRXpThb7LVUgopTBDVs0Ts5IKkFyOZ6E=,tag:qPxQI8Nntd6aTmdv+2gSrQ==,type:str] - - ENC[AES256_GCM,data:awwIbQ==,iv:68hdhYONhMPPhV+zt7Z2HTcYFucPy79yH0iPcd+TpVQ=,tag:szfiGH8Mr3sNoCWuANNfKA==,type:str] + - ENC[AES256_GCM,data:/tKYqz5at86uo5g/eg==,iv:a9QIQSZ6sTxfPjsLBl+8Ct/dJklYtS4AeCkPHc4266o=,tag:AeqYOGk88s1W8WhuoE3/xA==,type:str] - ENC[AES256_GCM,data:BXiWDKw=,iv:4Rem97o7gWZnSTewv023HEEbVVtxL2ViDFVVUDs1khw=,tag:4uv/rvR1d+9VdYKuCWbqRw==,type:str] - ENC[AES256_GCM,data:NUmMzw==,iv:sEhq1vlJiGACCx5hjIdFhqdQkwgJiZiUFM51gl/t3qA=,tag:0zxN2qpT0OFxVbyytOjl0g==,type:str] - ENC[AES256_GCM,data:8EjLBzQ=,iv:Oj/zF+Rxffm7pDEjIEkY0Hk2KDHV9bkpM72qYJ8sH+k=,tag:qx4vWGLbO0YIqFqwGSInNQ==,type:str] @@ -68,11 +72,8 @@ homebrew_cask_apps: - ENC[AES256_GCM,data:3wQiNJ1r3uev5op+et0=,iv:scB/9d0W2101oYjyqpRz8YUhuTgRXT8LBk4MkLSoI68=,tag:j2Xn6WHIK9H4rqeknoG7Xw==,type:str] - ENC[AES256_GCM,data:YpcdSu5W,iv:mHdRVXJYl175RFhRI1+r7DFszDW4E1dRnJP6oEp0xBk=,tag:VkcL+uFlvA9BDTrfsQ1s5Q==,type:str] - ENC[AES256_GCM,data:L2ymIZEihCG/c1FJVYMWXvae,iv:HSKXrPx3bfVCkwoGt7tCfGEoG2Z3mLeM3QBQwhp+dfQ=,tag:+SaR9lKf0fVf/YkTKUf8Hg==,type:str] - - ENC[AES256_GCM,data:E15x3Sdzfdy+swSDXHkUOA4xYj5dEYqiDgGB+TJ7,iv:cTH7hwlfVCIindgwuZP5Uf8n0/GHF/q2AooAROkzLmc=,tag:sx5mAwtur4HvdaMz42/tpw==,type:comment] - - ENC[AES256_GCM,data:OfV/wA==,iv:WTa9Skc3STmcbTyPuHV1b1vKYr/bCFXfDtvt4BP1jwo=,tag:KZdr/4QdWduQxrwYw1sCzQ==,type:str] - ENC[AES256_GCM,data:LWlezZTm8mZD2hiUNRbg4SOhrKiolLnohw==,iv:J1HoQ+CFCW4PqxDnT5ARy3o8FCwRrT47VEHkbnWSiW0=,tag:2fBq3O/sTTpPimxnFJ05RQ==,type:comment] - ENC[AES256_GCM,data:2NokIkJ2,iv:H+BaH8UFwtv8SCFxIxQ7onEQ4VSy0oaXWhjcVHkRQ1U=,tag:tCRmFw7BvV7HiUGnbba/oA==,type:str] - - ENC[AES256_GCM,data:68r6g1RgUTRtOQNyKw==,iv:PCmIWYTFHqm+ou/vA2sZwkaDSEeaWM0U8jnBB35C7qI=,tag:3R17WDpv9BbaIfZXp8C3Ig==,type:str] - ENC[AES256_GCM,data:/4HjPD4aKRvF,iv:ebaE29J3do9T11VdTPF/dLrdZ0sDjXBerGnwuSdfNS0=,tag:c3WvqGkXBW8Ij0n7DtZPKA==,type:str] - ENC[AES256_GCM,data:uWFqoI+UxrOXo6ACTM4j5N0=,iv:KshLl6XXtRBrGZC+pPNh64oNQQRmUZyF8LzAn95xqpU=,tag:78TW/n4FqBVbXDVhY1+LgQ==,type:str] - ENC[AES256_GCM,data:5r4H5GwgdGkU,iv:grpkrKesUF3tKIJRmq/clRBNlkeRhcoz0znNQkWcnQc=,tag:Fn3btnjdmDQIDFuTFvBCiQ==,type:str] @@ -299,6 +300,7 @@ sops: lHCEd6yyW8Lhbo+lbhybgvmJpy4zz16X2TfLAr9FGtPzJy66vnDv1A== -----END AGE ENCRYPTED FILE----- <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD lastmodified: "2026-01-26T19:30:13Z" mac: ENC[AES256_GCM,data:yETMY2opUxfvx2y+F0NIQls8yJNE96B2Kk/itZGnWfEp3FSciuJ4j8jA/NRbY4KiCAB4HRDgNYrvKIbFLA0CaKuTT3tE4PQDd6izdI0uHKYA+KWjTvzw0jxMg/lE/tfYBrJF1mfAWgLoA/yJSJa5dh3GKRm+PfmM8lh1FCgjalI=,iv:HqlExk2mcdFix8uPnfp9qpz8RDVWTEbEfU7qHiDzWsA=,tag:rNHFkfy35TbOjqvmzOA6KQ==,type:str] @@ -310,5 +312,9 @@ sops: lastmodified: "2026-01-26T19:30:13Z" mac: ENC[AES256_GCM,data:yETMY2opUxfvx2y+F0NIQls8yJNE96B2Kk/itZGnWfEp3FSciuJ4j8jA/NRbY4KiCAB4HRDgNYrvKIbFLA0CaKuTT3tE4PQDd6izdI0uHKYA+KWjTvzw0jxMg/lE/tfYBrJF1mfAWgLoA/yJSJa5dh3GKRm+PfmM8lh1FCgjalI=,iv:HqlExk2mcdFix8uPnfp9qpz8RDVWTEbEfU7qHiDzWsA=,tag:rNHFkfy35TbOjqvmzOA6KQ==,type:str] >>>>>>> 4dc2d0a (Dotfiles installation for gnupg) +======= + lastmodified: "2026-01-28T13:03:45Z" + mac: ENC[AES256_GCM,data:YP/s+cpI6IepKk+KvvpYgRznzF8Fs2ywK5F041ZC2g2fYs0rdhFrS3eZJMMacqt4SiFaQIwfI98tsQTmQOwlJnhjNZMx+0ujqebdc7Bh8x4WhAJDS/nVXpbTcLhyRTI6qbW9vV2Io+nriPfa1P97u510ZlrI112rHMew9A3CBXo=,iv:cpvwQmxAoN4Dnszi/v/WCG6kVlFHugRRHy9+A0m1Dhw=,tag:dkTYqNKJ1AVFQ7HWoAbSDg==,type:str] +>>>>>>> 0f5bfca (Added p10k, removed pure) unencrypted_suffix: _unencrypted version: 3.11.0 diff --git a/dotfiles/zsh/.zshrc b/dotfiles/zsh/.zshrc index 3b8c235..788ba8e 100644 --- a/dotfiles/zsh/.zshrc +++ b/dotfiles/zsh/.zshrc @@ -2,6 +2,14 @@ # Sourced by interactive shells only. # Set up aliases, functions, key bindings, prompt, and interactive tool features. +# ─────────── Powerlevel10k Instant Prompt Cache ─────────── +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + # ─────────── Oh My Zsh ─────────── export ZSH="$XDG_DATA_HOME/oh-my-zsh" COMPLETION_WAITING_DOTS="true" @@ -14,6 +22,7 @@ plugins=(aliases alias-finder) # ─────────── plugins:alias-finder ─────────── zstyle ':omz:plugins:alias-finder' autoload yes +<<<<<<< HEAD # ─────────── Pure Prompt ─────────── ======= plugins=(git) @@ -54,6 +63,12 @@ zstyle :prompt:pure:user:root color default zstyle :prompt:pure:virtualenv show yes <<<<<<< HEAD <<<<<<< HEAD +======= +# ─────────── Powerlevel10k Prompt ─────────── +# To customize prompt, run `p10k configure` or edit ~/.config/zsh/p10k.zsh. +source "$(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" +[[ ! -f ~/.config/zsh/p10k.zsh ]] || source ~/.config/zsh/p10k.zsh +>>>>>>> 0f5bfca (Added p10k, removed pure) # ─────────── Aliases ─────────── source $ZDOTDIR/aliases.zsh diff --git a/dotfiles/zsh/p10k.zsh b/dotfiles/zsh/p10k.zsh new file mode 100644 index 0000000..8349158 --- /dev/null +++ b/dotfiles/zsh/p10k.zsh @@ -0,0 +1,1711 @@ +# Generated by Powerlevel10k configuration wizard on 2026-01-27 at 17:43 GMT. +# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 26839. +# Wizard options: compatible, unicode, lean, 24h time, 2 lines, solid, no frame, +# lightest-ornaments, sparse, concise, instant_prompt=verbose. +# Type `p10k configure` to generate another config. +# +# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate +# your own config based on it. +# +# Tip: Looking for a nice color? Here's a one-liner to print colormap. +# +# for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh -o extended_glob + + # Unset all configuration options. This allows you to apply configuration changes without + # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. + unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' + + # Zsh >= 5.1 is required. + [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return + + # The list of segments shown on the left. Fill it with the most important segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + # os_icon # os identifier + dir # current directory + vcs # git status + # =========================[ Line #2 ]========================= + newline # \n + prompt_char # prompt symbol + ) + + # The list of segments shown on the right. Fill it with less important segments. + # Right prompt on the last prompt line (where you are typing your commands) gets + # automatically hidden when the input line reaches it. Right prompt above the + # last prompt line gets hidden if it would overlap with left prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + status # exit code of the last command + command_execution_time # duration of the last command + background_jobs # presence of background jobs + direnv # direnv status (https://direnv.net/) + asdf # asdf version manager (https://github.com/asdf-vm/asdf) + # virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) + anaconda # conda environment (https://conda.io/) + pyenv # python environment (https://github.com/pyenv/pyenv) + goenv # go environment (https://github.com/syndbg/goenv) + nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) + nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) + nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) + # node_version # node.js version + # go_version # go version (https://golang.org) + # rust_version # rustc version (https://www.rust-lang.org) + # dotnet_version # .NET version (https://dotnet.microsoft.com) + # php_version # php version (https://www.php.net/) + # laravel_version # laravel php framework version (https://laravel.com/) + # java_version # java version (https://www.java.com/) + # package # name@version from package.json (https://docs.npmjs.com/files/package.json) + rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) + rvm # ruby version from rvm (https://rvm.io) + fvm # flutter version management (https://github.com/leoafarias/fvm) + luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) + jenv # java version from jenv (https://github.com/jenv/jenv) + plenv # perl version from plenv (https://github.com/tokuhirom/plenv) + perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew) + phpenv # php version from phpenv (https://github.com/phpenv/phpenv) + scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) + haskell_stack # haskell version from stack (https://haskellstack.org/) + kubecontext # current kubernetes context (https://kubernetes.io/) + terraform # terraform workspace (https://www.terraform.io) + # terraform_version # terraform version (https://www.terraform.io) + aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) + aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) + azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) + gcloud # google cloud cli account and project (https://cloud.google.com/) + google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) + toolbox # toolbox name (https://github.com/containers/toolbox) + context # user@hostname + nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) + ranger # ranger shell (https://github.com/ranger/ranger) + nnn # nnn shell (https://github.com/jarun/nnn) + lf # lf shell (https://github.com/gokcehan/lf) + xplr # xplr shell (https://github.com/sayanarijit/xplr) + vim_shell # vim shell indicator (:sh) + midnight_commander # midnight commander shell (https://midnight-commander.org/) + nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) + chezmoi_shell # chezmoi shell (https://www.chezmoi.io/) + # vpn_ip # virtual private network indicator + # load # CPU load + # disk_usage # disk usage + # ram # free RAM + # swap # used swap + todo # todo items (https://github.com/todotxt/todo.txt-cli) + timewarrior # timewarrior tracking status (https://timewarrior.net/) + taskwarrior # taskwarrior task count (https://taskwarrior.org/) + per_directory_history # Oh My Zsh per-directory-history local/global indicator + # cpu_arch # CPU architecture + time # current time + # =========================[ Line #2 ]========================= + newline + # ip # ip address and bandwidth usage for a specified network interface + # public_ip # public IP address + # proxy # system-wide http/https/ftp proxy + battery # internal battery + # wifi # wifi speed + # example # example user-defined segment (see prompt_example function below) + ) + + # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. + typeset -g POWERLEVEL9K_MODE=compatible + # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid + # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. + typeset -g POWERLEVEL9K_ICON_PADDING=none + + # Basic style options that define the overall look of your prompt. You probably don't want to + # change them. + typeset -g POWERLEVEL9K_BACKGROUND= # transparent background + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol + + # When set to true, icons appear before content on both sides of the prompt. When set + # to false, icons go after content. If empty or not set, icons go before content in the left + # prompt and after content in the right prompt. + # + # You can also override it for a specific segment: + # + # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false + # + # Or for a specific segment in specific state: + # + # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false + typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true + + # Add an empty line before each prompt. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true + + # Connect left prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= + # Connect right prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= + + # The left end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + # The right end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= + + # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll + # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and + # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below. + typeset -g POWERLEVEL9K_SHOW_RULER=false + typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·' + typeset -g POWERLEVEL9K_RULER_FOREGROUND=244 + + # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─' + # to make it easier to see the alignment between left and right prompt and to separate prompt + # from command output. It serves the same purpose as ruler (see above) without increasing + # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false + # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact + # prompt. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='─' + if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then + # The color of the filler. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=244 + # Add a space between the end of left prompt and the filler. + typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' ' + # Add a space between the filler and the start of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' + # Start filler from the edge of the screen if there are no left segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' + # End filler on the edge of the screen if there are no right segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' + fi + + #################################[ os_icon: os identifier ]################################## + # OS identifier color. + typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= + # Custom icon. + # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' + + ################################[ prompt_char: prompt symbol ]################################ + # Green prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' + # Prompt symbol in overwrite vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true + # No line terminator if prompt_char is the last segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + # No line introducer if prompt_char is the first segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + + ##################################[ dir: current directory ]################################## + # Default current directory color. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=11 + # If directory is too long, shorten some of its segments to the shortest possible unique + # prefix. The shortened directory can be tab-completed to the original. + typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique + # Replace removed segment suffixes with this symbol. + typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= + # Color of the shortened directory segments. + typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=9 + # Color of the anchor directory segments. Anchor segments are never shortened. The first + # segment is always an anchor. + typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=11 + # Display anchor directory segments in bold. + typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true + # Don't shorten directories that contain any of these files. They are anchors. + local anchor_files=( + .bzr + .citc + .git + .hg + .node-version + .python-version + .go-version + .ruby-version + .lua-version + .java-version + .perl-version + .php-version + .tool-versions + .shorten_folder_marker + .svn + .terraform + CVS + Cargo.toml + composer.json + go.mod + package.json + stack.yaml + ) + typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" + # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains + # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is + # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) + # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers + # and other directories don't. + # + # Optionally, "first" and "last" can be followed by ":" where is an integer. + # This moves the truncation point to the right (positive offset) or to the left (negative offset) + # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" + # respectively. + typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false + # Don't shorten this many last directory segments. They are anchors. + typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 + # Shorten directory if it's longer than this even if there is space for it. The value can + # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, + # directory will be shortened only when prompt doesn't fit or when other parameters demand it + # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). + # If set to `0`, directory will always be shortened to its minimum length. + typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this + # many columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least + # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 + # If set to true, embed a hyperlink into the directory. Useful for quickly + # opening a directory in the file manager simply by clicking the link. + # Can also be handy when the directory is shortened, as it allows you to see + # the full directory that was used in previous commands. + typeset -g POWERLEVEL9K_DIR_HYPERLINK=false + + # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON + # and POWERLEVEL9K_DIR_CLASSES below. + typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 + + # The default icon shown next to non-writable and non-existent directories when + # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. + typeset -g POWERLEVEL9K_LOCK_ICON='∅' + + # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different + # directories. It must be an array with 3 * N elements. Each triplet consists of: + # + # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with + # extended_glob option enabled. + # 2. Directory class for the purpose of styling. + # 3. An empty string. + # + # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. + # + # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories + # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=( + # '~/work(|/*)' WORK '' + # '~(|/*)' HOME '' + # '*' DEFAULT '') + # + # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one + # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or + # WORK_NON_EXISTENT. + # + # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an + # option to define custom colors and icons for different directory classes. + # + # # Styling for WORK. + # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 + # + # # Styling for WORK_NOT_WRITABLE. + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 + # + # # Styling for WORK_NON_EXISTENT. + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39 + # + # If a styling parameter isn't explicitly defined for some class, it falls back to the classless + # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls + # back to POWERLEVEL9K_DIR_FOREGROUND. + # + typeset -g POWERLEVEL9K_DIR_CLASSES=() + + # Custom prefix. + # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin ' + + #####################################[ vcs: git status ]###################################### + # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=' ' + + # Untracked files icon. It's really a question mark, your font isn't broken. + # Change the value of this parameter to show a different icon. + typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' + + # Formatter for Git status. + # + # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # + # You can edit the function to customize how Git status looks. + # + # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: + # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. + function my_git_formatter() { + emulate -L zsh + + if [[ -n $P9K_CONTENT ]]; then + # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from + # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. + typeset -g my_git_format=$P9K_CONTENT + return + fi + + if (( $1 )); then + # Styling for up-to-date Git status. + local meta='%f' # default foreground + local clean='%76F' # green foreground + local modified='%178F' # yellow foreground + local untracked='%39F' # blue foreground + local conflicted='%196F' # red foreground + else + # Styling for incomplete and stale Git status. + local meta='%244F' # grey foreground + local clean='%244F' # grey foreground + local modified='%244F' # grey foreground + local untracked='%244F' # grey foreground + local conflicted='%244F' # grey foreground + fi + + local res + + if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then + local branch=${(V)VCS_STATUS_LOCAL_BRANCH} + # If local branch name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show local branch name in full without truncation, delete the next line. + (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line + res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" + fi + + if [[ -n $VCS_STATUS_TAG + # Show tag only if not on a branch. + # Tip: To always show tag, delete the next line. + && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line + ]]; then + local tag=${(V)VCS_STATUS_TAG} + # If tag name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show tag name in full without truncation, delete the next line. + (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line + res+="${meta}#${clean}${tag//\%/%%}" + fi + + # Display the current Git commit if there is no branch and no tag. + # Tip: To always display the current Git commit, delete the next line. + [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line + res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" + + # Show tracking branch name if it differs from local branch. + if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then + res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" + fi + + # Display "wip" if the latest commit's summary contains "wip" or "WIP". + if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then + res+=" ${modified}wip" + fi + + if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then + # ⇣42 if behind the remote. + (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " + (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then + # Tip: Uncomment the next line to display '=' if up to date with the remote. + # res+=" ${clean}=" + fi + + # ⇠42 if behind the push remote. + (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" + (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " + # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. + (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" + # *42 if have stashes. + (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" + # 'merge' if the repo is in an unusual state. + [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" + # ~42 if have merge conflicts. + (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" + # +42 if have staged changes. + (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" + # !42 if have unstaged changes. + (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" + # ?42 if have untracked files. It's really a question mark, your font isn't broken. + # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. + # Remove the next line if you don't want to see untracked files at all. + (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" + # "─" if the number of unstaged files is unknown. This can happen due to + # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower + # than the number of files in the Git index, or due to bash.showDirtyState being set to false + # in the repository config. The number of staged and untracked files may also be unknown + # in this case. + (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" + + typeset -g my_git_format=$res + } + functions -M my_git_formatter 2>/dev/null + + # Don't count the number of unstaged, untracked and conflicted files in Git repositories with + # more than this many files in the index. Negative value means infinity. + # + # If you are working in Git repositories with tens of millions of files and seeing performance + # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output + # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's + # config: `git config bash.showDirtyState false`. + typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + + # Disable the default Git status formatting. + typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true + # Install our own Git status formatter. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' + typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' + # Enable counters for staged, unstaged, etc. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 + + # Icon color. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 + typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 + # Custom icon. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon ' + + # Show status of repositories of these types. You can add svn and/or hg if you are + # using them. If you do, your prompt may become slow even when your current directory + # isn't in an svn or hg repository. + typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) + + # These settings are used for repositories other than Git or when gitstatusd fails and + # Powerlevel10k has to fall back to using vcs_info. + typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 + + ##########################[ status: exit code of the last command ]########################### + # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and + # style them independently from the regular OK and ERROR state. + typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true + + # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as + # it will signify success by turning green. + typeset -g POWERLEVEL9K_STATUS_OK=false + typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when some part of a pipe command fails but the overall exit status is zero. It may look + # like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as + # it will signify error by turning red. + typeset -g POWERLEVEL9K_STATUS_ERROR=false + typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='х' + + # Status when the last command was terminated by a signal. + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 + # Use terse signal names: "INT" instead of "SIGINT(2)". + typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='х' + + # Status when some part of a pipe command fails and the overall exit status is also non-zero. + # It may look like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='х' + + ###################[ command_execution_time: duration of the last command ]################### + # Show duration of the last command if takes at least this many seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 + # Show this many fractional digits. Zero means round to seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Execution time color. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Custom icon. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook ' + + #######################[ background_jobs: presence of background jobs ]####################### + # Don't show the number of background jobs. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false + # Background jobs color. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70 + # Custom icon. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='≡' + + #######################[ direnv: direnv status (https://direnv.net/) ]######################## + # Direnv color. + typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### + # Default asdf color. Only used to display tools for which there is no color override (see below). + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND. + typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66 + + # There are four parameters that can be used to hide asdf tools. Each parameter describes + # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at + # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to + # hide a tool, it gets shown. + # + # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and + # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: + # + # asdf local python 3.8.1 + # asdf global python 3.8.1 + # + # After running both commands the current python version is 3.8.1 and its source is "local" as + # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, + # it'll hide python version in this case because 3.8.1 is the same as the global version. + # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't + # contain "local". + + # Hide tool versions that don't come from one of these sources. + # + # Available sources: + # + # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" + # - local `asdf current` says "set by /some/not/home/directory/file" + # - global `asdf current` says "set by /home/username/file" + # + # Note: If this parameter is set to (shell local global), it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. + typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) + + # If set to false, hide tool versions that are the same as global. + # + # Note: The name of this parameter doesn't reflect its meaning at all. + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. + typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false + + # If set to false, hide tool versions that are equal to "system". + # + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. + typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true + + # If set to non-empty value, hide tools unless there is a file matching the specified file pattern + # in the current directory, or its parent directory, or its grandparent directory, and so on. + # + # Note: If this parameter is set to empty value, it won't hide tools. + # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. + # + # Example: Hide nodejs version when there is no package.json and no *.js files in the current + # directory, in `..`, in `../..` and so on. + # + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' + typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= + + # Ruby version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168 + # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Python version from asdf. + typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Go version from asdf. + typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Node.js version from asdf. + typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Rust version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' + + # .NET Core version from asdf. + typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 + # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Flutter version from asdf. + typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Lua version from asdf. + typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Java version from asdf. + typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Perl version from asdf. + typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67 + # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Erlang version from asdf. + typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125 + # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Elixir version from asdf. + typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129 + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Postgres version from asdf. + typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31 + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' + + # PHP version from asdf. + typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99 + # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Haskell version from asdf. + typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172 + # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Julia version from asdf. + typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' + + ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### + # NordVPN connection indicator color. + typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 + # Hide NordVPN connection indicator when not connected. + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= + # Custom icon. + typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='nord' + + #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## + # Ranger shell color. + typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 + # Custom icon. + typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='▲' + + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### + # Nnn shell color. + typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]####################### + # lf shell color. + typeset -g POWERLEVEL9K_LF_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]################## + # xplr shell color. + typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### + # Vim shell indicator color. + typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 + # Custom icon. + # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### + # Midnight Commander shell color. + typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## + # Nix shell color. + typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 + + # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store. + # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false + + # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. + # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]################## + # chezmoi shell color. + typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33 + # Custom icon. + # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ disk_usage: disk usage ]################################## + # Colors for different levels of disk usage. + typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160 + # Thresholds for different levels of disk usage (percentage points). + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 + # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. + typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false + # Custom icon. + # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ ram: free RAM ]####################################### + # RAM color. + typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 + # Custom icon. + # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################################[ swap: used swap ]###################################### + # Swap color. + typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96 + # Custom icon. + # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ load: CPU load ]###################################### + # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. + typeset -g POWERLEVEL9K_LOAD_WHICH=5 + # Load color when load is under 50%. + typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 + # Load color when load is between 50% and 70%. + typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 + # Load color when load is over 70%. + typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 + # Custom icon. + # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ + # Todo color. + typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 + # Hide todo when the total number of tasks is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true + # Hide todo when the number of tasks after filtering is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false + + # Todo format. The following parameters are available within the expansion. + # + # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. + # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. + # + # These variables correspond to the last line of the output of `todo.sh -p ls`: + # + # TODO: 24 of 42 tasks shown + # + # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. + # + # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ + # Timewarrior color. + typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110 + # If the tracked task is longer than 24 characters, truncate and append "…". + # Tip: To always display tasks without truncation, delete the following parameter. + # Tip: To hide task names and display just the icon when time tracking is enabled, set the + # value of the following parameter to "". + typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' + + # Custom icon. + # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## + # Taskwarrior color. + typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74 + + # Taskwarrior segment format. The following parameters are available within the expansion. + # + # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. + # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. + # + # Zero values are represented as empty parameters. + # + # The default format: + # + # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' + # + # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]####### + # Color when using local/global history. + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135 + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130 + + # Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon. + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION='' + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION='' + + # Custom icon. + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ cpu_arch: CPU architecture ]################################ + # CPU architecture color. + typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172 + + # Hide the segment when on a specific CPU architecture. + # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION= + # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ context: user@hostname ]################################## + # Context color when running with privileges. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 + # Context color in SSH without privileges. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 + # Default context color (no privileges, no SSH). + typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 + + # Context format when running with privileges: bold user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' + # Context format when in SSH without privileges: user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' + # Default context format (no privileges, no SSH): user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' + + # Don't show context unless running with privileges or in SSH. + # Tip: Remove the next line to always show context. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith ' + + ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### + # Python virtual environment color. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 + # Don't show Python version next to the virtual environment name. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + # If set to "false", won't show virtualenv if pyenv is already shown. + # If set to "if-different", won't show virtualenv if it's the same as pyenv. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false + # Separate environment name from Python version only with a space. + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='' + + #####################[ anaconda: conda environment (https://conda.io/) ]###################### + # Anaconda environment color. + typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 + + # Anaconda segment format. The following parameters are available within the expansion. + # + # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. + # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. + # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). + # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). + # + # CONDA_PROMPT_MODIFIER can be configured with the following command: + # + # conda config --set env_prompt '({default_env}) ' + # + # The last argument is a Python format string that can use the following variables: + # + # - prefix The same as CONDA_PREFIX. + # - default_env The same as CONDA_DEFAULT_ENV. + # - name The last segment of CONDA_PREFIX. + # - stacked_env Comma-separated list of names in the environment stack. The first element is + # always the same as default_env. + # + # Note: '({default_env}) ' is the default value of env_prompt. + # + # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER + # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former + # is empty. + typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' + + # Custom icon. + # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ + # Pyenv color. + typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 + # Hide python version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) + # If set to false, hide python version if it's the same as global: + # $(pyenv version-name) == $(pyenv global). + typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide python version if it's equal to "system". + typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true + + # Pyenv segment format. The following parameters are available within the expansion. + # + # - P9K_CONTENT Current pyenv environment (pyenv version-name). + # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). + # + # The default format has the following logic: + # + # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or + # starts with "$P9K_PYENV_PYTHON_VERSION/". + # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". + typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' + + # Custom icon. + # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ + # Goenv color. + typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 + # Hide go version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) + # If set to false, hide go version if it's the same as global: + # $(goenv version-name) == $(goenv global). + typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide go version if it's equal to "system". + typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## + # Nodenv color. + typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 + # Hide node version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) + # If set to false, hide node version if it's the same as global: + # $(nodenv version-name) == $(nodenv global). + typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide node version if it's equal to "system". + typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### + # Nvm color. + typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 + # If set to false, hide node version if it's the same as default: + # $(nvm version current) == $(nvm version default). + typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false + # If set to false, hide node version if it's equal to "system". + typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ + # Nodeenv color. + typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 + # Don't show Node version next to the environment name. + typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false + # Separate environment name from Node version only with a space. + typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############################[ node_version: node.js version ]############################### + # Node version color. + typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 + # Show node version only when in a directory tree containing package.json. + typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ go_version: go version (https://golang.org) ]######################## + # Go version color. + typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 + # Show go version only when in a go project subdirectory. + typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## + # Rust version color. + typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 + # Show rust version only when in a rust project subdirectory. + typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ + # .NET version color. + typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 + # Show .NET version only when in a .NET project subdirectory. + typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ php_version: php version (https://www.php.net/) ]###################### + # PHP version color. + typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99 + # Show PHP version only when in a PHP project subdirectory. + typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### + # Laravel version color. + typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161 + # Custom icon. + # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ####################[ java_version: java version (https://www.java.com/) ]#################### + # Java version color. + typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32 + # Show java version only when in a java project subdirectory. + typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true + # Show brief version. + typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false + # Custom icon. + # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### + # Package color. + typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117 + # Package format. The following parameters are available within the expansion. + # + # - P9K_PACKAGE_NAME The value of `name` field in package.json. + # - P9K_PACKAGE_VERSION The value of `version` field in package.json. + # + # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' + # Custom icon. + # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## + # Rbenv color. + typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 + # Hide ruby version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) + # If set to false, hide ruby version if it's the same as global: + # $(rbenv version-name) == $(rbenv global). + typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide ruby version if it's equal to "system". + typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## + # Rvm color. + typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 + # Don't show @gemset at the end. + typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false + # Don't show ruby- at the front. + typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ + # Fvm color. + typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### + # Lua color. + typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 + # Hide lua version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) + # If set to false, hide lua version if it's the same as global: + # $(luaenv version-name) == $(luaenv global). + typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide lua version if it's equal to "system". + typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ + # Java color. + typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 + # Hide java version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) + # If set to false, hide java version if it's the same as global: + # $(jenv version-name) == $(jenv global). + typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide java version if it's equal to "system". + typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ + # Perl color. + typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 + # Hide perl version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) + # If set to false, hide perl version if it's the same as global: + # $(plenv version-name) == $(plenv global). + typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide perl version if it's equal to "system". + typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############ + # Perlbrew color. + typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67 + # Show perlbrew version only when in a perl project subdirectory. + typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true + # Don't show "perl-" at the front. + typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ + # PHP color. + typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99 + # Hide php version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) + # If set to false, hide php version if it's the same as global: + # $(phpenv version-name) == $(phpenv global). + typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide php version if it's equal to "system". + typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### + # Scala color. + typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160 + # Hide scala version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) + # If set to false, hide scala version if it's the same as global: + # $(scalaenv version-name) == $(scalaenv global). + typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide scala version if it's equal to "system". + typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### + # Haskell color. + typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 + # Hide haskell version if it doesn't come from one of these sources. + # + # shell: version is set by STACK_YAML + # local: version is set by stack.yaml up the directory tree + # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) + typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) + # If set to false, hide haskell version if it's the same as in the implicit global project. + typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true + # Custom icon. + # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# + # Show kubecontext only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show kubecontext. + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl' + + # Kubernetes context classes for the purpose of using different colors, icons and expansions with + # different contexts. + # + # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current kubernetes context gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current kubernetes context is "deathray-testing/default", its class is TEST + # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='○' + + # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext + # segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # Within the expansion the following parameters are always available: + # + # - P9K_CONTENT The content that would've been displayed if there was no content + # expansion defined. + # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE + # in the output of `kubectl config get-contexts`. If there is no + # namespace, the parameter is set to "default". + # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the + # output of `kubectl config get-contexts`. + # + # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), + # the following extra parameters are available: + # + # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. + # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. + # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. + # + # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, + # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=gke + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + # + # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=eks + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= + # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' + # Append the current context's namespace if it's not "default". + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' + + # Custom prefix. + # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' + + ################[ terraform: terraform workspace (https://www.terraform.io) ]################# + # Don't show terraform workspace if it's literally "default". + typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false + # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current terraform workspace gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current terraform workspace is "project_test", its class is TEST because "project_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ terraform_version: terraform version (https://www.terraform.io) ]############## + # Terraform version color. + typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# + # Show aws only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show aws. + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current AWS profile gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current AWS profile is "company_test", its class is TEST + # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 + # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # AWS segment format. The following parameters are available within the expansion. + # + # - P9K_AWS_PROFILE The name of the current AWS profile. + # - P9K_AWS_REGION The region associated with the current AWS profile. + typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}' + + #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# + # AWS Elastic Beanstalk environment color. + typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 + # Custom icon. + typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='eb' + + ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## + # Show azure only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show azure. + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current azure account name gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current azure account is "company_test", its class is TEST because "company_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + + # Azure account name color. + typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32 + # Custom icon. + # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### + # Show gcloud only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show gcloud. + typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil' + # Google cloud color. + typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 + + # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or + # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative + # enough. You can use the following parameters in the expansions. Each of them corresponds to the + # output of `gcloud` tool. + # + # Parameter | Source + # -------------------------|-------------------------------------------------------------------- + # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' + # P9K_GCLOUD_ACCOUNT | gcloud config get-value account + # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project + # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. + # + # Obtaining project name requires sending a request to Google servers. This can take a long time + # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud + # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets + # set and gcloud prompt segment transitions to state COMPLETE. + # + # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL + # and COMPLETE. You can also hide gcloud in state PARTIAL by setting + # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and + # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. + typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' + typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' + + # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name + # this often. Negative value disables periodic polling. In this mode project name is retrieved + # only when the current configuration, account or project id changes. + typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 + + # Custom icon. + # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# + # Show google_app_cred only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show google_app_cred. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + + # Google application credentials classes for the purpose of using different colors, icons and + # expansions with different credentials. + # + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first + # element in each pair defines a pattern against which the current kubernetes context gets + # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion + # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION + # parameters, you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. + # The first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD + # '*:*test*:*' TEST + # '*' DEFAULT) + # + # If your current Google application credentials is "service_account deathray-testing x@y.com", + # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD # These values are examples that are unlikely + # '*:*test*:*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by + # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # You can use the following parameters in the expansion. Each of them corresponds to one of the + # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. + # + # Parameter | JSON key file field + # ---------------------------------+--------------- + # P9K_GOOGLE_APP_CRED_TYPE | type + # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id + # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' + + ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]############### + # Toolbox color. + typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178 + # Don't display the name of the toolbox if it matches fedora-toolbox-*. + typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}' + # Custom icon. + # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin ' + + ###############################[ public_ip: public IP address ]############################### + # Public IP color. + typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 + # Custom icon. + # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ########################[ vpn_ip: virtual private network indicator ]######################### + # VPN IP color. + typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 + # When on VPN, show just an icon without the IP address. + # Tip: To display the private IP address when on VPN, remove the next line. + typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= + # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN + # to see the name of the interface. + typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)' + # If set to true, show one segment per matching network interface. If set to false, show only + # one segment corresponding to the first matching network interface. + # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. + typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false + # Custom icon. + # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### + # IP color. + typeset -g POWERLEVEL9K_IP_FOREGROUND=38 + # The following parameters are accessible within the expansion: + # + # Parameter | Meaning + # ----------------------+------------------------------------------- + # P9K_IP_IP | IP address + # P9K_IP_INTERFACE | network interface + # P9K_IP_RX_BYTES | total number of bytes received + # P9K_IP_TX_BYTES | total number of bytes sent + # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt + # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt + # P9K_IP_RX_RATE | receive rate (since last prompt) + # P9K_IP_TX_RATE | send rate (since last prompt) + 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}' + # Show information for the first network interface whose name matches this regular expression. + # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. + typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' + # Custom icon. + # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #########################[ proxy: system-wide http/https/ftp proxy ]########################## + # Proxy color. + typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ battery: internal battery ]################################# + # Show battery in red when it's below this level and not connected to power supply. + typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 + typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 + # Show battery in green when it's charging or fully charged. + typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 + # Show battery in yellow when it's discharging. + typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 + # Battery pictograms going from low to high level of charge. + typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█') + # Don't show the remaining time to charge/discharge. + typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false + + #####################################[ wifi: wifi speed ]##################################### + # WiFi color. + typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). + # + # # Wifi colors and icons for different signal strength levels (low to high). + # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values + # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values + # + # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' + # + # The following parameters are accessible within the expansions: + # + # Parameter | Meaning + # ----------------------+--------------- + # P9K_WIFI_SSID | service set identifier, a.k.a. network name + # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown + # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second + # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 + # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 + # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) + + ####################################[ time: current time ]#################################### + # Current time color. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands as opposed to the default + # behavior where they contain the end times of their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false + # Custom icon. + typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= + # Custom prefix. + # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat ' + + # Example of a user-defined prompt segment. Function prompt_example will be called on every + # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or + # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. + # + # Type `p10k help segment` for documentation and a more sophisticated example. + function prompt_example() { + p10k segment -f 208 -i '⭐' -t 'hello, %n' + } + + # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job + # is to generate the prompt segment for display in instant prompt. See + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # + # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function + # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k + # will replay these calls without actually calling instant_prompt_*. It is imperative that + # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this + # rule is not observed, the content of instant prompt will be incorrect. + # + # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If + # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. + function instant_prompt_example() { + # Since prompt_example always makes the same `p10k segment` calls, we can call it from + # instant_prompt_example. This will give us the same `example` prompt segment in the instant + # and regular prompts. + prompt_example + } + + # User-defined prompt segments can be customized the same way as built-in segments. + # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 + # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +# Tell `p10k configure` which file it should overwrite. +typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/main.yml b/main.yml index 9dd02a6..ba3a6a1 100644 --- a/main.yml +++ b/main.yml @@ -32,4 +32,4 @@ # - {role: macos, tags: [macos]} - { role: ide, tags: [ide] } - # - {role: geerlingguy.mac.dock, tags: [dock]} + - {role: geerlingguy.mac.dock, tags: [dock]} diff --git a/roles/ide/tasks/terminal.yml b/roles/ide/tasks/terminal.yml index 15c2b1e..768f575 100644 --- a/roles/ide/tasks/terminal.yml +++ b/roles/ide/tasks/terminal.yml @@ -30,6 +30,6 @@ changed_when: true when: ide_zsh_dir.stat.exists is false -- name: Install pure theme +- name: Install Powerlevel10k theme homebrew: - name: pure + name: powerlevel10k