mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:46:41 +00:00
Compare commits
39 Commits
f92e4b9646
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
919c5d48de | ||
|
d3ef296e84
|
|||
|
39f2d3094c
|
|||
|
e2d2e4ec13
|
|||
|
|
9bf0ffd5d7 | ||
|
|
ae207e49bd | ||
|
a76c67542f
|
|||
|
6900c31b3a
|
|||
|
|
83d043f186 | ||
|
eb3ecdce75
|
|||
|
9e5784d741
|
|||
|
051731d110
|
|||
|
c83cd5e62b
|
|||
|
54fac673e0
|
|||
|
e542560a67
|
|||
|
ca42166e11
|
|||
|
9c2e3b7343
|
|||
|
|
f5245da82a | ||
|
|
cc3dd3fe0e | ||
|
|
1c0f58ef55 | ||
|
|
220461bd9a | ||
|
|
e34efe233e | ||
|
|
3a14e2302f | ||
|
7911beee79
|
|||
|
c4924a8cfc
|
|||
|
e38a4f6b73
|
|||
|
|
f3bb188938 | ||
|
|
f1901b81ad | ||
|
|
ab9042fbae | ||
|
|
c0694b0494 | ||
|
cb72a6e190
|
|||
|
b38ab73624
|
|||
|
6dc701a4f7
|
|||
|
3ef428c5ea
|
|||
|
a6af299d8d
|
|||
|
|
a954f2b588 | ||
|
|
4f831ccd2e | ||
|
|
b72042cd1f | ||
|
|
75116ac623 |
61
CLAUDE.md
Normal file
61
CLAUDE.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with
|
||||
code in this repository.
|
||||
|
||||
## Overview
|
||||
|
||||
Personal dotfiles repository for macOS and Linux. Configuration files are
|
||||
symlinked to `$HOME` with a `.` prefix (e.g., `zshrc` becomes `~/.zshrc`).
|
||||
|
||||
## Commands
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
./install.sh # Install symlinks and initialize shell
|
||||
./install.sh symlinks # Only install symlinks
|
||||
./install.sh terminfo # Install terminfo entries
|
||||
./install.sh launch-agents # Install macOS LaunchAgents
|
||||
```
|
||||
|
||||
### Nix packages
|
||||
|
||||
```sh
|
||||
nix-env -if ~/.dotfiles/default.nix # Install/update global Nix packages
|
||||
nix flake update # Update nixpkgs lock
|
||||
```
|
||||
|
||||
### Hammerspoon
|
||||
|
||||
```sh
|
||||
cd hammerspoon && make install # Fetch Spoons and dependencies
|
||||
cd hammerspoon && make update # Update all dependencies
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
||||
- `install.sh` - Main installer, manages symlinks to `$HOME`
|
||||
- `flake.nix` / `default.nix` - Nix package management (nixfmt, nil LSP)
|
||||
- `zshrc` / `zshenv` / `zprofile` - ZSH configuration entry points
|
||||
- `zsh/` - Modular ZSH configs loaded by topic (aliases, kubernetes, golang,
|
||||
etc.)
|
||||
- `zsh/zshrc.funcs.zsh` - Helper functions used throughout ZSH config
|
||||
- `bin/` - Personal scripts added to PATH
|
||||
- `config/` - XDG config files (ghostty, kitty, mise, starship, etc.)
|
||||
- `hammerspoon/` - macOS automation with Hammerspoon
|
||||
- `tmux/` - Tmux config and plugins (git submodules)
|
||||
- `private/` - Private dotfiles (separate repo, gitignored)
|
||||
|
||||
## Shell Setup
|
||||
|
||||
- Uses [zinit](https://github.com/zdharma-continuum/zinit) for ZSH plugin
|
||||
management
|
||||
- Uses [mise](https://mise.jdx.dev/) for runtime version management
|
||||
- Uses [starship](https://starship.rs/) for prompt
|
||||
- PATH construction happens in `zshenv`, interactive setup in `zshrc`
|
||||
|
||||
## Code Style
|
||||
|
||||
Shell scripts: 2-space indent, bash-style (see `.editorconfig` for shfmt
|
||||
settings).
|
||||
60
bin/ollama-for-gitbutler
Executable file
60
bin/ollama-for-gitbutler
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Defaults
|
||||
DEFAULT_BIND="127.0.0.1"
|
||||
DEFAULT_PORT="11435"
|
||||
DEFAULT_ORIGINS="*"
|
||||
DEFAULT_KEEP_ALIVE="6h"
|
||||
|
||||
print-help() {
|
||||
cat <<EOF
|
||||
Usage: ollama-for-gitbutler [options]
|
||||
|
||||
Options:
|
||||
-b, --bind <addr> The address to bind to (default: "${DEFAULT_BIND}")
|
||||
-p, --port <port> The port to listen on (default: "${DEFAULT_PORT}")
|
||||
-m, --models <dir> Override ollama's default models directory
|
||||
-k, --keep-alive <duration> The duration that models stay loaded in memory (default: "${DEFAULT_KEEP_ALIVE}")
|
||||
-h, --help Print this help message
|
||||
EOF
|
||||
}
|
||||
|
||||
BIND="${DEFAULT_BIND}"
|
||||
PORT="${DEFAULT_PORT}"
|
||||
KEEP_ALIVE="${DEFAULT_KEEP_ALIVE}"
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
-b | --bind)
|
||||
BIND="$2"
|
||||
shift 2
|
||||
;;
|
||||
-p | --port)
|
||||
PORT="$2"
|
||||
shift 2
|
||||
;;
|
||||
-m | --models)
|
||||
export OLLAMA_MODELS="$2"
|
||||
shift 2
|
||||
;;
|
||||
-k | --keep-alive)
|
||||
KEEP_ALIVE="$2"
|
||||
shift 2
|
||||
;;
|
||||
-h | --help)
|
||||
print-help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1" >&2
|
||||
print-help >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
export OLLAMA_HOST="${BIND}:${PORT}"
|
||||
export OLLAMA_KEEP_ALIVE="${KEEP_ALIVE}"
|
||||
export OLLAMA_ORIGINS="${DEFAULT_ORIGINS}"
|
||||
|
||||
exec ollama serve "$@"
|
||||
@@ -24,9 +24,6 @@ bun = true
|
||||
uvx = true
|
||||
|
||||
[settings.ruby]
|
||||
# ruby-install supports new releases immediately, as opposed to ruby-build which
|
||||
# requires an update before new releases are available.
|
||||
ruby_install = true
|
||||
# Precompiled binaries causes issues with Ruby LSP.
|
||||
compile = true
|
||||
|
||||
@@ -48,6 +45,7 @@ compile = true
|
||||
"cargo:paper-terminal" = "latest"
|
||||
"cargo:parallel-disk-usage" = { version = "latest", bin = "pdu" }
|
||||
"cargo:pastel" = "latest"
|
||||
"cargo:riffdiff" = "latest"
|
||||
"github:stacklok/toolhive" = "latest"
|
||||
"go:github.com/rakyll/hey" = "latest"
|
||||
"go:google.golang.org/grpc/cmd/protoc-gen-go-grpc" = "latest"
|
||||
@@ -56,6 +54,8 @@ compile = true
|
||||
"npm:@mermaid-js/mermaid-cli" = "latest"
|
||||
"npm:@openai/codex" = "latest"
|
||||
"npm:@prettier/plugin-php" = "latest"
|
||||
"npm:claude-plugins" = "latest"
|
||||
"npm:convex" = "latest"
|
||||
"npm:dockerfile-language-server-nodejs" = "latest"
|
||||
"npm:eslint" = "latest"
|
||||
"npm:eslint-config-prettier" = "latest"
|
||||
@@ -67,9 +67,12 @@ compile = true
|
||||
"npm:jsonlint" = "latest"
|
||||
"npm:localtunnel" = "latest"
|
||||
"npm:markdown-it" = "latest"
|
||||
"npm:oxfmt" = "latest"
|
||||
"npm:oxlint" = "latest"
|
||||
"npm:prettier" = "latest"
|
||||
"npm:prettier-plugin-toml" = "latest"
|
||||
"npm:prettier-pnp" = "latest"
|
||||
"npm:skills" = "latest"
|
||||
"npm:stylelint" = "latest"
|
||||
"npm:svgo" = "latest"
|
||||
"npm:typescript" = "latest"
|
||||
@@ -85,7 +88,7 @@ compile = true
|
||||
"pipx:pipx" = "latest"
|
||||
"pipx:toml-sort" = "latest"
|
||||
"pipx:yamllint" = "latest"
|
||||
1password-cli = "latest"
|
||||
1password = "latest"
|
||||
actionlint = "latest"
|
||||
argo-rollouts = "latest"
|
||||
argocd = "latest"
|
||||
@@ -96,7 +99,6 @@ bat-extras = "latest"
|
||||
buf = "latest"
|
||||
bun = "latest"
|
||||
cargo-binstall = "latest"
|
||||
claude = "latest"
|
||||
cloudflared = "latest"
|
||||
crane = "latest"
|
||||
ctop = "latest"
|
||||
@@ -107,6 +109,7 @@ dust = "latest"
|
||||
evans = "latest"
|
||||
fd = "latest"
|
||||
fzf = "latest"
|
||||
gemini = "latest"
|
||||
gh = "latest"
|
||||
gitu = "latest"
|
||||
go = "latest"
|
||||
@@ -134,8 +137,10 @@ kubelogin = "latest"
|
||||
kubens = "latest"
|
||||
kustomize = "latest"
|
||||
lua = "latest"
|
||||
lua-language-server = "latest"
|
||||
markdownlint-cli2 = "latest"
|
||||
node = "lts"
|
||||
opencode = "latest"
|
||||
opentofu = "latest"
|
||||
pnpm = "latest"
|
||||
python = "latest"
|
||||
@@ -163,6 +168,8 @@ uv = "latest"
|
||||
watchexec = "latest"
|
||||
yj = "latest"
|
||||
yq = "latest"
|
||||
zig = "latest"
|
||||
zls = "latest"
|
||||
zoxide = "latest"
|
||||
|
||||
# Install ansible with passlib and bcrypt<4.1, as passlib is not compatible with
|
||||
|
||||
4
default.nix
Normal file
4
default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
let
|
||||
flake = builtins.getFlake "git+file://${builtins.toString ./.}";
|
||||
in
|
||||
flake.packages.${builtins.currentSystem}.default
|
||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1768302833,
|
||||
"narHash": "sha256-h5bRFy9bco+8QcK7rGoOiqMxMbmn21moTACofNLRMP4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "61db79b0c6b838d9894923920b612048e1201926",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
36
flake.nix
Normal file
36
flake.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
description = "Global packages for dotfiles";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
default = pkgs.buildEnv {
|
||||
name = "dotfiles-packages";
|
||||
paths = [
|
||||
pkgs.nil
|
||||
pkgs.nixfmt
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
27
gitignore
27
gitignore
@@ -1,23 +1,34 @@
|
||||
**/._zinit/*
|
||||
**/.agents/drafts/
|
||||
**/.agents/plans/
|
||||
**/.agents/reviews/
|
||||
**/.claude/drafts/
|
||||
**/.claude/plans/
|
||||
**/.claude/reviews/
|
||||
**/.claude/settings.local.json
|
||||
**/.claude/worktrees/
|
||||
**/.vscode/settings.json
|
||||
**/.vscode/settings.local.json
|
||||
**/chart/preprod-values.yaml
|
||||
**/chart/production-values.yaml
|
||||
**/chart/staging-values.yaml
|
||||
**/log/*.bz2
|
||||
**/log/*.gz
|
||||
**/test/dummy/log/*.bz2
|
||||
**/test/dummy/log/*.gz
|
||||
**/vendor/bundle
|
||||
.AppleDouble
|
||||
.DS_Store
|
||||
._zinit/*
|
||||
.bin
|
||||
.bundle
|
||||
.byebug_history
|
||||
.dir-locals.el
|
||||
.envrc
|
||||
.mise.*local.toml
|
||||
.mise.local.toml
|
||||
.projectile
|
||||
.stfolder
|
||||
.stignore
|
||||
.vagrant
|
||||
.vscode/settings.json
|
||||
.zinitrc.zsh
|
||||
log/*.bz2
|
||||
log/*.gz
|
||||
mise.*local.toml
|
||||
routes.txt
|
||||
test/dummy/log/*.bz2
|
||||
test/dummy/log/*.gz
|
||||
vendor/bundle
|
||||
|
||||
@@ -11,12 +11,13 @@ local function init_hotkeys()
|
||||
hs.hotkey.bind({ 'cmd', 'alt', 'ctrl' }, 'S', apptoggle.showAppInfo)
|
||||
|
||||
apptoggle:bind({ 'cmd', 'alt', 'ctrl' }, 'A', { 'Activity Monitor' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '2', { 'Open WebUI' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '4', { 'Claude' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '1', { 'Codex' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '2', { 'Claude' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '3', { 'Conductor' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '4', { 'ChatGPT Atlas' }, { 'ChatGPT' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'A', { 'Argo CD' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'B', { 'TablePlus' }, { 'Lens' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'D', { 'Mail+ for Gmail' }, { 'Notion Mail' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'E', { 'Cursor' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'F', { 'GitButler' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'G', { 'Emacs', '/Applications/Emacs.app' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'T', { 'TeamSpeak 3', '/Applications/TeamSpeak 3 Client.app' })
|
||||
@@ -29,6 +30,7 @@ local function init_hotkeys()
|
||||
{ 'Google Calendar' }
|
||||
)
|
||||
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'E', { 'Cursor' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'W',
|
||||
{ 'Code - Insiders', '/Applications/Visual Studio Code - Insiders.app' },
|
||||
{ 'Code', '/Applications/Visual Studio Code.app' }
|
||||
|
||||
@@ -11,7 +11,10 @@ local function init_hotkeys()
|
||||
hs.hotkey.bind({ 'cmd', 'alt', 'ctrl' }, 'S', apptoggle.showAppInfo)
|
||||
|
||||
apptoggle:bind({ 'cmd', 'alt', 'ctrl' }, 'A', { 'Activity Monitor' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '4', { 'Claude' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '1', { 'Codex' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '2', { 'Claude' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '3', { 'Conductor' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '4', { 'ChatGPT' }, { 'ChatGPT Atlas' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'A', { 'Messages' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'B', { 'TablePlus' }, { 'Sequel Pro' }, { 'Lens' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'D', { 'Mail+ for Gmail' }, { 'Mimestream' })
|
||||
@@ -22,14 +25,9 @@ local function init_hotkeys()
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'X', { 'Notion' }, { 'Obsidian' })
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'Z', { 'WhatsApp' })
|
||||
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, '2',
|
||||
{ 'ChatGPT' },
|
||||
{ 'ChatGPT Atlas' }
|
||||
)
|
||||
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'W',
|
||||
{ 'Code - Insiders', '/Applications/Visual Studio Code - Insiders.app' },
|
||||
{ 'Code', '/Applications/Visual Studio Code.app' }
|
||||
{ 'Code', '/Applications/Visual Studio Code.app' },
|
||||
{ 'Code - Insiders', '/Applications/Visual Studio Code - Insiders.app' }
|
||||
)
|
||||
|
||||
apptoggle:bind({ 'cmd', 'ctrl' }, 'C',
|
||||
|
||||
@@ -12,7 +12,7 @@ local wm = {
|
||||
animationDuration = 0.0,
|
||||
gridSizes = { default = '30x20', interactive = '8x4' },
|
||||
gridTextSize = 50,
|
||||
margins = { w = 4, h = 4 }
|
||||
margins = { w = 0, h = 0 }
|
||||
}
|
||||
|
||||
-- Initialize and register keybindings
|
||||
|
||||
@@ -87,6 +87,11 @@ install_private() {
|
||||
"$ROOT_PATH/$PRIVATE_PATH"
|
||||
}
|
||||
|
||||
install_agentic() {
|
||||
git_clone "git@github.com:jimeh/agentic.git" \
|
||||
"$HOME/.config/agentic"
|
||||
}
|
||||
|
||||
install_launch_agents() {
|
||||
mkdir -p "$HOME/Library/LaunchAgents"
|
||||
for file in $ROOT_PATH/launch_agents/*.plist; do
|
||||
@@ -256,6 +261,7 @@ display_help() {
|
||||
echo ' info: Display target and source directory information.'
|
||||
echo ' emacs_config: Install Emacs configuration.'
|
||||
echo ' private: Install private dotfiles.'
|
||||
echo ' agentic: Clone agentic repo to ~/.config/agentic.'
|
||||
echo ' homebrew: Install Homebrew (Mac OS X only).'
|
||||
echo ' rbenv: Install rbenv, a Ruby version manager.'
|
||||
echo ' launch_agents: Install launchd plists to ~/Library/LaunchAgents/'
|
||||
@@ -278,6 +284,9 @@ case "$1" in
|
||||
private)
|
||||
install_private
|
||||
;;
|
||||
agentic)
|
||||
install_agentic
|
||||
;;
|
||||
homebrew | brew)
|
||||
install_homebrew
|
||||
;;
|
||||
|
||||
@@ -14,4 +14,7 @@ blanks-around-fences: # MD031
|
||||
line-length: # MD013
|
||||
# Allow lines up to 120 characters.
|
||||
line_length: 80
|
||||
code_blocks: true
|
||||
ignore_code_blocks: true
|
||||
code_block_line_length: 280
|
||||
tables: false
|
||||
|
||||
7
zsh/iterm2.zsh
Normal file
7
zsh/iterm2.zsh
Normal file
@@ -0,0 +1,7 @@
|
||||
#
|
||||
# iTerm2 environment setup.
|
||||
#
|
||||
|
||||
if [ -f "${HOME}/.iterm2_shell_integration.zsh" ]; then
|
||||
source "${HOME}/.iterm2_shell_integration.zsh"
|
||||
fi
|
||||
@@ -63,6 +63,7 @@ install_ruby_global_packages() {
|
||||
ruby-lsp
|
||||
ruby-lsp-rails
|
||||
ruby-lsp-rspec
|
||||
steep
|
||||
syntax_tree
|
||||
syntax_tree-haml
|
||||
yard
|
||||
|
||||
@@ -21,6 +21,10 @@ if command-exists batman; then
|
||||
alias man="batman"
|
||||
fi
|
||||
|
||||
if command-exists batdiff; then
|
||||
alias biff="batdiff"
|
||||
fi
|
||||
|
||||
# ==============================================================================
|
||||
# completions
|
||||
# ==============================================================================
|
||||
|
||||
@@ -6,6 +6,10 @@ if command-exists zoxide; then
|
||||
cached-eval "$(command-path zoxide)" zoxide init --cmd zox zsh
|
||||
|
||||
# Use functions to allow regular zsh completion for cd to work.
|
||||
cd() { __zoxide_z "$@"; }
|
||||
alias cdi='__zoxide_zi'
|
||||
if command-exists __zoxide_z; then
|
||||
cd() { __zoxide_z "$@"; }
|
||||
fi
|
||||
if command-exists __zoxide_zi; then
|
||||
alias cdi='__zoxide_zi'
|
||||
fi
|
||||
fi
|
||||
|
||||
7
zshenv
7
zshenv
@@ -354,6 +354,10 @@ fi
|
||||
# Use custom tmux install if available
|
||||
path_prepend "/opt/tmux/bin"
|
||||
|
||||
# pnpm setup
|
||||
export PNPM_HOME="$HOME/.local/share/pnpm"
|
||||
path_prepend "$PNPM_HOME"
|
||||
|
||||
# Rust setup
|
||||
export RUSTUP_HOME="$HOME/.rustup"
|
||||
export CARGO_HOME="$HOME/.cargo"
|
||||
@@ -392,6 +396,9 @@ path_prepend "$HOME/.codeium/windsurf/bin"
|
||||
# LM Studio setup
|
||||
path_prepend "$HOME/.cache/lm-studio/bin"
|
||||
|
||||
# ToolHive setup
|
||||
path_prepend "$HOME/.toolhive/bin"
|
||||
|
||||
# ==============================================================================
|
||||
# Local Overrides
|
||||
# ==============================================================================
|
||||
|
||||
14
zshrc
14
zshrc
@@ -16,10 +16,12 @@
|
||||
# Cursor's agent setup, which is used when the agent runs terminal commands.
|
||||
# Though it does also set a proper `TERM` value sometimes, hence the check for
|
||||
# `CURSOR_AGENT` as well.
|
||||
# - Claude Code's shell sessions, identified by `CLAUDECODE=1`.
|
||||
#
|
||||
if [[ -n "$VSCODE_RESOLVING_ENVIRONMENT" ]] ||
|
||||
[[ "$TERM" == "dumb" ]] ||
|
||||
[[ "$CURSOR_AGENT" == "1" ]]; then
|
||||
[[ "$CURSOR_AGENT" == "1" ]] ||
|
||||
[[ "$CLAUDECODE" == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
@@ -56,6 +58,9 @@ fi
|
||||
echo &&
|
||||
git clone --depth=1 "https://github.com/zdharma-continuum/zinit.git" "${ZINIT[BIN_DIR]}"
|
||||
|
||||
# Remove any stale Zinit plugin paths before loading to avoid issues.
|
||||
path=("${(@)path:#${ZINIT[HOME_DIR]}/plugins/*}")
|
||||
|
||||
# Load Zinit
|
||||
source "${ZINIT[BIN_DIR]}/zinit.zsh"
|
||||
|
||||
@@ -263,6 +268,12 @@ if ! command-exists mise; then
|
||||
fi
|
||||
|
||||
if command-exists mise; then
|
||||
# Remove any stale mise install paths before activation to ensure it correctly
|
||||
# activates. This ensures any tooling that starts shells with an existing set
|
||||
# of cached env vars will not cause issues. I'm looking at you, direnv for
|
||||
# VSCode.
|
||||
path=("${(@)path:#${MISE_HOME}/installs/*}")
|
||||
|
||||
# Activate mise. We cannot use cached-eval here as the activation script
|
||||
# dynamically adjusts how it modifies PATH on each invocation.
|
||||
eval "$("$MISE_INSTALL_PATH" activate zsh)"
|
||||
@@ -323,6 +334,7 @@ source "$DOTZSH/nix.zsh"
|
||||
source "$DOTZSH/restish.zsh"
|
||||
source "$DOTZSH/tldr.zsh"
|
||||
source "$DOTZSH/tmux.zsh"
|
||||
source "$DOTZSH/iterm2.zsh"
|
||||
source "$DOTZSH/vscode.zsh"
|
||||
source "$DOTZSH/zoxide.zsh"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user