diff --git a/.agents/skills/propose-tool-use-improvements/SKILL.md b/.agents/skills/propose-tool-use-improvements/SKILL.md new file mode 100644 index 00000000..0a83424f --- /dev/null +++ b/.agents/skills/propose-tool-use-improvements/SKILL.md @@ -0,0 +1,169 @@ +--- +name: propose-tool-use-improvements +description: Propose improvements to how the user currently uses their tools. Analyzes existing configurations, dotfiles, and workflows to suggest better patterns, unused features, integrations, or optimizations. +--- + +# Propose Tool Use Improvements + +Analyze how the user currently uses their tools and propose improvements—better configurations, unused features, workflow optimizations, or integrations they're missing. Focus on getting more value from what they already have. + +## When to Use + +- User shares dotfiles and wants optimization suggestions +- User describes a workflow that seems inefficient or manual +- User has tools that might have features they don't know about +- User mentions friction points that could be solved with better configuration +- User wants to level up their existing setup without adding new tools + +## Step 1: Analyze Current Configuration + +Look for: + +| What to Check | What to Find | +|--------------|--------------| +| **Config files** | `.tmux.conf`, `init.lua`, `.zshrc`, git configs—are they using defaults or customizing? | +| **Plugin ecosystems** | tpm for tmux, lazy.nvim for Neovim, zsh plugins—what's installed vs. what's available? | +| **Aliases/functions** | Are they repeating commands that could be aliased or scripted? | +| **Integration gaps** | Tools that could talk to each other but don't (e.g., fzf + git, zoxide + cd) | +| **Manual workflows** | Tasks done by hand that could be automated | + +## Step 2: Identify Improvement Areas + +Research what they're missing: + +1. **Hidden features** - Tools often have powerful features users don't discover +2. **Better defaults** - Modern tools often need config to shine +3. **Integration opportunities** - Chaining tools together (e.g., `fzf` + `bat` + `ripgrep`) +4. **Performance tuning** - Startup time, lazy loading, parallelization +5. **Workflow patterns** - Better ways to accomplish common tasks + +Use **code_search** and **fetch_content** to find: +- "Best practices for [tool] configuration 2024" +- "Hidden features of [tool]" +- "[Tool] + [other tool] integration" +- Official documentation for lesser-known features + +## Step 3: Structure Recommendations + +Group by impact and effort: + +| Category | Description | +|----------|-------------| +| **Quick wins** | One-line config changes, aliases, or keybindings | +| **Medium investment** | Plugin installations, workflow changes, script creation | +| **Deep improvements** | Architecture changes, custom scripting, migration to better patterns | + +For each suggestion include: +- **Current state** - What they're probably doing now +- **The improvement** - What to change and why it's better +- **Implementation** - Config snippet or command to make it happen + +## Step 4: Provide Specific Configurations + +Always give concrete, copy-pasteable improvements: + +```markdown +### Enable fzf previews with bat + +**Current:** Plain fzf without file previews +**Improvement:** Add syntax-highlighted previews + +```bash +# Add to .zshrc/.bashrc +export FZF_DEFAULT_OPTS="--preview 'bat --color=always --style=numbers --line-range=:500 {}'" +``` +``` + +## Response Format + +```markdown +## Improvements for Your [Tool/Workflow] + +### Quick Wins + +| Improvement | Why | Config | +|-------------|-----|--------| +| Enable tmux mouse mode | Scroll with trackpad, resize panes | `set -g mouse on` | +| Add zoxide to cd | Smarter directory jumping | `eval "$(zoxide init zsh)"` | + +### Medium Investment + +#### 1. [Feature Name] +**What you're missing:** [Description] +**The fix:** [Specific change] + +```bash +# config snippet +``` + +**Result:** [What improves] + +### Deep Improvements + +#### [Architecture Change] +[Description of significant workflow improvement] +... + +### Integration Opportunities + +Your [Tool A] + [Tool B] could work together: +- Current: [Manual process] +- Better: [Integrated process] +- How: [Implementation] +``` + +## Guidelines + +- **Assume good defaults first** - Don't suggest changes for change's sake; find real friction +- **Show the delta** - Make clear what changes vs. what stays the same +- **Provide configs** - Always include copy-pasteable snippets +- **Explain the "why"** - Help them understand what they're gaining +- **Respect complexity budgets** - Don't suggest 20 changes at once; prioritize +- **Check for existing setup** - Don't suggest what they already have +- **Version awareness** - Note if improvement requires tool updates + +## Example User Flow + +1. User: "here's my tmux.conf, how can I improve it?" +2. Read config → identify they're using mostly defaults, missing mouse mode, no vim keys, basic status bar +3. Research: `fetch_content` tmux documentation for newer features, best practices +4. Suggest: mouse mode, vim navigation, better status bar config, plugin recommendations (tpm + resurrect + continuum) +5. Provide specific config snippets for each +6. User asks: "what's resurrect get me?" → explain session persistence, show setup + +## Common Improvement Patterns + +### Tmux +- Mouse mode for scroll/resize +- Vim keys for navigation (`setw -g mode-keys vi`) +- Sensible prefix (Ctrl-a or Ctrl-space vs. Ctrl-b) +- tpm + essential plugins (resurrect, continuum, yank) +- Custom status bar with useful info + +### Neovim +- Lazy loading for plugins +- LSP configuration improvements +- Telescope/fzf integration tuning +- Better keymaps for common actions +- Auto-formatting on save + +### Shell (zsh/bash) +- zsh-autosuggestions + zsh-syntax-highlighting +- Better history settings (size, duplicates, sharing) +- fzf integration for history and files +- zoxide instead of/cd +- Starship prompt tuning + +### Git +- Useful aliases (co, br, ci, st) +- delta for diff viewing +- Better merge/diff tools +- Hooks for linting/formatting +- Worktree usage for multi-branch work + +### General CLI +- bat instead of cat (with config) +- ripgrep config file for defaults +- fd aliases for common finds +- just/task runner adoption for repeated commands +- direnv for project-specific env vars diff --git a/.agents/skills/propose-tools/SKILL.md b/.agents/skills/propose-tools/SKILL.md new file mode 100644 index 00000000..314a63a2 --- /dev/null +++ b/.agents/skills/propose-tools/SKILL.md @@ -0,0 +1,148 @@ +--- +name: propose-tools +description: Propose new CLI tools and applications based on the user's existing tool configuration. Analyzes Brewfiles, package manifests, or tool lists to suggest complementary additions with explanations of what value each adds to the workflow. +--- + +# Propose Tools + +Analyze the user's existing tool configuration and propose new tools that would complement their workflow. Explain what each tool does, why it fits their setup, and what specific value it adds. + +## When to Use + +- User shares a Brewfile, package.json, or list of installed tools and asks for recommendations +- User wants to discover tools in a specific category (e.g., "what are good Rust CLI tools?") +- User is setting up a new machine and wants suggestions +- User mentions a workflow pain point that could be solved with a tool + +## Step 1: Analyze Existing Tools + +First, understand what the user already has: + +| What to Look For | Why It Matters | +|-----------------|----------------| +| **Language preferences** | Rust tools? Go tools? Node-based? Suggests ecosystem preferences | +| **Terminal-centric vs GUI** | Heavy CLI suggests TUI tools; mixed suggests both | +| **Shell environment** | zsh/bash/fish with prompt customizers (starship, p10k) | +| **Editor setup** | Neovim, Emacs, VS Code—suggests integration opportunities | +| **Task runners** | just, task, make—suggests build/automation tools | +| **Version managers** | mise, asdf, nvm—suggests polyglot development | +| **Multiplexer/WM** | tmux, zellij, yabai, skhd—suggests power-user patterns | + +## Step 2: Research Complementary Tools + +Use **code_search** and **web_search** to find: + +1. **Direct complements** - Tools that enhance what they already use (e.g., `delta` for git users) +2. **Category gaps** - Missing categories they might benefit from (e.g., no file manager → suggest `yazi`) +3. **Modern alternatives** - Faster Rust/Go rewrites of tools they use (e.g., `ripgrep` → `grep`) +4. **Ecosystem standards** - Tools commonly paired with their stack + +Example searches: +``` +"modern CLI tools 2024 2025 Rust alternatives" +"best terminal file manager yazi lf ranger comparison" +"zellij vs tmux features benefits" +"complement to [tool they have] workflow" +``` + +## Step 3: Structure Recommendations + +Present tools in a table or list with: + +| Column | Purpose | +|--------|---------| +| **Tool** | Name and one-line description | +| **Why You'd Like It** | Connects to their existing workflow | +| **Replaces/Complements** | What it improves or works alongside | + +For high-interest tools, add: +- **Quick install** command (e.g., `brew install foo`) +- **What you'd gain** - Specific workflow improvements +- **What you might miss** - Honest trade-offs vs alternatives + +## Step 4: Categorize Suggestions + +Group recommendations by: + +- **Immediate wins** - Tools that slot into existing workflows +- **Worth experimenting** - Tools that replace something (tmux → zellij) +- **Honorable mentions** - Related tools for future exploration + +## Response Format + +```markdown +Based on your [file], here are [N] tools that would complement your workflow: + +## [N] Recommended Tools + +| Tool | Description | Why It Fits | +|------|-------------|-------------| +| yazi | Terminal file manager (Rust) | You use lf/fzf—yazi adds image previews + faster | +| atuin | Shell history with sync | You have starship—atuin upgrades Ctrl+R experience | + +### Deep Dive: [Most Relevant Tool] + +**What it gets you:** +- Feature A (how it improves on current tool) +- Feature B (new capability) + +**Quick try:** +\`\`\`bash +brew install [tool] +[quick start command] +\`\`\` + +**Trade-offs:** +| Current | This Tool | +|---------|-----------| +| X | Y | + +### Honorable Mentions +- tool-a - brief reason +- tool-b - brief reason +``` + +## Exclusions + +Avoid recommending these categories of tools: + +| Category | Examples | Why Exclude | +|----------|----------|-------------| +| **Already installed** | ripgrep, fd, fzf, zellij, atuin | Check their manifest—don't suggest what they have | +| **Duplicate functionality** | eza vs lsd vs exa, zellij vs tmux vs screen | One tool per category is enough | +| **Deprecated/unmaintained** | exa (use eza), bat-extras | Prefer actively maintained forks | +| **Niche without context** | kubectl plugins, language-specific LSPs | Unless they work in that domain | +| **GUI alternatives to their CLI tools** | VS Code when they use Neovim | Respect their terminal-centric choices | +| **Highly personal/dotfiles tools** | Shell prompts beyond starship/p10k, custom PS1 | These are deeply personal choices | + +### Common Tools to Check For + +Popular modern CLI tools that often appear in dotfiles—verify these aren't already present before suggesting: +- **Shell/terminal**: zellij, tmux, zoxide, atuin, mcfly, thefuck +- **File/text**: ripgrep, fd, fzf, eza, bat, delta, sd, yazi +- **Dev tools**: mise, asdf, just, hyperfine, tokei, grex + +### Handling User Exclusions + +If the user mentions tools to exclude: +- Note them explicitly at the start of recommendations +- Respect category-level exclusions (e.g., "no more Rust tools") +- Don't suggest alternatives to excluded tools (e.g., if they exclude zellij, don't push tmux "instead") + +## Guidelines + +- **Lead with the "why"** - Always connect suggestions back to their existing setup +- **Be honest about trade-offs** - Replacement tools have switching costs; acknowledge them +- **Respect their choices** - If they use tmux, don't push zellij hard—offer it as an experiment +- **Prioritize active projects** - Prefer tools with recent releases and healthy communities +- **Include install command** - Usually `brew install`, but adapt to their package manager +- **Limit to 10 main suggestions** - Too many is overwhelming; use "honorable mentions" for extras + +## Example User Flow + +1. User: "look at my brewfile - propose 10 other tools i might like" +2. Read Brewfile → identify Rust CLI tools, tmux, Neovim, task runners +3. Research: `code_search("zellij vs tmux features 2024")`, `web_search("modern Rust CLI tools")` +4. Suggest: yazi (complements fzf), zellij (tmux alt), atuin (enhances shell), etc. +5. User asks follow-up: "what would zellij get me?" +6. Deep dive with specific features, trade-offs, quick-start diff --git a/.gitignore b/.gitignore index 39809599..f24ed1b7 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,5 @@ pre temp temp.* temp +config/pi/auth.json +config/pi/sessions/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..c058d95c --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,5 @@ +This file provides guidance to AI agents when working with code in this repository. + +## Agent Instructions + +Read the `README.md`. Look at the skills in `./agents/skills/`. diff --git a/Makefile b/Makefile index 9b6f24b9..1d138b70 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ setup-common: bash ./tmux/setup.sh bash ./zsh/setup.sh bash ./fzf/setup.sh + bash ./scripts/setup-pi.sh bash ./scripts/setup-extras.sh setup-macos: export OS=macos @@ -20,7 +21,7 @@ setup-ubuntu: brew-pkgs dotfiles setup-common setup-wsl: export OS=wsl setup-wsl: dotfiles setup-common -.PHONY: setup-stow dotfiles +.PHONY: setup-stow dotfiles setup-uv setup-python STOW_ARGS=-vv setup-stow: @@ -30,8 +31,13 @@ dotfiles: setup-stow stow "$(STOW_ARGS)" -d dotfiles -t "$(HOME)" "$(OS)" stow "$(STOW_ARGS)" dotfiles stow "$(STOW_ARGS)" yabai - ln -sf ~/dotfiles/fish ~/.config/fish\ - + stow "$(STOW_ARGS)" skhd + ln -sf ~/dotfiles/fish ~/.config/fish + mkdir -p "$(HOME)/.agents" + ln -sfn ~/dotfiles/agents/skills "$(HOME)/.agents/skills" + mkdir -p "$(HOME)/.claude" + ln -sfn ~/dotfiles/agents/skills "$(HOME)/.claude/skills" + ln -sf ~/dotfiles/config/pi/agent/AGENTS.md "$(HOME)/.claude/CLAUDE.md" setup-uv: bash ./python/setup-uv.sh @@ -54,17 +60,6 @@ setup-vim: git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim "vim" +PluginInstall +qall -.PHONY: setup-nix nix-pkgs - -setup-nix: - curl -L https://nixos.org/nix/install | sh - . ./nix/load-"$(OS)".sh && nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable - . ./nix/load-"$(OS)".sh && nix-channel --update - -NIX_ARGS=--extra-experimental-features nix-command --extra-experimental-features flakes -nix-pkgs: setup-nix - . ./nix/load-"$(OS)".sh && cd nix && nix flake update "$(NIX_ARGS)" && (nix profile upgrade "$(NIX_ARGS)" nix || nix profile install "$(NIX_ARGS)" .) - .PHONY: setup-brew brew-pkgs setup-brew: diff --git a/README.md b/README.md index 68d0beaa..8a7d9e01 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,19 @@ # dotfiles -Setup and configuration for my terminal based developer workflow (MacOS/Ubuntu): +Setup and configuration for my terminal based developer workflow across three `OS` (MacOS, Ubuntu & WSL): - **Zsh** for a shell - **Homebrew** for shell tools - **mise** for programming language runtimes (except Python) - **uv** for Python runtime and virtual environments - **Neovim** for text editing +- **Makefile** for setup & maintenance - **Stow** for dotfiles symlinking This repo should be cloned into `$HOME` and set as `$XDG_CONFIG_HOME`. Many tools rely on setting this for the config stored in this repo to work. For other config that requires files in `$HOME` (such as `$HOME/.bashrc`) Stow is used to symlimk files. +Different files are symlinked based on the `OS` `Makefile` variable - usually it's just getting RC files for specific OS, ie `./dotfiles/macos/.zshrc`. + You can setup your machine using commands in `Makefile`. Commonly setting up a machine involves: - Installing packages with Homebrew @@ -28,7 +31,7 @@ Setup an Ubuntu machine: $ make setup-ubuntu ``` -This will also setup dependencies with Nix. +This will also setup dependencies with Homebrew. ### macOS @@ -40,7 +43,7 @@ $ make setup-macos This will: - Install Homebrew if not already installed -- Install all packages from the Brewfile +- Install all dependencies from `./brew/Brewfile` - Setup dotfiles with Stow - Configure tmux, Zsh, and fzf @@ -94,7 +97,7 @@ mise is used for managing programming language runtime versions (Python, Node.js ### Neovim -Neovim config is in `./nvim`. To use the Neovim setup, put this folder into `$XDG_CONFIG_HOME`. +Neovim config is in `./nvim`. To use the Neovim setup alone, put the `nvim` folder into `$XDG_CONFIG_HOME`. I use Lazy for package management in Neovim - it will install packages when you first open the editor. @@ -102,7 +105,7 @@ I use Lazy for package management in Neovim - it will install packages when you The `s` command opens a fuzzy file finder (fzf) to search and open files in `$EDITOR`. Run `s` in any directory, or pass a path like `s ~/projects`. Supports multi-select with Tab. -Lot's of aliases - see `scripts/aliases.sh`. +Lot's of aliases - see `./scripts/aliases.sh`. Some small interactive shell helper functions in `./scripts/funcs.sh`. ### Getting Kitty to Play Nice on macOS @@ -130,3 +133,12 @@ Had weird issue with the first execution of Kitty not loading the `kitty.conf` c $ launchctl load ~/Library/LaunchAgents/setenv.XDG_CONFIG_HOME.plist ``` + + +## Agent Configuration + +PI_CODING_AGENT_DIR in dotfiles/common/env.sh points pi's config to ~/dotfiles/config/pi/, which contains agent/AGENTS.md (agent instructions), settings.json, themes, and sessions. + +CLAUDE.md at the repo root serves the same purpose for Claude Code. + +Skills are defined once in agents/skills/ and symlinked by make dotfiles to both ~/.agents/skills (pi) and ~/.claude/skills (Claude Code). diff --git a/agents/skills/summarization/SKILL.md b/agents/skills/summarization/SKILL.md new file mode 100644 index 00000000..53abdee1 --- /dev/null +++ b/agents/skills/summarization/SKILL.md @@ -0,0 +1,19 @@ +--- +name: summarization +description: Summarizing articles, blog posts etc. +--- + +I will post an article and ask you to summarize it. + +Summarizing should list every idea, and every argument for and against it. You should add your own commentary if appropriate. Link to other ideas not in the text if you can. Each idea should be a single line with bullet points below it. There should be no Markdown bolding (ie **) of the idea or bullet points. + +Example summarization output: + +```md +This is an idea +- something +- something else + +This is another idea +- another thing +``` diff --git a/brew/Brewfile b/brew/Brewfile index 206350a6..8871be28 100644 --- a/brew/Brewfile +++ b/brew/Brewfile @@ -111,3 +111,5 @@ cask "mactex" brew "markdownlint-cli" cask "copilot-cli" +brew "git-delta" +cask "keycastr" diff --git a/config/pi/agent/AGENTS.md b/config/pi/agent/AGENTS.md new file mode 100644 index 00000000..151a2c15 --- /dev/null +++ b/config/pi/agent/AGENTS.md @@ -0,0 +1,23 @@ +## How to Respond + +Responses should be concise. + +List tradeoffs explicitly if appropriate. List assumptions explicitly if appropriate. List what you are uncertain about. + +Do not include summaries at the end of responses unless specifically asked. + +Try to push back if you can and offer different ideas or approaches. Try to explore a range of ideas, perspectives. + +Always create a plan and then ask to execute. You should rarely go off and implement without some back and forth conversation with me. + +## Searching & Reading + +When reading, read deeply, in great detail. Note intricacies. Go through everything. + +## Programming + +When you write Python code, make it type safe, so that it would pass strict type checking with a tool like basedpyright. + +Only include comments when they explain something that is not obvious from the code. + +Always respect existing conventions in each file and across the code base when making changes. diff --git a/config/pi/settings.json b/config/pi/settings.json new file mode 100644 index 00000000..983ae39b --- /dev/null +++ b/config/pi/settings.json @@ -0,0 +1,14 @@ +{ + "lastChangelogVersion": "0.65.2", + "defaultProvider": "openrouter", + "defaultModel": "moonshotai/kimi-k2.5", + "theme": "dracula", + "packages": [ + "npm:@aliou/pi-guardrails", + "npm:pi-web-access", + "npm:pi-vim", + "npm:@ifi/pi-plan" + ], + "defaultThinkingLevel": "high", + "quietStartup": false +} \ No newline at end of file diff --git a/config/pi/themes/dracula.json b/config/pi/themes/dracula.json new file mode 100644 index 00000000..1b1662cf --- /dev/null +++ b/config/pi/themes/dracula.json @@ -0,0 +1,88 @@ +{ + "$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json", + "name": "dracula", + "vars": { + "background": "#282a36", + "currentLine": "#44475a", + "selection": "#44475a", + "foreground": "#f8f8f2", + "comment": "#6272a4", + "cyan": "#8be9fd", + "green": "#50fa7b", + "orange": "#ffb86c", + "pink": "#ff79c6", + "purple": "#bd93f9", + "red": "#ff5555", + "yellow": "#f1fa8c", + "selectedBg": "#44475a", + "userMsgBg": "#21222c", + "toolPendingBg": "#1e1f28", + "toolSuccessBg": "#1e2b23", + "toolErrorBg": "#2b1e1e", + "customMsgBg": "#282433" + }, + "colors": { + "accent": "purple", + "border": "purple", + "borderAccent": "pink", + "borderMuted": "currentLine", + "success": "green", + "error": "red", + "warning": "yellow", + "muted": "comment", + "dim": "#525560", + "text": "", + "thinkingText": "comment", + + "selectedBg": "selectedBg", + "userMessageBg": "userMsgBg", + "userMessageText": "", + "customMessageBg": "customMsgBg", + "customMessageText": "", + "customMessageLabel": "purple", + "toolPendingBg": "toolPendingBg", + "toolSuccessBg": "toolSuccessBg", + "toolErrorBg": "toolErrorBg", + "toolTitle": "cyan", + "toolOutput": "comment", + + "mdHeading": "pink", + "mdLink": "cyan", + "mdLinkUrl": "comment", + "mdCode": "green", + "mdCodeBlock": "foreground", + "mdCodeBlockBorder": "comment", + "mdQuote": "comment", + "mdQuoteBorder": "comment", + "mdHr": "comment", + "mdListBullet": "pink", + + "toolDiffAdded": "green", + "toolDiffRemoved": "red", + "toolDiffContext": "comment", + + "syntaxComment": "comment", + "syntaxKeyword": "pink", + "syntaxFunction": "green", + "syntaxVariable": "foreground", + "syntaxString": "yellow", + "syntaxNumber": "purple", + "syntaxType": "cyan", + "syntaxOperator": "pink", + "syntaxPunctuation": "foreground", + + "thinkingOff": "currentLine", + "thinkingMinimal": "#6272a4", + "thinkingLow": "#8be9fd", + "thinkingMedium": "#bd93f9", + "thinkingHigh": "#ff79c6", + "thinkingXhigh": "#ff5555", + + "bashMode": "orange" + }, + "export": { + "pageBg": "#1e1f28", + "cardBg": "#282a36", + "infoBg": "#44475a" + } +} diff --git a/dotfiles/.envrc b/dotfiles/.envrc index 41bc4edb..90ab15fa 100644 --- a/dotfiles/.envrc +++ b/dotfiles/.envrc @@ -1,3 +1 @@ source_env_if_exists ~/.env.secret -export TRACE=0 -source .venv/bin/activate diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig index 3311a59e..2565796f 100644 --- a/dotfiles/.gitconfig +++ b/dotfiles/.gitconfig @@ -16,7 +16,7 @@ [core] editor = nvim excludesfile = ~/dotfiles/dotfiles/.gitignore - pager = bat + pager = delta [diff] algorithm = histogram @@ -26,6 +26,16 @@ mnemonicPrefix = true renames = true +[delta] + navigate = true + light = false + side-by-side = true + line-numbers = true + hyperlinks = true + +[interactive] + diffFilter = delta --color-only + [fetch] prune = true pruneTags = true @@ -35,7 +45,7 @@ defaultBranch = main [merge] - conflictstyle = diff3 + conflictstyle = zdiff3 ff = true tool = nvimdiff diff --git a/dotfiles/.tmux.conf b/dotfiles/.tmux.conf index 5cc09a4a..9d1243fe 100644 --- a/dotfiles/.tmux.conf +++ b/dotfiles/.tmux.conf @@ -42,7 +42,7 @@ bind -n M-Down select-pane -D # splitting panes bind-key c new-window -c "#{pane_current_path}" bind-key v split-window -h -bind-key s split-window -l 8 -v +bind-key s split-window -l 12 -v bind-key S split-window bind-key e choose-session @@ -69,3 +69,6 @@ set-option -g focus-events on set-option -sa terminal-overrides ',screen-256-color:RGB' run '~/.tmux/plugins/tpm/tpm' + +# pi needs this... +set -g extended-keys on diff --git a/dotfiles/common/.zshrc b/dotfiles/common/.zshrc index f111d262..ccaf9a8d 100644 --- a/dotfiles/common/.zshrc +++ b/dotfiles/common/.zshrc @@ -18,10 +18,49 @@ fzf_init() { bindkey -v source $HOME/.fzf.zsh export FZF_DEFAULT_COMMAND='rg --files --hidden --smart-case --line-buffered --ignore-file ~/.gitignore' - export FZF_DEFAULT_OPTS='--height 40% --preview "bat -p {}" --preview-window=down:50%:wrap --border=none' + export FZF_DEFAULT_OPTS='--height 40% --preview "bat -p {} 2>/dev/null || tree -C -L 2 {}" --preview-window=down:50%:wrap --border=none' export FZF_CTRL_R_OPTS='--height 20% --no-preview' } +git_fzf_init() { + # Checkout branch with commit preview + alias fbr='git branch -a | fzf --preview "git log --oneline --graph --date=short --color=always --pretty=format:\"%C(auto)%cd %h%d %s\" {1} | head -20" | sed "s/^[* ]*//" | xargs git checkout' + + # Browse commit history with diff preview + alias fshow='git log --oneline --all | fzf --preview "git show --stat --color=always {1}" --preview-window=right:60% | cut -d" " -f1 | xargs git show' + + # Interactive git status + add + alias fga='git -c color.status=always status --short | fzf --multi --ansi --preview "git diff --color=always -- {2}" | awk "{print \$2}" | xargs git add' + + # Checkout branch/tag with interactive selection + alias fco='git branch -a --format="%(refname:short)" | fzf --preview "git log --oneline --graph --color=always {} | head -15" | xargs git checkout' + + # Browse and apply stashes with preview + alias fstash='git stash list | fzf --preview "git stash show --stat --color=always {1}" --preview-window=right:50% | cut -d: -f1 | xargs git stash pop' + + # Interactive git log browser with diff preview + alias flog='git log --oneline --all --decorate | fzf --preview "git show --color=always {1}" --preview-window=right:60% --bind "enter:execute(git show {1} | less -R)"' + + # Delete branches (local and remote) + alias fbd='git branch | fzf --multi --preview "git log --oneline --graph --color=always {} | head -10" | xargs git branch -d' +} + +# Unified project switching with tmux + fzf +tms() { + local session + # Search for git repos and common project directories + session=$(find ~/projects ~/work ~/personal ~/dotfiles -maxdepth 3 -type d \( -name .git -o -name node_modules -o -name .venv -o -name __pycache__ \) -prune -o -type d -print 2>/dev/null | \ + grep -v "^$" | \ + fzf --preview 'ls -la {}' --preview-window=right:30% --prompt="Project: ") + + if [[ -n "$session" ]]; then + local name=$(basename "$session" | tr . _) + tmux has-session -t="$name" 2>/dev/null || tmux new-session -ds "$name" -c "$session" + tmux switch-client -t "$name" 2>/dev/null || tmux attach -t "$name" + fi +} +alias tp='tms' + ruby_init() { eval "$(rbenv init -)" rbenv shell 2.7.2 @@ -62,6 +101,15 @@ export HISTFILE=~/.zsh_history export HISTFILESIZE=10000000 export HISTSIZE=$HISTFILESIZE SAVEHIST=$HISTSIZE + +# History optimization: deduplication and sharing +setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first +setopt HIST_IGNORE_DUPS # Don't record consecutive duplicates +setopt HIST_IGNORE_ALL_DUPS # Remove older duplicate from history +setopt HIST_FIND_NO_DUPS # Don't show duplicates in search +setopt HIST_SAVE_NO_DUPS # Don't save duplicates to file +setopt SHARE_HISTORY # Share history between all sessions +setopt HIST_REDUCE_BLANKS # Remove superfluous blanks from commands export AWS_LOG_LEVEL=3 alias brew='arch -arm64 brew' @@ -99,16 +147,11 @@ zi() { } eval "$(ssh-agent)" &>/dev/null &>/dev/null - -# Lazy-load direnv (only initialize on first cd) -direnv() { - unfunction direnv - eval "$(command direnv hook zsh)" - direnv "$@" -} +eval "$(direnv hook zsh)" # done twice for a reason pretzo_init fzf_init +git_fzf_init source "$HOME/dotfiles/dotfiles/common/env.sh" source "$HOME/dotfiles/dotfiles/common/setup-path.sh" diff --git a/dotfiles/common/env.sh b/dotfiles/common/env.sh index d7b84e4e..0e2f48d3 100644 --- a/dotfiles/common/env.sh +++ b/dotfiles/common/env.sh @@ -3,3 +3,4 @@ export XDG_CONFIG_HOME=~/dotfiles export PERSONAL_PATH="$HOME/personal" export DIRENV_LOG_FORMAT="" # export TODO="$PERSONAL_PATH/todo.md" +export PI_CODING_AGENT_DIR="$HOME/dotfiles/config/pi" diff --git a/dotfiles/macos/.zshrc b/dotfiles/macos/.zshrc index 7647f714..68cd82b8 100644 --- a/dotfiles/macos/.zshrc +++ b/dotfiles/macos/.zshrc @@ -1,11 +1,10 @@ source $HOME/dotfiles/dotfiles/common/.zshrc export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib -# eval "$(gh copilot alias -- zsh)" [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh . "$HOME/.local/bin/env" eval "$(keychain --eval --quiet ~/.ssh/github-air ~/.ssh/macbook-pro)" -eval "$(/opt/homebrew/bin/brew shellenv)" +eval "$(/opt/homebrew/bin/brew shellenv zsh)" # Skip quote display for faster startup (can be called manually with 'quote' command) # quote diff --git a/kitty/init.vim b/kitty/init.vim deleted file mode 100644 index af80c9c8..00000000 --- a/kitty/init.vim +++ /dev/null @@ -1,31 +0,0 @@ -set relativenumber -set number -set mouse=a -set clipboard+=unnamedplus -set virtualedit=all -set scrollback=100000 -set termguicolors -set laststatus=0 -set background=dark -set ignorecase -set scrolloff=8 - -map q :qa! - -" Short highlight on yanked text -augroup highlight_yank - autocmd! - autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank({timeout = 40}) -augroup END - -augroup start_at_bottom - autocmd! - autocmd VimEnter * normal G -augroup END - -augroup prevent_insert - autocmd! - autocmd TermEnter * stopinsert -augroup END - -open_url_with default diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 3ba882b9..bde34cff 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -1,5 +1,5 @@ -# font_family Fira Code -font_family Cascadia Mono NF +font_family Fira Code +# font_family Cascadia Mono NF font_size 16 @@ -9,8 +9,6 @@ initial_window_height 800 hide_window_decorations no -scrollback_pager nvim --noplugin -u ~/dotfiles/kitty/init.vim -c "silent write! /tmp/kitty_scrollback_buffer | te cat /tmp/kitty_scrollback_buffer - " - map ctrl+enter toggle_fullscreen open_url_with default @@ -19,3 +17,4 @@ confirm_os_window_close 0 include ~/dotfiles/kitty/current-theme.conf macos_titlebar_color #282A36 +map ctrl+shift+h show_scrollback diff --git a/macos/km/adams-macros/Activate Finder.kmmacros b/macos/km/adams-macros/Activate Finder.kmmacros new file mode 100644 index 00000000..cf758ade --- /dev/null +++ b/macos/km/adams-macros/Activate Finder.kmmacros @@ -0,0 +1,70 @@ + + + + + + Activate + Normal + CreationDate + 624329848.61627197 + Macros + + + Actions + + + ActionUID + 1972 + AllWindows + + AlreadyActivatedActionType + Hide + Application + + BundleIdentifier + com.apple.finder + Name + Finder + NewFile + /System/Library/CoreServices/Finder.app + + MacroActionType + ActivateApplication + ReopenWindows + + TimeOutAbortsMacro + + + + CreationDate + 691403255.55500901 + ModificationDate + 691403279.84610605 + Name + Activate Finder + Triggers + + + FireType + Pressed + KeyCode + 96 + MacroTriggerType + HotKey + Modifiers + 0 + + + UID + 0FE311D8-2BD4-431A-83EB-D28C6B64BB11 + + + Name + adams-macros + ToggleMacroUID + 72F63232-9754-45AC-8EC5-D8D1218F06EA + UID + 542BC640-C047-4088-A052-38BEC2E4354B + + + diff --git a/macos/km/adams-macros/Activate Firefox.kmmacros b/macos/km/adams-macros/Activate Firefox.kmmacros new file mode 100644 index 00000000..3b00e71d --- /dev/null +++ b/macos/km/adams-macros/Activate Firefox.kmmacros @@ -0,0 +1,70 @@ + + + + + + Activate + Normal + CreationDate + 624329848.61627197 + Macros + + + Actions + + + ActionUID + 54420 + AllWindows + + AlreadyActivatedActionType + Normal + Application + + BundleIdentifier + org.mozilla.firefox + Name + Firefox + NewFile + /Applications/Firefox.app + + MacroActionType + ActivateApplication + ReopenWindows + + TimeOutAbortsMacro + + + + CreationDate + 624055430.31178904 + ModificationDate + 747478493.59879398 + Name + Activate Firefox + Triggers + + + FireType + Pressed + KeyCode + 122 + MacroTriggerType + HotKey + Modifiers + 6912 + + + UID + 46F064BE-16CD-41AD-8E64-67A16B7D6880 + + + Name + adams-macros + ToggleMacroUID + 72F63232-9754-45AC-8EC5-D8D1218F06EA + UID + 542BC640-C047-4088-A052-38BEC2E4354B + + + diff --git a/macos/km/adams-macros/Activate Swinsian.kmmacros b/macos/km/adams-macros/Activate Swinsian.kmmacros new file mode 100644 index 00000000..3a0ded9f --- /dev/null +++ b/macos/km/adams-macros/Activate Swinsian.kmmacros @@ -0,0 +1,70 @@ + + + + + + Activate + Normal + CreationDate + 624329848.61627197 + Macros + + + Actions + + + ActionUID + 35 + AllWindows + + AlreadyActivatedActionType + Hide + Application + + BundleIdentifier + com.swinsian.Swinsian + Name + Swinsian + NewFile + /Applications/Swinsian.app + + MacroActionType + ActivateApplication + ReopenWindows + + TimeOutAbortsMacro + + + + CreationDate + 624055303.84905303 + ModificationDate + 624055489.35700703 + Name + Activate Swinsian + Triggers + + + FireType + Pressed + KeyCode + 99 + MacroTriggerType + HotKey + Modifiers + 0 + + + UID + A2150061-B904-49FE-BB56-923A44A915B3 + + + Name + adams-macros + ToggleMacroUID + 72F63232-9754-45AC-8EC5-D8D1218F06EA + UID + 542BC640-C047-4088-A052-38BEC2E4354B + + + diff --git a/macos/km/adams-macros/Activate iTerm.kmmacros b/macos/km/adams-macros/Activate iTerm.kmmacros new file mode 100644 index 00000000..08e94a42 --- /dev/null +++ b/macos/km/adams-macros/Activate iTerm.kmmacros @@ -0,0 +1,70 @@ + + + + + + Activate + Normal + CreationDate + 624329848.61627197 + Macros + + + Actions + + + ActionUID + 37 + AllWindows + + AlreadyActivatedActionType + Normal + Application + + BundleIdentifier + net.kovidgoyal.kitty + Name + kitty + NewFile + /Applications/kitty.app + + MacroActionType + ActivateApplication + ReopenWindows + + TimeOutAbortsMacro + + + + CreationDate + 624055456.56697798 + ModificationDate + 747478487.14527905 + Name + Activate iTerm + Triggers + + + FireType + Pressed + KeyCode + 120 + MacroTriggerType + HotKey + Modifiers + 6912 + + + UID + EAB852BA-7FF0-4A6A-862B-2D503F45A748 + + + Name + adams-macros + ToggleMacroUID + 72F63232-9754-45AC-8EC5-D8D1218F06EA + UID + 542BC640-C047-4088-A052-38BEC2E4354B + + + diff --git a/macos/km/adams-macros/Open Firefox.kmmacros b/macos/km/adams-macros/Open Firefox.kmmacros new file mode 100644 index 00000000..679bea56 --- /dev/null +++ b/macos/km/adams-macros/Open Firefox.kmmacros @@ -0,0 +1,96 @@ + + + + + + Activate + Normal + CreationDate + 624329848.61627197 + Macros + + + Actions + + + ActionUID + 54418 + AllWindows + + AlreadyActivatedActionType + Normal + Application + + BundleIdentifier + org.mozilla.firefox + Name + Firefox + NewFile + /Applications/Firefox.app + + IsActive + + MacroActionType + ActivateApplication + ReopenWindows + + TimeOutAbortsMacro + + + + ActionUID + 54419 + DisplayKind + None + HonourFailureSettings + + IncludeStdErr + + MacroActionType + ExecuteAppleScript + Path + ~/dotfiles/macos/applescripts/open_firefox.scpt + Text + + TimeOutAbortsMacro + + TrimResults + + TrimResultsNew + + UseText + + + + CreationDate + 622642165.90767503 + ModificationDate + 739174729.066926 + Name + Open Firefox + Triggers + + + FireType + Pressed + KeyCode + 17 + MacroTriggerType + HotKey + Modifiers + 4608 + + + UID + 78FF41B2-9826-42CD-A39C-D73DAB209131 + + + Name + adams-macros + ToggleMacroUID + 72F63232-9754-45AC-8EC5-D8D1218F06EA + UID + 542BC640-C047-4088-A052-38BEC2E4354B + + + diff --git a/macos/km/adams-macros/Open Shell.kmmacros b/macos/km/adams-macros/Open Shell.kmmacros new file mode 100644 index 00000000..81d7b58c --- /dev/null +++ b/macos/km/adams-macros/Open Shell.kmmacros @@ -0,0 +1,109 @@ + + + + + + Activate + Normal + CreationDate + 624329848.61627197 + Macros + + + Actions + + + ActionUID + 38 + AllWindows + + AlreadyActivatedActionType + SwitchToLast + Application + + BundleIdentifier + net.kovidgoyal.kitty + Name + kitty + NewFile + /Applications/kitty.app + + IsActive + + MacroActionType + ActivateApplication + ReopenWindows + + TimeOutAbortsMacro + + + + ActionUID + 39 + DisplayKind + Asynchronously + HonourFailureSettings + + IncludeStdErr + + MacroActionType + ExecuteAppleScript + Path + ~/dotfiles/macos/applescripts/open_terminal.scpt + Text + if isAppRunning("iTerm") then + tell application "iTerm" + set myterm to (make new terminal) + tell myterm + set mysession to (make new session at the end of sessions) + tell mysession + exec command "/bin/bash -l" + end tell + end tell + activate + end tell +else + activate application "iTerm" +end if + TimeOutAbortsMacro + + TrimResults + + TrimResultsNew + + UseText + + + + CreationDate + 622642297.28663504 + ModificationDate + 739174732.94170904 + Name + Open Shell + Triggers + + + FireType + Pressed + KeyCode + 8 + MacroTriggerType + HotKey + Modifiers + 4608 + + + UID + 42151B21-5BB3-4452-9BA2-777F08A7CD81 + + + Name + adams-macros + ToggleMacroUID + 72F63232-9754-45AC-8EC5-D8D1218F06EA + UID + 542BC640-C047-4088-A052-38BEC2E4354B + + + diff --git a/mise/config.toml b/mise/config.toml index 319ed3ec..628e60d9 100644 --- a/mise/config.toml +++ b/mise/config.toml @@ -23,3 +23,4 @@ rust = "latest" # Cargo tools "cargo:prosemd-lsp" = "latest" +"github:can1357/oh-my-pi" = "latest" diff --git a/nix/default-nix.old b/nix/default-nix.old deleted file mode 100644 index 84672dc0..00000000 --- a/nix/default-nix.old +++ /dev/null @@ -1,84 +0,0 @@ -{ pkgs ? import { }, devShell ? false }: - -let - isDarwin = pkgs.stdenv.isDarwin; - isLinux = pkgs.stdenv.isLinux; -in -with pkgs; [ - # curlWithGnuTls - git - gnugrep - gnumake - findutils - gnused - jq - stow - nodejs_18 - ripgrep - shunit2 - tree - wget - dpkg - # toybox - unzip - zip - zsh - inetutils -] -++ lib.optionals isLinux [ python311 ] -++ lib.optionals isDarwin [ - cargo - locale - llvm - cmakeMinimal - gtk4 - python311 -] -++ lib.optionals devShell [ - bat - cbfmt - marksman - checkmake - direnv - efm-langserver - exa - flyctl - just - entr - #fzf - gh - go - lsd - httpie - hack-font - nerdfonts - pandoc - texlive.combined.scheme-tetex - beautysh - #hadolint - htop - tig - ov - lazydocker - lazygit - neovim - codespell - shellharden - nodePackages_latest.markdownlint-cli - nodePackages_latest.prettier - nodePackages_latest.sql-formatter - nodePackages_latest.stylelint - #yamlfix - shellcheck - starship - stylua - tmux - tree - vimPlugins.packer-nvim - zoxide - ruby - lua - actionlint - zig - cbonsai -] diff --git a/nix/flake.lock b/nix/flake.lock deleted file mode 100644 index 28ab3b0b..00000000 --- a/nix/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1768127708, - "narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/nix/flake.nix b/nix/flake.nix deleted file mode 100644 index 57880211..00000000 --- a/nix/flake.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ - description = "Adam Green's development environment."; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { self, nixpkgs, flake-utils, ... }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { inherit system; }; - in - { - defaultPackage = with pkgs; buildEnv { - name = "shell"; - paths = [ - # actionlint # Installed via Homebrew to avoid nokogiri build issues - go-tools - bash - bat - beautysh - cargo - cbfmt - cbonsai - checkmake - cmakeMinimal - codespell - direnv - # dpkg - efm-langserver - entr - findutils - # fish - fd - csvlens - flyctl - gh - git - gnugrep - gnumake - gnused - go - gtk4 - hack-font - hadolint - htop - httpie - inetutils - jq - just - lazydocker - lazygit - llvm - locale - lsd - lua - marksman - neovim - nerd-fonts.fira-code - nodePackages_latest.markdownlint-cli - nodePackages_latest.prettier - nodePackages_latest.sql-formatter - nodePackages_latest.stylelint - nodejs_22 - ov - pandoc - ripgrep - rmtrash - ruby - shellcheck - shellharden - shunit2 - starship - stow - stylua - # texlive.combined.scheme-tetex - tig - tmux - tree - unzip - wget - # yamlfix - zig - zip - go-task - zoxide - zsh - ]; - }; - } - ); -} diff --git a/nix/load-macos.sh b/nix/load-macos.sh deleted file mode 100644 index 14618c21..00000000 --- a/nix/load-macos.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh diff --git a/nix/load-ubuntu.sh b/nix/load-ubuntu.sh deleted file mode 100644 index c1d6f19d..00000000 --- a/nix/load-ubuntu.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -. "$HOME/.nix-profile/etc/profile.d/nix.sh" -export PATH="$HOME/.nix-profile/bin:$PATH" diff --git a/nix/nix.conf b/nix/nix.conf deleted file mode 100644 index c7d7291e..00000000 --- a/nix/nix.conf +++ /dev/null @@ -1 +0,0 @@ -experimental-features = nix-command flakes diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index fe1d5612..2a03eb72 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,63 +1,61 @@ { - "CopilotChat.nvim": { "branch": "main", "commit": "a89f5f1162b04a0962e5f4c3cdf248a81e7e53cb" }, - "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, + "CopilotChat.nvim": { "branch": "main", "commit": "743d6005fb412c85309d3f3aa45f18f3a2fb2098" }, + "LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" }, "Vim-Jinja2-Syntax": { "branch": "master", "commit": "2c17843b074b06a835f88587e1023ceff7e2c7d1" }, - "barbar.nvim": { "branch": "master", "commit": "807bede7ef1d8e2ac5f108e9ac8123b1e2d321e3" }, + "barbar.nvim": { "branch": "master", "commit": "539d73def39c9172b4d4d769f14090e08f37b29d" }, "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, - "blink-cmp-dictionary": { "branch": "master", "commit": "5f1a703416e5090b9633c43873dba8ba03b0fb23" }, - "blink-emoji.nvim": { "branch": "master", "commit": "a77aebc092ebece1eed108f301452ae774d6b67a" }, - "blink-ripgrep.nvim": { "branch": "main", "commit": "56084d1f45c8621d23d4bac724c2dc50b1eb75db" }, - "blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" }, + "blink-cmp-dictionary": { "branch": "master", "commit": "35142bba869b869715e91a99d2f46bcf93fca4ae" }, + "blink-cmp-env": { "branch": "main", "commit": "99af62c1f9aa46005e8f50ad4ccee581946546ca" }, + "blink-emoji.nvim": { "branch": "master", "commit": "066013e4c98a9318408ee3f1ca2dbcb6fa3e4c06" }, + "blink-ripgrep.nvim": { "branch": "main", "commit": "fc72cfa7ef800146ceca336fc5ca7fc874594593" }, + "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" }, "blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" }, - "bullets.vim": { "branch": "master", "commit": "8f3259e807c40b91d247f612823295ab99777a65" }, - "conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" }, - "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, - "copilot.lua": { "branch": "master", "commit": "0a7502946845fb14b860a6384c709a791bbab96a" }, - "dbtpal": { "branch": "main", "commit": "706134b879eb2f48b2abf56f29e95a30a52cf398" }, + "bullets.vim": { "branch": "master", "commit": "89294b8930e660936374fb763ac48a1ac51dd29c" }, + "conform.nvim": { "branch": "master", "commit": "40dcec5555f960b0a04340d76eabdf4efe78599d" }, + "copilot.lua": { "branch": "master", "commit": "00446a63cba4cc59bb24fc1e210a555a3e4acdfb" }, + "dbtpal": { "branch": "main", "commit": "981eab51609362712c64e3cf3fb773fe11f859b9" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "emmet-vim": { "branch": "master", "commit": "6c511a8d7d2863066f32e25543e2bb99d505172c" }, - "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "gitsigns.nvim": { "branch": "main", "commit": "17ab794b6fce6fce768430ebc925347e349e1d60" }, - "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "leap.nvim": { "branch": "main", "commit": "f19d43590c4b6d31188ee1ea2954d2b7558a9e11" }, - "lualine.nvim": { "branch": "master", "commit": "0ea56f91b7f51a37b749c050a5e5dfdd56b302b3" }, + "emmet-vim": { "branch": "master", "commit": "e98397144982d1e75b20d94d55a82de3ec8f648d" }, + "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, + "gitsigns.nvim": { "branch": "main", "commit": "9f3c6dd7868bcc116e9c1c1929ce063b978fa519" }, + "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, - "mini.nvim": { "branch": "main", "commit": "e7538b549361c9ac8416a07b0223ce03c508bfe7" }, - "nvim-autopairs": { "branch": "master", "commit": "2a406cdd8c373ae7fe378a9e062a5424472bd8d8" }, - "nvim-bqf": { "branch": "main", "commit": "e20417d5e589e03eaaaadc4687904528500608be" }, + "mini.icons": { "branch": "main", "commit": "5b9076dae1bfbe47ba4a14bc8b967cde0ab5d77e" }, + "mini.nvim": { "branch": "main", "commit": "0098de999048af0539183d625c52d733318a441b" }, + "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, + "nvim-bqf": { "branch": "main", "commit": "f65fba733268ffcf9c5b8ac381287eca7c223422" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-lint": { "branch": "master", "commit": "5b1bdf306bd3e565908145279e8bbfc594dac3b3" }, - "nvim-lspconfig": { "branch": "master", "commit": "4ea9083b6d3dff4ddc6da17c51334c3255b7eba5" }, - "nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" }, - "nvim-treesitter-context": { "branch": "master", "commit": "439789a9a8df9639ecd749bb3286b77117024a6f" }, + "nvim-lint": { "branch": "master", "commit": "606b823a57b027502a9ae00978ebf4f5d5158098" }, + "nvim-lspconfig": { "branch": "master", "commit": "ead0f5f342d8d323441e7d4b88f0fc436a81ad5f" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-treesitter-context": { "branch": "master", "commit": "64dd4cf3f6fd0ab17622c5ce15c91fc539c3f24a" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" }, - "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, - "nvim-web-devicons": { "branch": "master", "commit": "c90dee4e930ab9f49fa6d77f289bff335b49e972" }, + "nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" }, + "nvim-web-devicons": { "branch": "master", "commit": "f66cdfef5e84112045b9ebc3119fee9bddb3c687" }, "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, - "oil.nvim": { "branch": "master", "commit": "302bbaceeafc690e6419e0c8296e804d60cb9446" }, + "oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" }, "peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "semshi": { "branch": "master", "commit": "7f18bedc70cbb7aa68dcc6df5e730d88e4527622" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, - "telescope-git-file-history.nvim": { "branch": "master", "commit": "c27d99ba88ec5f0b6d2b9f9bc67dd3d14c610b25" }, - "telescope-makefile": { "branch": "master", "commit": "6e5b5767751dbf73ad4f126840dcf1abfc38e891" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope-git-file-history.nvim": { "branch": "master", "commit": "4442114f9257e682e60a8cb6de14cf988e26055c" }, + "telescope-makefile": { "branch": "master", "commit": "f35425d7d53d92a04215c3714a5819811d2842c3" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" }, - "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, - "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" }, - "vim": { "branch": "master", "commit": "d4b0823100c702af127cba8dd5595a8f599041ec" }, - "vim-argwrap": { "branch": "master", "commit": "f3e26a5ad249d09467804b92e760d08b1cc457a1" }, + "telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" }, + "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, + "undotree": { "branch": "master", "commit": "d8f99084d98c32f651860eb0baaf89759f91debc" }, + "vim": { "branch": "master", "commit": "6b0f9cca6263f60ef961d139541a999aeee97006" }, + "vim-argwrap": { "branch": "master", "commit": "03615d1eed248408567bc8fa6a5a8c94ef3cd170" }, "vim-bufkill": { "branch": "master", "commit": "3113181d0c1bfb8719f3ddcd2e2f35a8d763d1e5" }, "vim-closetag": { "branch": "master", "commit": "d0a562f8bdb107a50595aefe53b1a690460c3822" }, - "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, + "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, "vim-grepper": { "branch": "master", "commit": "acaaf32edaa11d82fb972d2af36b949ec3042928" }, - "vim-markdown-toc": { "branch": "master", "commit": "aa9cc3b07791db5cbe5f29d661763bc0eb4fb7c1" }, + "vim-markdown-toc": { "branch": "master", "commit": "66026b323379c9a712c6169cd43153216acef090" }, "vim-one": { "branch": "master", "commit": "187f5c85b682c1933f8780d4d419c55d26a82e24" }, "vim-python-pep8-indent": { "branch": "master", "commit": "60ba5e11a61618c0344e2db190210145083c91f8" }, - "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, - "vim-table-mode": { "branch": "master", "commit": "e4365bde024f73e205eefa2fb78e3029ddb92ea9" }, + "vim-table-mode": { "branch": "master", "commit": "bb025308a45c67c7c8f0763ba37bc2ee3f534df0" }, "winresizer": { "branch": "master", "commit": "9bd559a03ccec98a458e60c705547119eb5350f3" }, - "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } + "zen-mode.nvim": { "branch": "main", "commit": "8564ce6d29ec7554eb9df578efa882d33b3c23a7" } } diff --git a/nvim/lua/config/keymap.lua b/nvim/lua/config/keymap.lua index a03fd6a5..bfac5cf7 100644 --- a/nvim/lua/config/keymap.lua +++ b/nvim/lua/config/keymap.lua @@ -76,6 +76,11 @@ km("n", "m", 'Aif __name__ == "__main__":', opts) -- Run current buffer in Python km("n", "", ":!python %:p ", opts) +-- mini.surround help +vim.keymap.set("n", "?s", function() + print("Surround: ys{motion}{char} add | ds{char} delete | cs{old}{new} replace") +end, { desc = "Surround help" }) + -- Plugins km("n", "a", ":ArgWrap", opts) diff --git a/nvim/lua/plugins/cmp.lua b/nvim/lua/plugins/cmp.lua index 7b555c7c..07408f01 100644 --- a/nvim/lua/plugins/cmp.lua +++ b/nvim/lua/plugins/cmp.lua @@ -15,9 +15,9 @@ return { "moyiz/blink-emoji.nvim", "nvim-lua/plenary.nvim", "L3MON4D3/LuaSnip", + "bydlw98/blink-cmp-env", }, version = "*", - ---@module 'blink.cmp' ---@type blink.cmp.Config opts = { @@ -34,7 +34,7 @@ return { "accept", }, [""] = { - "accept_and_enter", + -- "accept_and_enter", "fallback", }, }, @@ -86,18 +86,7 @@ return { and vim.bo.filetype ~= "TelescopePrompt" end, draw = { - columns = { - { - "label", - -- "label_description", - -- gap = 3 - }, - { - "kind_icon", - gap = 1, - "source_name", - }, - }, + columns = { { "label" }, { "kind_icon", gap = 1, "source_name" } }, components = { kind_icon = { ellipsis = false, @@ -178,21 +167,9 @@ return { -- Adjusts spacing to ensure icons are aligned nerd_font_variant = "mono", }, - - -- Default list of enabled providers defined so that you can extend it - -- elsewhere in your config, without redefining it, due to `opts_extend` sources = { min_keyword_length = 2, - default = { - "copilot", - "snippets", - "path", - "lsp", - "buffer", - "ripgrep", - "emoji", - "dictionary", - }, + default = { "copilot", "snippets", "path", "lsp", "buffer", "ripgrep", "emoji", "dictionary" }, per_filetype = { markdown = { "obsidian", @@ -205,21 +182,8 @@ return { "emoji", "dictionary", }, - go = { - "snippets", - "path", - "lsp", - "buffer", - "ripgrep", - }, - python = { - "copilot", - "snippets", - "path", - "lsp", - "buffer", - "ripgrep", - }, + go = { "snippets", "path", "lsp", "buffer", "ripgrep" }, + python = { "copilot", "snippets", "path", "lsp", "buffer", "ripgrep" }, }, providers = { copilot = { diff --git a/nvim/lua/plugins/copilot.lua b/nvim/lua/plugins/copilot.lua index 89e89ab4..4af9a4c0 100644 --- a/nvim/lua/plugins/copilot.lua +++ b/nvim/lua/plugins/copilot.lua @@ -22,14 +22,6 @@ return { }, }, }, - { - "zbirenbaum/copilot-cmp", - event = { "BufEnter" }, - dependencies = { "zbirenbaum/copilot.lua" }, - config = function() - require("copilot_cmp").setup() - end, - }, { "CopilotC-Nvim/CopilotChat.nvim", branch = "main", @@ -48,8 +40,10 @@ return { context = "buffers", history_path = vim.fn.stdpath("data") .. "/copilotchat_history", auto_follow_cursor = false, + model = "gpt-4o", + sticky = "@copilot", + auto_fold = false, auto_insert_mode = true, - model = "gpt-4", }, }, } diff --git a/nvim/lua/plugins/mini.lua b/nvim/lua/plugins/mini.lua index b72ca083..c6d95be1 100644 --- a/nvim/lua/plugins/mini.lua +++ b/nvim/lua/plugins/mini.lua @@ -5,7 +5,17 @@ return { config = function() -- text editing require("mini.comment").setup() - require("mini.surround").setup() + require("mini.surround").setup({ + mappings = { + add = "ys", -- ys{motion}{char} - add surround (normal), ys{char} - visual + delete = "ds", -- ds{char} - delete surround + replace = "cs", -- cs{old}{new} - replace surround + find = "sf", -- find surround to the right + find_left = "sF", -- find surround to the left + highlight = "sh", -- highlight surround + update_n_lines = "sn", -- update n lines + }, +}) require("mini.pairs").setup() require("mini.trailspace").setup() @@ -26,7 +36,7 @@ return { -- Markdown text objects h = require("mini.ai").gen_spec.treesitter({ a = "@markup.heading", i = "@markup.heading" }), -- Code blocks in markdown - C = function(ai_type) + b = function(ai_type) local pattern = "```.-```" return require("mini.ai").gen_spec.pair(pattern, pattern, { type = "non-balanced", diff --git a/nvim/lua/plugins/text-editing.lua b/nvim/lua/plugins/text-editing.lua index 6ecb5add..9df22f5d 100644 --- a/nvim/lua/plugins/text-editing.lua +++ b/nvim/lua/plugins/text-editing.lua @@ -1,14 +1,4 @@ return { - { - "ggandor/leap.nvim", - dependencies = { "tpope/vim-repeat" }, - config = function() - -- Set up recommended keymaps for leap.nvim - vim.keymap.set({ "n", "x", "o" }, "s", "(leap)") - vim.keymap.set("n", "S", "(leap-from-window)") - end, - }, - -- { "akinsho/git-conflict.nvim", version = "*", config = true }, { "toppair/peek.nvim", event = { "VeryLazy" }, diff --git a/scripts/aliases.sh b/scripts/aliases.sh index 4b3e73e5..cdf6651f 100755 --- a/scripts/aliases.sh +++ b/scripts/aliases.sh @@ -64,7 +64,7 @@ alias epl='cd $HOME/energy-py-linear' alias expt='cd $HOME/energy-py-experiments' alias per='cd $PERSONAL_PATH' alias docs='cd $PERSONAL_PATH' -alias prog='cd $HOME/programming-resources' +alias prog='cd $PERSONAL_PATH/resource/programming' alias syl='cd $HOME/handbook' alias teach='cd $HOME/teaching-monolith' alias web='cd $HOME/climate-code/website' @@ -125,6 +125,13 @@ alias tl='tmux ls' alias ts='tmux ls' alias tls='tmux ls' +# zellij - similar to tmux +alias za='zellij attach' +alias zn='zellij' +alias zl='zellij list-sessions' +alias zls='zellij list-sessions' +alias zk='zellij kill-all-sessions --yes' + # docker alias dc='docker compose' diff --git a/scripts/funcs.sh b/scripts/funcs.sh index 646a071a..f10701e8 100644 --- a/scripts/funcs.sh +++ b/scripts/funcs.sh @@ -70,7 +70,7 @@ v() { alias vinit=v alias vact=v vneu() { - uv venv --python 3.11.10 && source .venv/bin/activate && which python + uv venv --python 3.12.13 && source .venv/bin/activate && which python } vdel() { rm .venv diff --git a/scripts/setup-pi.sh b/scripts/setup-pi.sh new file mode 100644 index 00000000..a40b3fca --- /dev/null +++ b/scripts/setup-pi.sh @@ -0,0 +1,6 @@ +npm install -g @mariozechner/pi-coding-agent +pi install npm:@aliou/pi-guardrails +pi install npm:pi-web-access +pi install npm:@ifi/pi-plan +pi install npm:pi-vim +pi install npm:@guwidoe/pi-prompt-suggester diff --git a/skhd/skhdrc b/skhd/.skhdrc similarity index 100% rename from skhd/skhdrc rename to skhd/.skhdrc