From 538860bfcb11f5cd22617909671f5a85d56e7c28 Mon Sep 17 00:00:00 2001 From: Angelo Noto Date: Sat, 27 Jun 2026 16:41:35 -0400 Subject: [PATCH] add zsh --- bash/.bashrc.d/fonts.bash | 2 +- bash/.bashrc.d/ruff.bash | 8 ++++- bash/.bashrc.d/vscode.bash | 2 +- bash/.editorconfig | 4 +++ .../.vscode-server/data/Machine/settings.json | 1 + zsh/.zshrc | 36 +++++++++++++++++++ zsh/.zshrc.d/alias.zsh | 1 + zsh/.zshrc.d/apt.zsh | 1 + zsh/.zshrc.d/fonts.zsh | 1 + zsh/.zshrc.d/git.zsh | 14 ++++++++ zsh/.zshrc.d/mango.zsh | 1 + zsh/.zshrc.d/ruff.zsh | 1 + zsh/.zshrc.d/vscode.zsh | 1 + zsh/.zshrc.d/wsl.zsh | 1 + 14 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 zsh/.zshrc create mode 120000 zsh/.zshrc.d/alias.zsh create mode 120000 zsh/.zshrc.d/apt.zsh create mode 120000 zsh/.zshrc.d/fonts.zsh create mode 100644 zsh/.zshrc.d/git.zsh create mode 120000 zsh/.zshrc.d/mango.zsh create mode 120000 zsh/.zshrc.d/ruff.zsh create mode 120000 zsh/.zshrc.d/vscode.zsh create mode 120000 zsh/.zshrc.d/wsl.zsh diff --git a/bash/.bashrc.d/fonts.bash b/bash/.bashrc.d/fonts.bash index 45a59c6..c010465 100644 --- a/bash/.bashrc.d/fonts.bash +++ b/bash/.bashrc.d/fonts.bash @@ -3,7 +3,7 @@ _fonts_stamp="${XDG_STATE_HOME:-$HOME/.local/state}/fira-code-fonts" _fonts_dir="$HOME/.local/share/fonts/FiraCode" if ! fc-list 2>/dev/null | grep -qi 'fira code'; then - if [[ -f "$_fonts_stamp" ]] && compgen -G "$_fonts_dir/*.ttf" >/dev/null; then + if [[ -f "$_fonts_stamp" ]] && ls "$_fonts_dir"/*.ttf &>/dev/null; then fc-cache -f "$HOME/.local/share/fonts" 2>/dev/null elif command -v dnf &>/dev/null; then if sudo dnf install -y fira-code-fonts &>/dev/null; then diff --git a/bash/.bashrc.d/ruff.bash b/bash/.bashrc.d/ruff.bash index 4b06343..31b8a9f 100644 --- a/bash/.bashrc.d/ruff.bash +++ b/bash/.bashrc.d/ruff.bash @@ -1,2 +1,8 @@ # Ruff completion -command -v ruff >/dev/null && eval "$(ruff generate-shell-completion bash 2>/dev/null)" \ No newline at end of file +if command -v ruff >/dev/null; then + if [[ -n ${ZSH_VERSION:-} ]]; then + eval "$(ruff generate-shell-completion zsh 2>/dev/null)" + else + eval "$(ruff generate-shell-completion bash 2>/dev/null)" + fi +fi \ No newline at end of file diff --git a/bash/.bashrc.d/vscode.bash b/bash/.bashrc.d/vscode.bash index a74803d..7535bea 100644 --- a/bash/.bashrc.d/vscode.bash +++ b/bash/.bashrc.d/vscode.bash @@ -1,6 +1,6 @@ # VS Code extension install helper vscode-ext-install() { - bash "${HOME}/dotfiles/vscode-server/install-vscode-extensions.sh" "$@" + bash "${HOME}/.dotfiles/vscode-server/install-vscode-extensions.sh" "$@" } alias vscode-ext-list='vscode-ext-install --list' \ No newline at end of file diff --git a/bash/.editorconfig b/bash/.editorconfig index 3bc7db2..5e0d08d 100644 --- a/bash/.editorconfig +++ b/bash/.editorconfig @@ -18,6 +18,10 @@ indent_size = 2 indent_style = space indent_size = 2 +[*.zsh] +indent_style = space +indent_size = 2 + [*.bats] indent_style = space indent_size = 2 diff --git a/vscode-server/.vscode-server/data/Machine/settings.json b/vscode-server/.vscode-server/data/Machine/settings.json index 89ce8fa..5b8588b 100644 --- a/vscode-server/.vscode-server/data/Machine/settings.json +++ b/vscode-server/.vscode-server/data/Machine/settings.json @@ -94,4 +94,5 @@ "__pycache__", ".grok" ], + "chat.titleBar.signIn.enabled": false, } \ No newline at end of file diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..dde0e48 --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,36 @@ +# .zshrc + +[[ -f "$HOME/.var/app/com.visualstudio.code/data/../bin/env" ]] && . "$HOME/.var/app/com.visualstudio.code/data/../bin/env" +[[ -f "$HOME/.local/bin/env" ]] && . "$HOME/.local/bin/env" + +export TIME_STYLE="long-iso" + +export LANG=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 + +if [[ ":$PATH:" != *":${HOME}/.local/bin:"* ]]; then + PATH="$HOME/.local/bin:$HOME/bin:$PATH" +fi +export PATH + +# Konsole-specific (optional) +export TERM=xterm-256color + +# User specific aliases and functions +if [[ -d ~/.zshrc.d ]]; then + for rc in ~/.zshrc.d/*(N); do + [[ -f "$rc" ]] && source "$rc" + done +fi +unset rc + +# >>> grok installer >>> +export PATH="$HOME/.grok/bin:$PATH" +fpath=("$HOME/.grok/completions/zsh" $fpath) +# <<< grok installer <<< + +# If not running interactively, don't do anything +[[ -o interactive ]] || return + +autoload -Uz compinit +compinit \ No newline at end of file diff --git a/zsh/.zshrc.d/alias.zsh b/zsh/.zshrc.d/alias.zsh new file mode 120000 index 0000000..d8832db --- /dev/null +++ b/zsh/.zshrc.d/alias.zsh @@ -0,0 +1 @@ +../../bash/.bashrc.d/alias.bash \ No newline at end of file diff --git a/zsh/.zshrc.d/apt.zsh b/zsh/.zshrc.d/apt.zsh new file mode 120000 index 0000000..c3150a3 --- /dev/null +++ b/zsh/.zshrc.d/apt.zsh @@ -0,0 +1 @@ +../../bash/.bashrc.d/apt.bash \ No newline at end of file diff --git a/zsh/.zshrc.d/fonts.zsh b/zsh/.zshrc.d/fonts.zsh new file mode 120000 index 0000000..e0c35f9 --- /dev/null +++ b/zsh/.zshrc.d/fonts.zsh @@ -0,0 +1 @@ +../../bash/.bashrc.d/fonts.bash \ No newline at end of file diff --git a/zsh/.zshrc.d/git.zsh b/zsh/.zshrc.d/git.zsh new file mode 100644 index 0000000..8173a6e --- /dev/null +++ b/zsh/.zshrc.d/git.zsh @@ -0,0 +1,14 @@ +# Git + colorful prompt +autoload -Uz vcs_info +precmd_vcs_info() { vcs_info } +precmd_functions+=(precmd_vcs_info) + +zstyle ':vcs_info:*' enable git +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:git:*' formats ' (%b%u%c)' +zstyle ':vcs_info:git:*' actionformats ' (%b%u%c)' +zstyle ':vcs_info:git:*' stagedstr ' +' +zstyle ':vcs_info:git:*' unstagedstr ' *' + +setopt prompt_subst +PROMPT='%B%F{38;5;46m}%n@%m%b%f %F{38;5;51m}%~%f%F{90m}${vcs_info_msg_0_}%f $ ' \ No newline at end of file diff --git a/zsh/.zshrc.d/mango.zsh b/zsh/.zshrc.d/mango.zsh new file mode 120000 index 0000000..620ae9e --- /dev/null +++ b/zsh/.zshrc.d/mango.zsh @@ -0,0 +1 @@ +../../bash/.bashrc.d/mango.bash \ No newline at end of file diff --git a/zsh/.zshrc.d/ruff.zsh b/zsh/.zshrc.d/ruff.zsh new file mode 120000 index 0000000..6380033 --- /dev/null +++ b/zsh/.zshrc.d/ruff.zsh @@ -0,0 +1 @@ +../../bash/.bashrc.d/ruff.bash \ No newline at end of file diff --git a/zsh/.zshrc.d/vscode.zsh b/zsh/.zshrc.d/vscode.zsh new file mode 120000 index 0000000..04e8374 --- /dev/null +++ b/zsh/.zshrc.d/vscode.zsh @@ -0,0 +1 @@ +../../bash/.bashrc.d/vscode.bash \ No newline at end of file diff --git a/zsh/.zshrc.d/wsl.zsh b/zsh/.zshrc.d/wsl.zsh new file mode 120000 index 0000000..1fad69c --- /dev/null +++ b/zsh/.zshrc.d/wsl.zsh @@ -0,0 +1 @@ +../../bash/.bashrc.d/wsl.bash \ No newline at end of file