Compare commits

..

6 Commits

Author SHA1 Message Date
github-actions[bot]
7e9d2df990 chore: update pre-commit hooks (#212) 2025-10-13 14:29:07 +03:00
91be3b9edc feat: everforest themes 2025-10-13 14:16:49 +03:00
6bfcd38773 feat(bin): x-pr-comments - fetch GitHub PR comments 2025-10-13 14:16:29 +03:00
74a3d58417 feat(bin): x-codeql - run codeql checks to your project 2025-10-13 14:15:22 +03:00
7b6e95c4ab chore: linting 2025-10-13 14:14:45 +03:00
88a2b3dadf chore: sesh, and removal of zed settings.json
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
2025-10-13 13:56:28 +03:00
105 changed files with 2885 additions and 863 deletions

View File

@@ -13,6 +13,7 @@ max_line_length = 80
[*.md]
max_line_length = 120
trim_trailing_whitespace = false
[*.lua]
max_line_length = 90
@@ -24,10 +25,6 @@ indent_size = 4
indent_style = tab
indent_size = 1
[*.plist]
indent_size = 1
indent_style = tab
[{local/bin/*,**/*.sh,**/zshrc,config/*,scripts/*}]
indent_size = 2
tab_width = 2
@@ -38,7 +35,8 @@ space_redirects = true
keep_padding = false
function_next_line = true # --func-next-line
[config/git/config]
[{*.plist,config/git/**,**/config/git/**}]
indent_size = 1
indent_style = tab
# Ignore the entire "third_party" directory when calling shfmt on directories,
@@ -47,3 +45,7 @@ indent_style = tab
# the ignore logic is applied only when the --apply-ignore flag is given.
[{tools/**,local/bin/asdf/**,config/cheat/cheatsheets/**,config/tmux/plugins/**}]
ignore = true
[plan]
trim_trailing_whitespace = false
max_line_length = off

5
.gitignore vendored
View File

@@ -9,6 +9,7 @@
.env
.idea
.nfs*
.scannerwork
.vscode
Brewfile.lock.json
antidote_plugins.zsh
@@ -50,3 +51,7 @@ dependency-check-report.html
local/bin/yabai
local/man/yabai.1
config/op/plugins/used_items/gh.json
config/zed/settings.json
*.tmp.*
config/op/plugins/gh.json
config/fish/fish_variables.*

2
.gitmodules vendored
View File

@@ -71,7 +71,7 @@
[submodule "tmux/tmux-dark-notify"]
path = config/tmux/plugins/tmux-dark-notify
url = https://github.com/erikw/tmux-dark-notify.git
url = https://github.com/ivuorinen/tmux-dark-notify.git
ignore = dirty
[submodule "antidote"]

View File

@@ -45,7 +45,7 @@ repos:
- id: shfmt
- repo: https://github.com/rhysd/actionlint
rev: v1.7.7
rev: v1.7.8
hooks:
- id: actionlint

View File

@@ -1,6 +1,7 @@
# vim: ft=gitignore
.mypy_cache/*
Brewfile.lock.json
base/plan
config/cheat/cheatsheets/community
config/cheat/cheatsheets/tldr
config/fzf/*

1
.serena/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/cache

View File

@@ -0,0 +1,67 @@
# Areas for Improvement
## Code Quality Enhancements
### 1. Configuration Management
- **Inconsistent indentation**: Mixed tabs/spaces across config files
- **Line length management**: Need consistent enforcement of limits
- **Template standardization**: Memory files need consistent formatting template
### 2. Linting Configuration Improvements
- **Shellcheck exclusions**: Add proper ignore patterns for submodules
- **EditorConfig refinement**: Some rules too strict for generated/third-party content
- **Prettier ignore patterns**: Better exclusion of binary/generated files
### 3. Testing Infrastructure
- **Bats test errors**: Tests failing due to missing `rm` command in PATH
- **Test coverage**: Limited test coverage for shell functions
- **CI/CD integration**: Need automated linting in GitHub Actions
### 4. Documentation Gaps
- **Onboarding docs**: Missing clear setup instructions for new contributors
- **Troubleshooting guide**: Need common error resolution steps
- **Architecture overview**: Missing high-level system architecture
## Performance & Maintenance
### 5. Submodule Management
- **Large submodules**: Some submodules contain unnecessary files
- **Update frequency**: Need systematic submodule update process
- **Dependency tracking**: Better documentation of submodule purposes
### 6. Cross-Platform Considerations
- **Darwin-specific paths**: Some hardcoded macOS paths could be parameterized
- **Shell compatibility**: More testing across bash/zsh/fish environments
- **Tool availability**: Better fallbacks when optional tools missing
### 7. Security & Privacy
- **Secret management**: Better examples for secret configuration
- **Permission handling**: Some scripts could use more restrictive permissions
- **Audit trail**: Track configuration changes and their impact
## Development Workflow
### 8. Automation Opportunities
- **Auto-formatting**: Pre-commit hooks for consistent formatting
- **Dependency updates**: Automated updates for package.json dependencies
- **Health checks**: Scripts to validate configuration integrity
### 9. Error Handling
- **Graceful degradation**: Better fallbacks when tools unavailable
- **Error messages**: More informative error output
- **Recovery procedures**: Automated recovery from common failures
### 10. Modularity
- **Configuration splitting**: Some large config files could be modularized
- **Feature flags**: Optional components for minimal installations
- **Host-specific configs**: Better organization of machine-specific settings

View File

@@ -0,0 +1,50 @@
# Code Style and Conventions
## EditorConfig Rules (.editorconfig)
- **Charset**: UTF-8
- **Line endings**: LF
- **Indent style**: Spaces (except for specific files)
- **Indent size**: 2 spaces (default)
- **Final newline**: Required
- **Trailing whitespace**: Trimmed
### Language-specific Rules
- **Fish scripts**: 4-space indent, 80 char line limit
- **PHP files**: 4-space indent
- **Markdown**: 120 char line limit
- **Lua**: 90 char line limit
- **Git files**: Tab indentation
- **Shell scripts**: 2-space indent with specific shfmt settings
## Prettier Configuration
- Extends `@ivuorinen/prettier-config`
- **Trailing commas**: Always
- **Markdown**: 120 char width, preserve prose wrapping
## ESLint Configuration
- Extends `@ivuorinen` base configuration
- Applied to JavaScript/TypeScript files
## Shell Script Standards (.shellcheckrc)
- External sources following enabled
- Disabled checks: SC2039, SC2166, SC2154, SC1091, SC2174, SC2016
- Must include shebang or `# shellcheck shell=bash`
## Formatting Tools
- **Shell scripts**: shfmt with specific rules
- **Markdown**: markdownlint + prettier
- **JavaScript/TypeScript**: prettier + eslint
- **YAML**: yamllint
## Naming Conventions
- **Shell functions**: Use `x-` prefix for cross-shell compatibility
- **Environment variables**: UPPERCASE with underscores
- **File names**: lowercase with hyphens for scripts
- **Directory structure**: lowercase, organized by tool/purpose

View File

@@ -0,0 +1,80 @@
# Critical Linting Errors That Must Be Fixed
## Current Status: BLOCKING Issues Identified
The linting system has revealed 150+ violations across multiple categories that must be addressed immediately.
## EditorConfig Violations (High Priority)
### Missing Final Newlines
- All `.serena/memories/*.md` files missing final newlines
- Multiple project configuration files affected
- This is a BLOCKING issue per user instructions
### Line Length Violations
- Fish shell configs exceed 80-character limit (`.editorconfig` enforced)
- Memory files have lines exceeding 120-character limit
- WezTerm configuration files have long lines
### Indentation Errors
- Git configuration using tabs instead of spaces
- WezTerm color scheme files using tabs vs spaces
- Perl scripts with inconsistent indentation
## Markdownlint Issues (Memory Files)
### Systematic Problems Across All Memory Files
- Missing blank lines around headings (MD022)
- Lists not surrounded by blank lines (MD032)
- Fenced code blocks not surrounded by blank lines (MD031)
- Trailing punctuation in headings (MD026)
- Missing language specification for fenced code blocks (MD040)
- Missing final newlines (MD047)
### Specific Files Affected
- `areas_for_improvement.md`: 20+ violations
- `code_style_conventions.md`: 15+ violations
- `critical_linting_errors.md`: 25+ violations
- `darwin_system_utilities.md`: 15+ violations
- `immediate_action_items.md`: 25+ violations
- `project_overview.md`: 15+ violations
- `project_structure.md`: 20+ violations
- `shellcheck_issues.md`: 15+ violations
- `suggested_commands.md`: 25+ violations
- `task_completion_checklist.md`: 10+ violations
## Prettier Formatting Issues
### JSON Configuration Files
- `.commitlintrc.json`, `.eslintrc.json`, `.luarc.json`
- `.releaserc.json`, `.github/renovate.json`
- Host-specific configurations in `config/` directory
### YAML Files
- `.mega-linter.yml` formatting inconsistencies
- Various configuration files needing formatting
## Immediate Action Required
1. **Fix memory files**: Apply markdown formatting rules
2. **Run auto-fixers**: `yarn fix` to address automatic fixes
3. **Manual corrections**: Address remaining EditorConfig violations
4. **Validation**: Ensure `yarn lint` passes completely
## Impact Assessment
These violations prevent:
- Successful CI/CD pipeline execution
- Code quality standards compliance
- Pre-commit hook success
- Project maintainability standards
Per user instructions: "Linting issues ARE NOT ACCEPTABLE" and "EditorConfig problems are blocking errors"

View File

@@ -0,0 +1,66 @@
# Darwin (macOS) System Utilities
## Available Command Paths
Based on the current system setup:
### Core System Commands
- `git`: `/opt/homebrew/bin/git` (Homebrew version)
- `find`: `/usr/bin/find` (system version)
- `cd`: shell built-in command
- `ls`: aliased to `eza -h -s=type --git --icons --group-directories-first`
- `grep`: aliased to `grep --color`
### Modern Alternatives (Rust-based)
- `fd`: `/Users/ivuorinen/.local/share/cargo/bin/fd` (modern find)
- `rg`: `/Users/ivuorinen/.local/share/cargo/bin/rg` (ripgrep for text search)
## Recommended Usage Patterns
### File Search
```bash
# Use fd instead of find when possible
fd "*.sh" # Find shell scripts
fd -t f -e lua # Find Lua files
find . -name "*.sh" # Fallback to system find
```
### Text Search
```bash
# Use rg (ripgrep) instead of grep when possible
rg "function.*bash" # Search for bash functions
rg -t shell "export" # Search in shell files only
grep "pattern" file.txt # Fallback to system grep
```
### Directory Navigation
```bash
# Use eza features via ls alias
ls # Shows icons, git status, grouped directories
ls -la # Long format with hidden files
cd /full/path # Always use full paths in scripts
```
## Path Configuration
The system is configured with these PATH priorities:
1. `~/.local/bin` (user scripts)
2. `~/.dotfiles/local/bin` (dotfiles scripts)
3. `~/.local/share/bob/nvim-bin` (Neovim)
4. `~/.local/share/cargo/bin` (Rust tools like fd, rg)
5. `/opt/homebrew/bin` (Homebrew packages)
6. `/usr/local/bin` (system packages)
## Shell Compatibility
The dotfiles support multiple shells through `config/shared.sh`:
- Functions prefixed with `x-` work across bash, zsh, and fish
- Path management handled automatically per shell
- Environment variables set appropriately per shell

View File

@@ -0,0 +1,114 @@
# Immediate Action Items - Priority Order
## HIGH PRIORITY (Must Fix Before Any Development)
### 1. Fix Memory File Formatting (BLOCKING)
```bash
# These files prevent any linting from passing:
- .serena/memories/code_style_conventions.md
- .serena/memories/darwin_system_utilities.md
- .serena/memories/project_overview.md
- .serena/memories/project_structure.md
- .serena/memories/suggested_commands.md
- .serena/memories/task_completion_checklist.md
# Issues: Missing final newlines, markdown formatting, line length
# Impact: Blocks all linting commands
```
### 2. Fix Fish Shell Line Length Violations (BLOCKING)
```bash
# Files exceeding 80-char limit:
config/fish/alias.fish (4 violations)
config/fish/exports.fish (15 violations)
# These are CRITICAL - Fish config has strict limits
# Must be fixed before any fish-related changes
```
### 3. Fix Git Configuration Indentation (BLOCKING)
```bash
# Files with tab/space mixing:
config/git/shared (40+ violations)
hosts/s/config/git/overrides/config
hosts/s/config/git/local.d/work-git
# Impact: Git configuration may not work correctly
```
## MEDIUM PRIORITY (Fix During Next Development Cycle)
### 4. Prettier Formatting Issues
```bash
# 17 files need prettier formatting:
yarn fix:prettier
# Most are JSON/YAML configuration files
```
### 5. WezTerm Color Scheme Indentation
```bash
# All files in config/wezterm/colors/ using tabs instead of spaces
# Affects terminal appearance configuration
```
### 6. Update Linting Configuration
```bash
# Add shellcheck exclusions for submodules:
# - tools/antidote/
# - config/tmux/plugins/
# - config/vim/extra/fzf/
# - config/cheat/cheatsheets/tldr/
```
## LOW PRIORITY (Future Improvements)
### 7. Test Infrastructure
```bash
# Fix bats test PATH issues
# Tests pass but show rm command not found errors
```
### 8. Documentation Updates
```bash
# Add troubleshooting section to AGENTS.md
# Create shellcheck exclusion documentation
```
## Immediate Commands to Run
### Step 1: Auto-fix What's Possible
```bash
yarn fix:prettier # Fix 17 files
yarn fix:markdown # Attempt markdown fixes
```
### Step 2: Manual Fixes Required
- Add final newlines to all memory files
- Wrap long lines in Fish configuration files
- Convert tabs to spaces in Git configuration files
### Step 3: Verify Progress
```bash
yarn lint:ec # Check EditorConfig compliance
yarn lint:markdown # Check markdown issues
yarn lint:prettier # Check remaining prettier issues
```
## Success Criteria
`yarn lint` passes without errors
✅ All EditorConfig violations resolved
✅ Memory files properly formatted
✅ Fish configuration under line limits
✅ Git configuration uses consistent indentation

View File

@@ -0,0 +1,61 @@
# .dotfiles Project Overview
## Purpose
This is a comprehensive personal dotfiles repository for managing development
environment configurations across macOS systems. The project uses **Dotbot** as
the primary installation framework to manage symlinks and setup configurations.
## Key Features
- Automated configuration management using Dotbot
- Support for multiple development tools and applications
- Host-specific configurations in `/hosts/` directory
- Comprehensive testing and linting setup with pre-commit hooks
- Cross-shell compatibility (bash, zsh, fish)
- Large collection of custom utility scripts in `local/bin/`
- Git submodules for external tools (dotbot, antidote, tmux plugins)
- Environment-specific configurations (secrets management)
## Recent Notable Changes (from git status)
- New everforest color theme configurations added
- Multiple temporary fish configuration files present
- Updates to various configuration files (.commitlintrc.json, .eslintrc.json, etc.)
- New x-pr-comments script and documentation added
- Various tmux plugin updates
- Husky configuration relocated from base/ to config/husky/
## Tech Stack
- **Shell**: Bash (primary), with Fish and Zsh support
- **Configuration Manager**: Dotbot with plugins (asdf, brew, include, pip)
- **Package Manager**: Yarn 1.22.22 (Node.js), Homebrew (macOS), pipx (Python)
- **Testing**: Bats test framework, custom test-all.sh script
- **Linting**: MegaLinter, Prettier, ESLint, Markdownlint, ShellCheck, EditorConfig
- **Automation**: Pre-commit hooks, GitHub Actions, Renovate
## Project Structure Highlights
- `/config/` - Main configuration directory (74+ subdirectories)
- `/local/bin/` - Custom utility scripts (100+ scripts with documentation)
- `/hosts/` - Host-specific configurations
- `/tools/` - Git submodules for external tools
- `/base/` - Base configuration files
- `/secrets/` - Secret management configurations
- `/scripts/` - Installation and setup scripts
- `/.github/` - GitHub Actions workflows and configurations
## Target System
- **Platform**: Darwin (macOS) - Version 24.6.0
- **Architecture**: Universal (Intel/Apple Silicon via Homebrew)
- **Dependencies**: Git, Homebrew, Yarn, various CLI tools managed via asdf/aqua
## Development Environment
- Node.js managed via nvm/asdf
- Go version specified (.go-version)
- Python version specified (.python-version)
- Package management via Yarn with lockfile
- TypeScript support for configuration files

View File

@@ -0,0 +1,116 @@
# Project Structure
## Root Directory
```text
.dotfiles/
├── install # Main installation script (Dotbot runner)
├── install.conf.yaml # Dotbot configuration
├── package.json # Node.js dependencies for linting/testing (Yarn managed)
├── AGENTS.md # Project documentation and guidelines
├── test-all.sh # Bats test runner
├── add-submodules.sh # Git submodule management
└── .serena/ # Claude Code/Serena analysis cache (new)
```
## Main Directories
### `config/` (74+ subdirectories)
Configuration files for development tools and applications:
- `git/` - Git configuration with delta integration and everforest theme
- `nvim/` - Neovim configuration with Lua plugins
- `tmux/` - Tmux configuration with multiple plugins (dark-notify, window-name, etc.)
- `fish/` - Fish shell configuration with completions and functions
- `zsh/` - Zsh configuration with antidote plugin manager
- `fzf/` - Fuzzy finder configuration with everforest theme
- `wezterm/` - WezTerm terminal configuration
- `homebrew/` - Homebrew environment configuration
- `starship.toml` - Starship prompt configuration
- `shared.sh` - Cross-shell compatibility functions
- `aerospace/`, `amethyst/`, `yabai/`, `skhd/` - Window managers
- `direnv/`, `asdf/`, `aqua/` - Development environment tools
- `gpg-tui/`, `op/`, `gh/` - Security and CLI tools
- Theme configurations: everforest color schemes across multiple tools
### `base/`
Dotfiles that get symlinked to home directory with `.` prefix:
- Contains traditional dotfiles like `.bashrc`, `.zshrc`, etc.
- `plan` - Planning/note-taking configuration
- `shellcheckrc` - ShellCheck rules
### `local/`
- `bin/` - 100+ custom scripts with comprehensive documentation
- Homegrown utilities (dfm, git tools, backup scripts, etc.)
- Sourced utilities (from skx/sysadmin-util, mvdan/dotfiles)
- Each script has corresponding .md documentation
- Recent additions: x-pr-comments for GitHub PR analysis
- `share/fonts/` - JetBrains Mono font files
- `man/` - Manual pages
### `ssh/`
SSH configuration files (mode 0600/0700)
- `shared.d/` - Shared SSH configurations for specific hosts
### `tools/` (Git submodules)
External tools and Dotbot plugins:
- `dotbot/` - Dotbot installation framework
- `dotbot-*` - Dotbot plugins (asdf, brew, include, pip)
- `antidote/` - Zsh plugin manager
- Various tmux plugins (continuum, resurrect, yank, etc.)
### `hosts/`
Host-specific configurations:
- `air/`, `s/`, `v/` - Individual host configurations
- Applied after main configuration
### `secrets/`
Secret and credential management configuration
### `scripts/`
Installation and setup automation scripts
### `.github/`
- GitHub Actions workflows
- Renovate configuration
- Issue templates and documentation
### Development Configuration Files
- `.editorconfig` - Editor configuration rules
- `.prettierrc.js` - Prettier formatting rules
- `.eslintrc.json` - ESLint linting rules
- `.commitlintrc.json` - Commit message linting
- `.shellcheckrc` - ShellCheck configuration
- `.mega-linter.yml` - MegaLinter configuration
- `.luarc.json` - Lua language server configuration
- `.nvmrc`, `.go-version`, `.python-version` - Version management
- Various ignore files (.gitignore, .prettierignore, .yamlignore, etc.)
## Testing Infrastructure
- `tests/` - Bats test files
- `test-all.sh` - Main test runner
- Pre-commit hooks for automated testing
- GitHub Actions for CI/CD
## Recent Structural Changes
- Husky configuration moved from `base/huskyrc` to `config/husky/init.sh`
- Addition of everforest theme configurations across multiple tools
- New .serena directory for AI analysis caching
- Multiple temporary fish configuration files (everforest themes)
- Enhanced git configuration with delta and everforest theming

View File

@@ -0,0 +1,62 @@
# ShellCheck Issues Analysis
## Critical Shell Script Problems
### Missing Shebangs (SC2148)
Multiple shell scripts missing proper shebang lines:
- `tools/antidote/tests/` - Test scripts
- `config/vim/*/test/lib/common.sh` - FZF test libraries
- `config/tmux/plugins/*/scripts/helpers.sh` - Plugin helper scripts
- Various submodule scripts
### Syntax Errors (SC1036, SC1088, SC1073)
- `config/vim/fzf/test/lib/common.sh` - Invalid ERB template syntax
- `config/cheat/cheatsheets/tldr/` - Markdown files incorrectly parsed as shell
- `tmux-sessionist/scripts/list_sessions.sh` - Brace parsing errors
### Variable Assignment Issues (SC1007, SC2155)
- `config/vim/extra/fzf/test/lib/common.sh` - Incorrect empty variable assignments
- Multiple tmux plugin scripts - Declare and assign should be separate
### Quoting Problems (SC2086, SC2006)
- Unquoted variable expansions in tmux plugin scripts
- Legacy backtick usage instead of $(...) syntax
- Missing quotes around variable expansions
## Third-Party Code Issues
### Submodule Problems
Most shellcheck errors are in **third-party submodules**:
- `tools/antidote/` - Zsh plugin manager
- `config/tmux/plugins/` - Tmux plugins
- `config/vim/extra/fzf/` - FZF integration
- `config/cheat/cheatsheets/tldr/` - Cheat sheet collection
### Recommendation
- These should be **excluded from shellcheck** via configuration
- Focus linting only on **project-owned scripts**
- Add shellcheck ignore patterns for submodule directories
## Project-Owned Script Issues
### Main Scripts Status
- `install` - ✅ Clean (no shellcheck errors)
- `test-all.sh` - ✅ Clean
- `add-submodules.sh` - ✅ Clean
- `config/shared.sh` - ✅ Clean
- Scripts in `local/bin/` - ✅ Mostly clean
### Minor Issues Found
- Some scripts could benefit from stricter quoting
- Consistent shebang usage across all scripts
- Consider adding `set -euo pipefail` to more scripts

View File

@@ -0,0 +1,121 @@
# Essential Commands for .dotfiles Development
## Installation & Setup
```bash
# Initial setup - install linting tools and dependencies
yarn install
# Install/update all dotfiles configurations
./install
# Update git submodules (multiple approaches)
git submodule update --remote --merge
git submodule update --init --recursive --force
bash add-submodules.sh
```
## Development Commands
```bash
# Linting (run all linters - ALWAYS fix all issues)
yarn lint
# Individual linting commands
yarn lint:markdown # Markdownlint
yarn lint:prettier # Prettier check
yarn lint:ec # EditorConfig checker
# Auto-fixing (use these BEFORE manual linting)
yarn fix # Fix all format issues
yarn fix:markdown # Fix markdown formatting
yarn fix:prettier # Fix prettier formatting
# Testing
yarn test # Run all Bats tests
bash test-all.sh # Alternative test runner
```
## Pre-commit Hooks (Comprehensive)
Current pre-commit configuration includes:
- **Security**: detect-aws-credentials, detect-private-key
- **File integrity**: check-case-conflict, check-merge-conflict, check-symlinks
- **Shell scripts**: shellcheck, shfmt (formatting)
- **YAML/JSON**: yamllint, check-yaml, check-toml, pretty-format-json
- **Markdown**: markdownlint with auto-fix
- **Lua**: stylua formatting for Neovim configs
- **Fish**: fish_syntax, fish_indent for shell configs
- **GitHub Actions**: actionlint validation
- **Renovate**: renovate-config-validator
- **General**: trailing-whitespace, end-of-file-fixer, mixed-line-ending
```bash
# Run pre-commit manually
pre-commit run --all-files
```
## Version Management
```bash
# Check current versions
node --version # Managed by nvm (.nvmrc: v20.18.1)
go version # Managed by asdf (.go-version)
python --version # Managed by asdf (.python-version)
```
## System Utilities (Darwin-specific)
```bash
# Modern CLI tools available
ls # aliased to eza with icons and git info
grep # aliased to grep --color
fd pattern # modern find alternative
rg pattern # ripgrep for text search
bat file # modern cat with syntax highlighting
```
## Project-specific Scripts (100+ available)
```bash
# Dotfiles management
bash local/bin/dfm install all
# Git utilities
git-dirty # Check for dirty git repositories
git-fsck-dirs # Run fsck on git directories
git-update-dirs # Update multiple git directories
# Development utilities
x-pr-comments <pr> # Analyze GitHub PR comments (NEW)
x-set-php-aliases # Generate PHP version aliases
x-env-list # List environment variables
x-open-ports # Check open network ports
# Backup utilities
x-backup-folder # Backup directories
x-backup-mysql-with-prefix # MySQL backup with prefix
```
## Configuration Management
```bash
# Load shell configurations
source config/shared.sh # Cross-shell compatibility functions
source x-set-php-aliases # PHP version management
# Host-specific configurations
# Automatically applied: hosts/{hostname}/
```
## Quality Assurance (CRITICAL)
**All linting errors are BLOCKING and must be fixed:**
- EditorConfig violations are considered blocking errors
- ShellCheck warnings must be addressed
- Prettier formatting must be consistent
- Markdownlint rules must be followed
- NEVER use --no-verify with git operations
- ALWAYS run autofixers before manual intervention

View File

@@ -0,0 +1,115 @@
# Task Completion Checklist
When completing any development task in this dotfiles repository, follow this
checklist to ensure compliance with project standards.
## Required Steps (BLOCKING)
### 1. Code Quality Checks
```bash
# Run all linting tools - MUST PASS with zero errors
yarn lint
# Individual checks if needed:
yarn lint:markdown # Markdownlint validation
yarn lint:prettier # Prettier formatting check
yarn lint:ec # EditorConfig compliance verification
```
### 2. Shell Script Validation (if applicable)
```bash
# All shell scripts must pass shellcheck without warnings
find . -path ./node_modules -prune -o -name '*.sh' -print0 | xargs -0 shellcheck
# For individual scripts:
shellcheck path/to/script.sh
```
### 3. Testing Infrastructure
```bash
# Run all tests - MUST PASS completely
yarn test
# OR alternative runner
bash test-all.sh
# For specific test categories:
# Bats tests in tests/ directory
# Individual script functionality tests
```
### 4. EditorConfig Compliance (CRITICAL)
- **BLOCKING REQUIREMENT**: EditorConfig violations prevent completion
- All code must follow `.editorconfig` rules exactly:
- UTF-8 charset
- LF line endings
- Final newline required
- Trailing whitespace removal
- Language-specific indentation (2-space default, 4-space for Fish)
- Use autofixers before attempting manual fixes
- Never modify linting configuration to bypass errors
## Auto-fixing Protocol
```bash
# ALWAYS run auto-fixers first, in this order:
yarn fix # Fix all auto-fixable issues
yarn fix:markdown # Fix markdown formatting violations
yarn fix:prettier # Fix code formatting issues
# Verify fixes applied correctly:
yarn lint # Should show reduced error count
```
## Pre-commit Hook Integration
Current pre-commit configuration enforces:
- Security checks (credentials, private keys)
- Shell script validation (shellcheck, shfmt)
- Markdown formatting (markdownlint with auto-fix)
- YAML/JSON validation and formatting
- Lua formatting (stylua for Neovim configs)
- Fish shell syntax validation
- GitHub Actions validation (actionlint)
- Renovate configuration validation
## Memory File Maintenance
When updating memory files:
1. Follow markdown best practices (blank lines around headings/lists)
2. Specify language for fenced code blocks
3. Ensure final newline exists
4. Respect line length limits (120 chars for markdown)
5. Use proper heading hierarchy
## Critical Success Criteria
✅ **REQUIRED FOR TASK COMPLETION:**
- `yarn lint` exits with code 0 (no errors)
- `yarn test` passes all test suites
- EditorConfig compliance verified
- No trailing whitespace or missing final newlines
- Shell scripts have proper shebangs and pass shellcheck
- All temporary/cache files cleaned up
❌ **BLOCKING ISSUES:**
- Any linting errors or warnings
- EditorConfig violations of any kind
- Test failures or incomplete test coverage
- Use of `--no-verify` flag with git operations
- Modified linting configurations to bypass errors
## Quality Assurance Notes
- **Use `which command`** to get full paths in scripts
- **Prefer modern tools**: `rg` over `grep`, `fd` over `find`, `bat` over `cat`
- **Test cross-shell compatibility**: bash, zsh, fish
- **Validate host-specific configurations** don't break general setup
- **Document any new utilities** in `local/bin/README.md`

90
.serena/project.yml Normal file
View File

@@ -0,0 +1,90 @@
# language of the project (csharp, python, rust, java, typescript, go, cpp, or ruby)
# * For C, use cpp
# * For JavaScript, use typescript
# Special requirements:
# * csharp: Requires the presence of a .sln file in the project folder.
language: bash
# whether to use the project's gitignore file to ignore files
# Added on 2025-04-07
ignore_all_files_in_gitignore: true
# list of additional paths to ignore
# same syntax as gitignore, so you can use * and **
# Was previously called `ignored_dirs`, please update your config if you are using that.
# Added (renamed) on 2025-04-07
ignored_paths:
- '*.swp'
- '*.tmp'
- '*.tmp.*'
- '.DS_Store'
- '.git/**'
- /config/cheat/cheatsheets/community/**
- /config/cheat/cheatsheets/pure-bash-bible/**
- /config/cheat/cheatsheets/tldr/**
- /config/fish/cheatsheets/community/**
- /config/fzf/**
- /config/nvim/snippets/**
- /config/nvim/spell/**
- /config/op/plugins/**
- /config/tmux/plugins/**
- /config/vim/extra/**
- /config/zsh/completions/**
- /config/zsh/plugins/**
- /local/man/fzf
- /local/share/fonts
- /tools/antidote
- /tools/dotbot
- /tools/dotbot-*/**
- node_modules/**
# whether the project is in read-only mode
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
# Added on 2025-04-18
read_only: false
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
# Below is the complete list of tools for convenience.
# To make sure you have the latest list of tools, and to view their descriptions,
# execute `uv run scripts/print_tool_overview.py`.
#
# * `activate_project`: Activates a project by name.
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
# * `create_text_file`: Creates/overwrites a file in the project directory.
# * `delete_lines`: Deletes a range of lines within a file.
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
# * `execute_shell_command`: Executes a shell command.
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
# * `initial_instructions`: Gets the initial instructions for the current project.
# Should only be used in settings where the system prompt cannot be set,
# e.g. in clients you have no control over, like Claude Desktop.
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
# * `insert_at_line`: Inserts content at a given line in a file.
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
# * `list_memories`: Lists memories in Serena's project-specific memory store.
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
# * `read_file`: Reads a file within the project directory.
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
# * `remove_project`: Removes a project from the Serena configuration.
# * `replace_lines`: Replaces a range of lines within a file with new content.
# * `replace_symbol_body`: Replaces the full definition of a symbol.
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
# * `search_for_pattern`: Performs a search for a pattern in the project.
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
# * `switch_modes`: Activates modes by providing a list of their names
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
excluded_tools: []
# initial prompt for the project. It will always be given to the LLM upon activating the project
# (contrary to the memories, which are loaded on demand).
initial_prompt: ''
project_name: '.dotfiles'

View File

@@ -14,4 +14,3 @@ local/bin/antigen.zsh
local/bin/asdf
tools/antidote/*
tools/dotbot*

View File

@@ -41,7 +41,7 @@ git submodule add --name tmux/tmux-yank \
git submodule add --name tmux/tmux-current-pane-hostname \
-f https://github.com/soyuka/tmux-current-pane-hostname.git config/tmux/plugins/tmux-current-pane-hostname
git submodule add --name tmux/tmux-dark-notify \
-f https://github.com/erikw/tmux-dark-notify.git config/tmux/plugins/tmux-dark-notify
-f https://github.com/ivuorinen/tmux-dark-notify.git config/tmux/plugins/tmux-dark-notify
# Takes submodules and sets them to ignore all changes
for MODULE in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'); do

View File

@@ -12,5 +12,3 @@
~-.__| /_ - ~ ^| /- _ `..-' f: f:
| / | / ~-. `-. _||_||_
|_____| |_____| ~ - . _ _ _ _ _>

View File

@@ -4,4 +4,3 @@
# paths in source statements (since 0.8.0).
external-sources=true
includeAllWorkspaceSymbols=true

View File

@@ -69,5 +69,3 @@ Available format modifiers are:
'. For decimal conversions, applies the thousands grouping
separator to the integer portion of the output according
to the current LC_NUMERIC file.

View File

@@ -56,11 +56,11 @@ TERM xterm*
RESET 0 # reset to "normal" color
DIR 01;34 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...

View File

@@ -10,4 +10,3 @@ prefix = [
exact = [
"~/.dotfiles/.envrc"
]

View File

@@ -1,5 +1,6 @@
### Do not edit. This was autogenerated by 'asdf direnv setup' ###
# shellcheck shell=bash
use_asdf() {
use_asdf()
{
source_env "$(asdf direnv envrc "$@")"
}

View File

@@ -6,9 +6,12 @@ alias vim='vim -u "$XDG_CONFIG_HOME/vim/vimrc"'
if type -q eza >/dev/null
function eza_git -d "Use eza and its git options if in a git repo"
if git rev-parse --is-inside-work-tree &>/dev/null
eza --group-directories-first --icons=always --smart-group --git $argv
eza --group-directories-first --icons=always \
--smart-group --git $argv
else
eza --group-directories-first --icons=always --smart-group $argv
eza --group-directories-first \
--icons=always \
--smart-group $argv
end
end
@@ -30,7 +33,9 @@ if type -q eza >/dev/null
end
# Edit fish alias file
function .a --wraps='nvim ~/.dotfiles/config/fish/alias.fish' --description 'edit alias.fish'
function .a \
--wraps='nvim ~/.dotfiles/config/fish/alias.fish' \
--description 'edit alias.fish'
nvim ~/.dotfiles/config/fish/alias.fish $argv
end
@@ -55,7 +60,9 @@ function .p --wraps='cd ~/Code/ivuorinen' --description 'cd ~/Code/ivuorinen'
end
# shortcut to commit with a message
function commit --wraps='git commit -a -m "chore: automated commit"' --description 'commit shortcut'
function commit \
--wraps='git commit -a -m "chore: automated commit"' \
--description 'commit shortcut'
set -l commitMessage $argv
git add .
@@ -71,7 +78,8 @@ function commit --wraps='git commit -a -m "chore: automated commit"' --descripti
git commit -a -m "$commitMessage"
end
function configure_tide --description 'Configure tide with the lean style and my preferences'
function configure_tide \
--description 'Configure tide with the lean style and my preferences'
tide configure \
--auto \
--style=Lean \

View File

@@ -122,4 +122,3 @@ complete -c aqua -n '__fish_seen_subcommand_from root-dir' -f -l help -s h -d 's
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'root-dir' -d 'Output the aqua root directory (AQUA_ROOT_DIR)'
complete -c aqua -n '__fish_seen_subcommand_from help h' -f -l help -s h -d 'show help'
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'help h' -d 'Shows a list of commands or help for one command'

View File

@@ -173,4 +173,3 @@ complete -c git-profile -e
# The call to __git_profile_prepare_completions will setup __git_profile_comp_results
# which provides the program's completion choices.
complete -c git-profile -n '__git_profile_prepare_completions' -f -a '$__git_profile_comp_results'

View File

@@ -120,4 +120,3 @@ complete -c phpenv -f \
# Complete help options
complete -c phpenv -f -s h -l help -d "Show help"

View File

@@ -0,0 +1,235 @@
# fish completion for sesh -*- shell-script -*-
function __sesh_debug
set -l file "$BASH_COMP_DEBUG_FILE"
if test -n "$file"
echo "$argv" >> $file
end
end
function __sesh_perform_completion
__sesh_debug "Starting __sesh_perform_completion"
# Extract all args except the last one
set -l args (commandline -opc)
# Extract the last arg and escape it in case it is a space
set -l lastArg (string escape -- (commandline -ct))
__sesh_debug "args: $args"
__sesh_debug "last arg: $lastArg"
# Disable ActiveHelp which is not supported for fish shell
set -l requestComp "SESH_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg"
__sesh_debug "Calling $requestComp"
set -l results (eval $requestComp 2> /dev/null)
# Some programs may output extra empty lines after the directive.
# Let's ignore them or else it will break completion.
# Ref: https://github.com/spf13/cobra/issues/1279
for line in $results[-1..1]
if test (string trim -- $line) = ""
# Found an empty line, remove it
set results $results[1..-2]
else
# Found non-empty line, we have our proper output
break
end
end
set -l comps $results[1..-2]
set -l directiveLine $results[-1]
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
# completions must be prefixed with the flag
set -l flagPrefix (string match -r -- '-.*=' "$lastArg")
__sesh_debug "Comps: $comps"
__sesh_debug "DirectiveLine: $directiveLine"
__sesh_debug "flagPrefix: $flagPrefix"
for comp in $comps
printf "%s%s\n" "$flagPrefix" "$comp"
end
printf "%s\n" "$directiveLine"
end
# this function limits calls to __sesh_perform_completion, by caching the result behind $__sesh_perform_completion_once_result
function __sesh_perform_completion_once
__sesh_debug "Starting __sesh_perform_completion_once"
if test -n "$__sesh_perform_completion_once_result"
__sesh_debug "Seems like a valid result already exists, skipping __sesh_perform_completion"
return 0
end
set --global __sesh_perform_completion_once_result (__sesh_perform_completion)
if test -z "$__sesh_perform_completion_once_result"
__sesh_debug "No completions, probably due to a failure"
return 1
end
__sesh_debug "Performed completions and set __sesh_perform_completion_once_result"
return 0
end
# this function is used to clear the $__sesh_perform_completion_once_result variable after completions are run
function __sesh_clear_perform_completion_once_result
__sesh_debug ""
__sesh_debug "========= clearing previously set __sesh_perform_completion_once_result variable =========="
set --erase __sesh_perform_completion_once_result
__sesh_debug "Successfully erased the variable __sesh_perform_completion_once_result"
end
function __sesh_requires_order_preservation
__sesh_debug ""
__sesh_debug "========= checking if order preservation is required =========="
__sesh_perform_completion_once
if test -z "$__sesh_perform_completion_once_result"
__sesh_debug "Error determining if order preservation is required"
return 1
end
set -l directive (string sub --start 2 $__sesh_perform_completion_once_result[-1])
__sesh_debug "Directive is: $directive"
set -l shellCompDirectiveKeepOrder 32
set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2)
__sesh_debug "Keeporder is: $keeporder"
if test $keeporder -ne 0
__sesh_debug "This does require order preservation"
return 0
end
__sesh_debug "This doesn't require order preservation"
return 1
end
# This function does two things:
# - Obtain the completions and store them in the global __sesh_comp_results
# - Return false if file completion should be performed
function __sesh_prepare_completions
__sesh_debug ""
__sesh_debug "========= starting completion logic =========="
# Start fresh
set --erase __sesh_comp_results
__sesh_perform_completion_once
__sesh_debug "Completion results: $__sesh_perform_completion_once_result"
if test -z "$__sesh_perform_completion_once_result"
__sesh_debug "No completion, probably due to a failure"
# Might as well do file completion, in case it helps
return 1
end
set -l directive (string sub --start 2 $__sesh_perform_completion_once_result[-1])
set --global __sesh_comp_results $__sesh_perform_completion_once_result[1..-2]
__sesh_debug "Completions are: $__sesh_comp_results"
__sesh_debug "Directive is: $directive"
set -l shellCompDirectiveError 1
set -l shellCompDirectiveNoSpace 2
set -l shellCompDirectiveNoFileComp 4
set -l shellCompDirectiveFilterFileExt 8
set -l shellCompDirectiveFilterDirs 16
if test -z "$directive"
set directive 0
end
set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
if test $compErr -eq 1
__sesh_debug "Received error directive: aborting."
# Might as well do file completion, in case it helps
return 1
end
set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
if test $filefilter -eq 1; or test $dirfilter -eq 1
__sesh_debug "File extension filtering or directory filtering not supported"
# Do full file completion instead
return 1
end
set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
__sesh_debug "nospace: $nospace, nofiles: $nofiles"
# If we want to prevent a space, or if file completion is NOT disabled,
# we need to count the number of valid completions.
# To do so, we will filter on prefix as the completions we have received
# may not already be filtered so as to allow fish to match on different
# criteria than the prefix.
if test $nospace -ne 0; or test $nofiles -eq 0
set -l prefix (commandline -t | string escape --style=regex)
__sesh_debug "prefix: $prefix"
set -l completions (string match -r -- "^$prefix.*" $__sesh_comp_results)
set --global __sesh_comp_results $completions
__sesh_debug "Filtered completions are: $__sesh_comp_results"
# Important not to quote the variable for count to work
set -l numComps (count $__sesh_comp_results)
__sesh_debug "numComps: $numComps"
if test $numComps -eq 1; and test $nospace -ne 0
# We must first split on \t to get rid of the descriptions to be
# able to check what the actual completion will be.
# We don't need descriptions anyway since there is only a single
# real completion which the shell will expand immediately.
set -l split (string split --max 1 \t $__sesh_comp_results[1])
# Fish won't add a space if the completion ends with any
# of the following characters: @=/:.,
set -l lastChar (string sub -s -1 -- $split)
if not string match -r -q "[@=/:.,]" -- "$lastChar"
# In other cases, to support the "nospace" directive we trick the shell
# by outputting an extra, longer completion.
__sesh_debug "Adding second completion to perform nospace directive"
set --global __sesh_comp_results $split[1] $split[1].
__sesh_debug "Completions are now: $__sesh_comp_results"
end
end
if test $numComps -eq 0; and test $nofiles -eq 0
# To be consistent with bash and zsh, we only trigger file
# completion when there are no other completions
__sesh_debug "Requesting file completion"
return 1
end
end
return 0
end
# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
# so we can properly delete any completions provided by another script.
# Only do this if the program can be found, or else fish may print some errors; besides,
# the existing completions will only be loaded if the program can be found.
if type -q "sesh"
# The space after the program name is essential to trigger completion for the program
# and not completion of the program name itself.
# Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
complete --do-complete "sesh " > /dev/null 2>&1
end
# Remove any pre-existing completions for the program since we will be handling all of them.
complete -c sesh -e
# this will get called after the two calls below and clear the $__sesh_perform_completion_once_result global
complete -c sesh -n '__sesh_clear_perform_completion_once_result'
# The call to __sesh_prepare_completions will setup __sesh_comp_results
# which provides the program's completion choices.
# If this doesn't require order preservation, we don't use the -k flag
complete -c sesh -n 'not __sesh_requires_order_preservation && __sesh_prepare_completions' -f -a '$__sesh_comp_results'
# otherwise we use the -k flag
complete -k -c sesh -n '__sesh_requires_order_preservation && __sesh_prepare_completions' -f -a '$__sesh_comp_results'

View File

@@ -0,0 +1,24 @@
# Everforest color scheme for fish shell
# Generated from template - do not edit manually
# Set fish colors
set -U fish_color_normal #d3c6aa
set -U fish_color_command #7fbbb3
set -U fish_color_keyword #d699b6
set -U fish_color_quote #dbbc7f
set -U fish_color_redirection #83c092
set -U fish_color_end #e69875
set -U fish_color_error #e67e80
set -U fish_color_param #d3c6aa
set -U fish_color_comment #7a8478
set -U fish_color_selection --background=#323c41
set -U fish_color_search_match --background=#323c41
set -U fish_color_operator #a7c080
set -U fish_color_escape #d699b6
set -U fish_color_autosuggestion #859289
# Set fish pager colors
set -U fish_pager_color_progress #9da9a0
set -U fish_pager_color_prefix #7fbbb3
set -U fish_pager_color_completion #d3c6aa
set -U fish_pager_color_description #859289

View File

@@ -0,0 +1,24 @@
# Everforest color scheme for fish shell
# Generated from template - do not edit manually
# Set fish colors
set -U fish_color_normal #d3c6aa
set -U fish_color_command #7fbbb3
set -U fish_color_keyword #d699b6
set -U fish_color_quote #dbbc7f
set -U fish_color_redirection #83c092
set -U fish_color_end #e69875
set -U fish_color_error #e67e80
set -U fish_color_param #d3c6aa
set -U fish_color_comment #7a8478
set -U fish_color_selection --background=#374247
set -U fish_color_search_match --background=#374247
set -U fish_color_operator #a7c080
set -U fish_color_escape #d699b6
set -U fish_color_autosuggestion #859289
# Set fish pager colors
set -U fish_pager_color_progress #9da9a0
set -U fish_pager_color_prefix #7fbbb3
set -U fish_pager_color_completion #d3c6aa
set -U fish_pager_color_description #859289

View File

@@ -0,0 +1,24 @@
# Everforest color scheme for fish shell
# Generated from template - do not edit manually
# Set fish colors
set -U fish_color_normal #d3c6aa
set -U fish_color_command #7fbbb3
set -U fish_color_keyword #d699b6
set -U fish_color_quote #dbbc7f
set -U fish_color_redirection #83c092
set -U fish_color_end #e69875
set -U fish_color_error #e67e80
set -U fish_color_param #d3c6aa
set -U fish_color_comment #7a8478
set -U fish_color_selection --background=#3a464c
set -U fish_color_search_match --background=#3a464c
set -U fish_color_operator #a7c080
set -U fish_color_escape #d699b6
set -U fish_color_autosuggestion #859289
# Set fish pager colors
set -U fish_pager_color_progress #9da9a0
set -U fish_pager_color_prefix #7fbbb3
set -U fish_pager_color_completion #d3c6aa
set -U fish_pager_color_description #859289

View File

@@ -0,0 +1,24 @@
# Everforest color scheme for fish shell
# Generated from template - do not edit manually
# Set fish colors
set -U fish_color_normal #5c6a72
set -U fish_color_command #7fbbb3
set -U fish_color_keyword #d699b6
set -U fish_color_quote #dbbc7f
set -U fish_color_redirection #83c092
set -U fish_color_end #e69875
set -U fish_color_error #e67e80
set -U fish_color_param #5c6a72
set -U fish_color_comment #a6b0a0
set -U fish_color_selection --background=#f4f0d9
set -U fish_color_search_match --background=#f4f0d9
set -U fish_color_operator #a7c080
set -U fish_color_escape #d699b6
set -U fish_color_autosuggestion #b3c0b0
# Set fish pager colors
set -U fish_pager_color_progress #c0cdb8
set -U fish_pager_color_prefix #7fbbb3
set -U fish_pager_color_completion #5c6a72
set -U fish_pager_color_description #b3c0b0

View File

@@ -0,0 +1,24 @@
# Everforest color scheme for fish shell
# Generated from template - do not edit manually
# Set fish colors
set -U fish_color_normal #5c6a72
set -U fish_color_command #7fbbb3
set -U fish_color_keyword #d699b6
set -U fish_color_quote #dbbc7f
set -U fish_color_redirection #83c092
set -U fish_color_end #e69875
set -U fish_color_error #e67e80
set -U fish_color_param #5c6a72
set -U fish_color_comment #a6b0a0
set -U fish_color_selection --background=#ede6cf
set -U fish_color_search_match --background=#ede6cf
set -U fish_color_operator #a7c080
set -U fish_color_escape #d699b6
set -U fish_color_autosuggestion #b3c0b0
# Set fish pager colors
set -U fish_pager_color_progress #c0cdb8
set -U fish_pager_color_prefix #7fbbb3
set -U fish_pager_color_completion #5c6a72
set -U fish_pager_color_description #b3c0b0

View File

@@ -0,0 +1,24 @@
# Everforest color scheme for fish shell
# Generated from template - do not edit manually
# Set fish colors
set -U fish_color_normal #5c6a72
set -U fish_color_command #7fbbb3
set -U fish_color_keyword #d699b6
set -U fish_color_quote #dbbc7f
set -U fish_color_redirection #83c092
set -U fish_color_end #e69875
set -U fish_color_error #e67e80
set -U fish_color_param #5c6a72
set -U fish_color_comment #a6b0a0
set -U fish_color_selection --background=#e9e1cc
set -U fish_color_search_match --background=#e9e1cc
set -U fish_color_operator #a7c080
set -U fish_color_escape #d699b6
set -U fish_color_autosuggestion #b3c0b0
# Set fish pager colors
set -U fish_pager_color_progress #c0cdb8
set -U fish_pager_color_prefix #7fbbb3
set -U fish_pager_color_completion #5c6a72
set -U fish_pager_color_description #b3c0b0

View File

@@ -35,4 +35,3 @@ if test -n "$PHPENV_GLOBAL_VERSION"; and not set -q PHPENV_INITIALIZED
end
set -g PHPENV_INITIALIZED true
end

View File

@@ -48,19 +48,23 @@ test -z "$NVIM_UNDO_PATH" && set -x NVIM_UNDO_PATH "$NVIM_STATE/undo"
# Ansible configuration
set -q ANSIBLE_HOME; or set -x ANSIBLE_HOME "$XDG_CONFIG_HOME/ansible"
set -q ANSIBLE_CONFIG; or set -x ANSIBLE_CONFIG "$ANSIBLE_HOME/ansible.cfg"
set -q ANSIBLE_GALAXY_CACHE_DIR; or set -x ANSIBLE_GALAXY_CACHE_DIR "$XDG_CACHE_HOME/ansible/galaxy_cache"
set -q ANSIBLE_GALAXY_CACHE_DIR; or \
set -x ANSIBLE_GALAXY_CACHE_DIR "$XDG_CACHE_HOME/ansible/galaxy_cache"
x-dc "$ANSIBLE_HOME"
x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
# AWS configuration
set -q AWS_CONFIG_FILE; or set -x AWS_CONFIG_FILE "$XDG_STATE_HOME/aws/config"
set -q AWS_SHARED_CREDENTIALS_FILE; or set -x AWS_SHARED_CREDENTIALS_FILE "$XDG_STATE_HOME/aws/credentials"
set -q AWS_SESSION_TOKEN; or set -x AWS_SESSION_TOKEN "$XDG_STATE_HOME/aws/session_token"
set -q AWS_SHARED_CREDENTIALS_FILE; or \
set -x AWS_SHARED_CREDENTIALS_FILE "$XDG_STATE_HOME/aws/credentials"
set -q AWS_SESSION_TOKEN; or \
set -x AWS_SESSION_TOKEN "$XDG_STATE_HOME/aws/session_token"
set -q AWS_DATA_PATH; or set -x AWS_DATA_PATH "$XDG_DATA_HOME/aws"
set -q AWS_DEFAULT_OUTPUT; or set -x AWS_DEFAULT_OUTPUT table
set -q AWS_CONFIGURE_KEYS; or set -x AWS_CONFIGURE_KEYS true
set -q AWS_CONFIGURE_SESSION; or set -x AWS_CONFIGURE_SESSION true
set -q AWS_CONFIGURE_SESSION_DURATION; or set -x AWS_CONFIGURE_SESSION_DURATION 7200
set -q AWS_CONFIGURE_SESSION_DURATION; or \
set -x AWS_CONFIGURE_SESSION_DURATION 7200
set -q AWS_CONFIGURE_SESSION_MFA; or set -x AWS_CONFIGURE_SESSION_MFA true
set -q AWS_CONFIGURE_PROFILE; or set -x AWS_CONFIGURE_PROFILE true
set -q AWS_CONFIGURE_PROMPT; or set -x AWS_CONFIGURE_PROMPT true
@@ -70,7 +74,8 @@ set -q AWS_CONFIGURE_PROMPT_DEFAULT; or set -x AWS_CONFIGURE_PROMPT_DEFAULT true
set -q HOMEBREW_NO_ANALYTICS; or set -x HOMEBREW_NO_ANALYTICS true
set -q HOMEBREW_NO_ENV_HINTS; or set -x HOMEBREW_NO_ENV_HINTS true
set -q HOMEBREW_BUNDLE_MAS_SKIP; or set -x HOMEBREW_BUNDLE_MAS_SKIP true
set -q HOMEBREW_BUNDLE_FILE; or set -x HOMEBREW_BUNDLE_FILE "$XDG_CONFIG_HOME/homebrew/Brewfile"
set -q HOMEBREW_BUNDLE_FILE; or \
set -x HOMEBREW_BUNDLE_FILE "$XDG_CONFIG_HOME/homebrew/Brewfile"
# Composer configuration
set -q COMPOSER_HOME; or set -x COMPOSER_HOME "$XDG_STATE_HOME/composer"
@@ -96,7 +101,9 @@ set -q FNM_RESOLVE_ENGINES; or set -x FNM_RESOLVE_ENGINES true
# fzf configuration
set -q FZF_BASE; or set -x FZF_BASE "$XDG_CONFIG_HOME/fzf"
set -q FZF_DEFAULT_OPTS; or set -x FZF_DEFAULT_OPTS '--height 40% --tmux bottom,70% --layout reverse --border top'
set -q FZF_DEFAULT_OPTS; or \
set -x FZF_DEFAULT_OPTS \
'--height 40% --tmux bottom,40% --layout reverse --border top'
# GnuPG configuration
set -q GNUPGHOME; or set -x GNUPGHOME "$XDG_DATA_HOME/gnupg"
@@ -106,7 +113,8 @@ set -q GNUPGHOME; or set -x GNUPGHOME "$XDG_DATA_HOME/gnupg"
set -q GOBIN; or set -x GOBIN "$XDG_BIN_HOME"
set -q GOENV_ROOT; or set -x GOENV_ROOT "$XDG_DATA_HOME/goenv"
set -q GOENV_RC_FILE; or set -x GOENV_RC_FILE "$XDG_CONFIG_HOME/goenv/goenvrc.fish"
set -q GOENV_RC_FILE; or \
set -x GOENV_RC_FILE "$XDG_CONFIG_HOME/goenv/goenvrc.fish"
# 1Password configuration
set -q OP_CACHE; or set -x OP_CACHE "$XDG_STATE_HOME/1password"
@@ -134,19 +142,23 @@ set -q SCREENRC; or set -x SCREENRC "$XDG_CONFIG_HOME/misc/screenrc"
# Sonarlint configuration
set -q SONARLINT_HOME; or set -x SONARLINT_HOME "$XDG_DATA_HOME/sonarlint"
set -q SONARLINT_BIN; or set -x SONARLINT_BIN "$XDG_BIN_HOME"
set -q SONARLINT_USER_HOME; or set -x SONARLINT_USER_HOME "$XDG_DATA_HOME/sonarlint"
set -q SONARLINT_USER_HOME; or \
set -x SONARLINT_USER_HOME "$XDG_DATA_HOME/sonarlint"
# Terraform configuration
set -q TF_DATA_DIR; or set -x TF_DATA_DIR "$XDG_STATE_HOME/terraform"
set -q TF_CLI_CONFIG_FILE; or set -x TF_CLI_CONFIG_FILE "$XDG_CONFIG_HOME/terraform/terraformrc"
set -q TF_PLUGIN_CACHE_DIR; or set -x TF_PLUGIN_CACHE_DIR "$XDG_CACHE_HOME/terraform/plugin-cache"
set -q TF_CLI_CONFIG_FILE; or \
set -x TF_CLI_CONFIG_FILE "$XDG_CONFIG_HOME/terraform/terraformrc"
set -q TF_PLUGIN_CACHE_DIR; or \
set -x TF_PLUGIN_CACHE_DIR "$XDG_CACHE_HOME/terraform/plugin-cache"
# tmux configuration
set -q TMUX_TMPDIR; or set -x TMUX_TMPDIR "$XDG_STATE_HOME/tmux"
set -q TMUX_CONF_DIR; or set -x TMUX_CONF_DIR "$XDG_CONFIG_HOME/tmux"
set -q TMUX_PLUGINS; or set -x TMUX_PLUGINS "$TMUX_CONF_DIR/plugins"
set -q TMUX_CONF; or set -x TMUX_CONF "$TMUX_CONF_DIR/tmux.conf"
set -q TMUX_PLUGIN_MANAGER_PATH; or set -x TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGINS"
set -q TMUX_PLUGIN_MANAGER_PATH; or \
set -x TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGINS"
# Source tmux theme activation script for Fish shell
if test -f "$DOTFILES/config/tmux/theme-activate.fish"
@@ -154,7 +166,8 @@ if test -f "$DOTFILES/config/tmux/theme-activate.fish"
end
# tms configuration
set -q TMS_CONFIG_FILE; or set -x TMS_CONFIG_FILE "$XDG_CONFIG_HOME/tms/config.toml"
set -q TMS_CONFIG_FILE; or \
set -x TMS_CONFIG_FILE "$XDG_CONFIG_HOME/tms/config.toml"
# wakatime configuration
set -q WAKATIME_HOME; or set -x WAKATIME_HOME "$XDG_STATE_HOME/wakatime"
@@ -166,7 +179,8 @@ set -q _ZO_EXCLUDE_DIRS; or set -x _ZO_EXCLUDE_DIRS "$XDG_DATA_HOME"
# Miscellaneous configuration
set -q CHEAT_USE_FZF; or set -x CHEAT_USE_FZF true
set -q SQLITE_HISTORY; or set -x SQLITE_HISTORY "$XDG_CACHE_HOME/sqlite/sqlite_history"
set -q SQLITE_HISTORY; or \
set -x SQLITE_HISTORY "$XDG_CACHE_HOME/sqlite/sqlite_history"
# Source additional configuration files if they exist
if test -f "$DOTFILES/config/fish/exports-secret.fish"
@@ -186,6 +200,8 @@ set -gx tide_prompt_transient_enabled true
set -gx tide_prompt_add_newline_before true
set -gx tide_prompt_min_cols 34
set -gx tide_prompt_pad_items false
set -gx tide_left_prompt_items context pwd git node python rustc java php pulumi ruby go gcloud newline character
set -gx tide_left_prompt_items context pwd git node python rustc java php \
pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell \
crystal elixir zig newline character
set -gx tide_right_prompt_items status jobs direnv
set -gx tide_context_hostname_parts 1

View File

@@ -6,4 +6,3 @@ function _puffer_fish_expand_bang
commandline -i '!'
end
end

View File

@@ -1,4 +1,3 @@
function nvm
bass source $NVM_DIR/nvm.sh --no-use ';' nvm $argv
end

View File

@@ -56,7 +56,7 @@ function ___paths_plugin_handle_found_item -a testName outFlags
end
set nameOut (string trim -- "$nameOut")
# do the tick
# do the tick
if set -q _flag_k # is not color
set nameOut "- $nameOut"
else # is color
@@ -155,7 +155,7 @@ function paths --description "Reveal the executable matches in shell paths or fi
end
end
# check
# check
set -l built (type --type $input 12&>/dev/null)
if test -n "$built"
and test "$built" = 'builtin'

View File

@@ -1075,4 +1075,3 @@ function __phpenv_validate_extensions -a phpenv_extensions_string
return 1
end
end

View File

@@ -11,63 +11,63 @@
if [[ $- =~ i ]]; then
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
if ! declare -f _fzf_compgen_path > /dev/null; then
_fzf_compgen_path() {
echo "$1"
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
}
fi
if ! declare -f _fzf_compgen_dir > /dev/null; then
_fzf_compgen_dir() {
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
}
fi
###########################################################
# To redraw line after fzf closes (printf '\e[5n')
bind '"\e[0n": redraw-current-line' 2> /dev/null
__fzf_comprun() {
if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then
_fzf_comprun "$@"
elif [[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; }; then
shift
fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"
else
shift
fzf "$@"
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
if ! declare -f _fzf_compgen_path >/dev/null; then
_fzf_compgen_path() {
echo "$1"
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
-a -not -path "$1" -print 2>/dev/null | sed 's@^\./@@'
}
fi
}
__fzf_orig_completion() {
local l comp f cmd
while read -r l; do
if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then
comp="${BASH_REMATCH[1]}"
f="${BASH_REMATCH[2]}"
cmd="${BASH_REMATCH[3]}"
[[ "$f" = _fzf_* ]] && continue
printf -v "_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}" "%s" "${comp} %s ${cmd} #${f}"
if [[ "$l" = *" -o nospace "* ]] && [[ ! "${__fzf_nospace_commands-}" = *" $cmd "* ]]; then
__fzf_nospace_commands="${__fzf_nospace_commands-} $cmd "
fi
if ! declare -f _fzf_compgen_dir >/dev/null; then
_fzf_compgen_dir() {
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
-a -not -path "$1" -print 2>/dev/null | sed 's@^\./@@'
}
fi
###########################################################
# To redraw line after fzf closes (printf '\e[5n')
bind '"\e[0n": redraw-current-line' 2>/dev/null
__fzf_comprun() {
if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then
_fzf_comprun "$@"
elif [[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; }; then
shift
fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"
else
shift
fzf "$@"
fi
done
}
}
_fzf_opts_completion() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="
__fzf_orig_completion() {
local l comp f cmd
while read -r l; do
if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then
comp="${BASH_REMATCH[1]}"
f="${BASH_REMATCH[2]}"
cmd="${BASH_REMATCH[3]}"
[[ "$f" = _fzf_* ]] && continue
printf -v "_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}" "%s" "${comp} %s ${cmd} #${f}"
if [[ "$l" = *" -o nospace "* ]] && [[ ! "${__fzf_nospace_commands-}" = *" $cmd "* ]]; then
__fzf_nospace_commands="${__fzf_nospace_commands-} $cmd "
fi
fi
done
}
_fzf_opts_completion() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD - 1]}"
opts="
-x --extended
-e --exact
--algo
@@ -110,206 +110,206 @@ _fzf_opts_completion() {
--expect
--sync"
case "${prev}" in
--tiebreak)
COMPREPLY=( $(compgen -W "length begin end index" -- "$cur") )
return 0
;;
--color)
COMPREPLY=( $(compgen -W "dark light 16 bw" -- "$cur") )
return 0
;;
--history)
COMPREPLY=()
return 0
;;
esac
case "${prev}" in
--tiebreak)
COMPREPLY=($(compgen -W "length begin end index" -- "$cur"))
return 0
;;
--color)
COMPREPLY=($(compgen -W "dark light 16 bw" -- "$cur"))
return 0
;;
--history)
COMPREPLY=()
return 0
;;
esac
if [[ "$cur" =~ ^-|\+ ]]; then
COMPREPLY=( $(compgen -W "${opts}" -- "$cur") )
return 0
fi
return 0
}
_fzf_handle_dynamic_completion() {
local cmd orig_var orig ret orig_cmd orig_complete
cmd="$1"
shift
orig_cmd="$1"
orig_var="_fzf_orig_completion_$cmd"
orig="${!orig_var-}"
orig="${orig##*#}"
if [[ -n "$orig" ]] && type "$orig" > /dev/null 2>&1; then
$orig "$@"
elif [[ -n "${_fzf_completion_loader-}" ]]; then
orig_complete=$(complete -p "$orig_cmd" 2> /dev/null)
_completion_loader "$@"
ret=$?
# _completion_loader may not have updated completion for the command
if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then
__fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)
if [[ "${__fzf_nospace_commands-}" = *" $orig_cmd "* ]]; then
eval "${orig_complete/ -F / -o nospace -F }"
else
eval "$orig_complete"
fi
if [[ "$cur" =~ ^-|\+ ]]; then
COMPREPLY=($(compgen -W "${opts}" -- "$cur"))
return 0
fi
return $ret
fi
}
__fzf_generic_path_completion() {
local cur base dir leftover matches trigger cmd
cmd="${COMP_WORDS[0]}"
if [[ $cmd == \\* ]]; then
cmd="${cmd:1}"
fi
cmd="${cmd//[^A-Za-z0-9_=]/_}"
COMPREPLY=()
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]]; then
base=${cur:0:${#cur}-${#trigger}}
eval "base=$base"
return 0
}
dir=
[[ $base = *"/"* ]] && dir="$base"
while true; do
if [[ -z "$dir" ]] || [[ -d "$dir" ]]; then
leftover=${base/#"$dir"}
leftover=${leftover/#\/}
[[ -z "$dir" ]] && dir='.'
[[ "$dir" != "/" ]] && dir="${dir/%\//}"
matches=$(eval "$1 $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $2" __fzf_comprun "$4" -q "$leftover" | while read -r item; do
printf "%q " "${item%$3}$3"
done)
matches=${matches% }
[[ -z "$3" ]] && [[ "${__fzf_nospace_commands-}" = *" ${COMP_WORDS[0]} "* ]] && matches="$matches "
if [[ -n "$matches" ]]; then
COMPREPLY=( "$matches" )
_fzf_handle_dynamic_completion() {
local cmd orig_var orig ret orig_cmd orig_complete
cmd="$1"
shift
orig_cmd="$1"
orig_var="_fzf_orig_completion_$cmd"
orig="${!orig_var-}"
orig="${orig##*#}"
if [[ -n "$orig" ]] && type "$orig" >/dev/null 2>&1; then
$orig "$@"
elif [[ -n "${_fzf_completion_loader-}" ]]; then
orig_complete=$(complete -p "$orig_cmd" 2>/dev/null)
_completion_loader "$@"
ret=$?
# _completion_loader may not have updated completion for the command
if [[ "$(complete -p "$orig_cmd" 2>/dev/null)" != "$orig_complete" ]]; then
__fzf_orig_completion < <(complete -p "$orig_cmd" 2>/dev/null)
if [[ "${__fzf_nospace_commands-}" = *" $orig_cmd "* ]]; then
eval "${orig_complete/ -F / -o nospace -F }"
else
COMPREPLY=( "$cur" )
eval "$orig_complete"
fi
printf '\e[5n'
return 0
fi
dir=$(dirname "$dir")
[[ "$dir" =~ /$ ]] || dir="$dir"/
done
else
shift
shift
shift
_fzf_handle_dynamic_completion "$cmd" "$@"
fi
}
_fzf_complete() {
# Split arguments around --
local args rest str_arg i sep
args=("$@")
sep=
for i in "${!args[@]}"; do
if [[ "${args[$i]}" = -- ]]; then
sep=$i
break
return $ret
fi
done
if [[ -n "$sep" ]]; then
str_arg=
rest=("${args[@]:$((sep + 1)):${#args[@]}}")
args=("${args[@]:0:$sep}")
else
str_arg=$1
args=()
shift
rest=("$@")
fi
}
local cur selected trigger cmd post
post="$(caller 0 | awk '{print $2}')_post"
type -t "$post" > /dev/null 2>&1 || post=cat
__fzf_generic_path_completion() {
local cur base dir leftover matches trigger cmd
cmd="${COMP_WORDS[0]}"
if [[ $cmd == \\* ]]; then
cmd="${cmd:1}"
fi
cmd="${cmd//[^A-Za-z0-9_=]/_}"
COMPREPLY=()
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]]; then
base=${cur:0:${#cur}-${#trigger}}
eval "base=$base"
cmd="${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}"
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]]; then
cur=${cur:0:${#cur}-${#trigger}}
selected=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $str_arg" __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | tr '\n' ' ')
selected=${selected% } # Strip trailing space not to repeat "-o nospace"
if [[ -n "$selected" ]]; then
COMPREPLY=("$selected")
dir=
[[ $base = *"/"* ]] && dir="$base"
while true; do
if [[ -z "$dir" ]] || [[ -d "$dir" ]]; then
leftover=${base/#"$dir"/}
leftover=${leftover/#\//}
[[ -z "$dir" ]] && dir='.'
[[ "$dir" != "/" ]] && dir="${dir/%\//}"
matches=$(eval "$1 $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $2" __fzf_comprun "$4" -q "$leftover" | while read -r item; do
printf "%q " "${item%$3}$3"
done)
matches=${matches% }
[[ -z "$3" ]] && [[ "${__fzf_nospace_commands-}" = *" ${COMP_WORDS[0]} "* ]] && matches="$matches "
if [[ -n "$matches" ]]; then
COMPREPLY=("$matches")
else
COMPREPLY=("$cur")
fi
printf '\e[5n'
return 0
fi
dir=$(dirname "$dir")
[[ "$dir" =~ /$ ]] || dir="$dir"/
done
else
COMPREPLY=("$cur")
shift
shift
shift
_fzf_handle_dynamic_completion "$cmd" "$@"
fi
printf '\e[5n'
return 0
else
_fzf_handle_dynamic_completion "$cmd" "${rest[@]}"
fi
}
}
_fzf_path_completion() {
__fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"
}
_fzf_complete() {
# Split arguments around --
local args rest str_arg i sep
args=("$@")
sep=
for i in "${!args[@]}"; do
if [[ "${args[$i]}" = -- ]]; then
sep=$i
break
fi
done
if [[ -n "$sep" ]]; then
str_arg=
rest=("${args[@]:$((sep + 1)):${#args[@]}}")
args=("${args[@]:0:$sep}")
else
str_arg=$1
args=()
shift
rest=("$@")
fi
# Deprecated. No file only completion.
_fzf_file_completion() {
_fzf_path_completion "$@"
}
local cur selected trigger cmd post
post="$(caller 0 | awk '{print $2}')_post"
type -t "$post" >/dev/null 2>&1 || post=cat
_fzf_dir_completion() {
__fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@"
}
cmd="${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}"
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]]; then
cur=${cur:0:${#cur}-${#trigger}}
_fzf_complete_kill() {
_fzf_proc_completion "$@"
}
selected=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $str_arg" __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | tr '\n' ' ')
selected=${selected% } # Strip trailing space not to repeat "-o nospace"
if [[ -n "$selected" ]]; then
COMPREPLY=("$selected")
else
COMPREPLY=("$cur")
fi
printf '\e[5n'
return 0
else
_fzf_handle_dynamic_completion "$cmd" "${rest[@]}"
fi
}
_fzf_proc_completion() {
_fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
command ps -eo user,pid,ppid,start,time,command 2> /dev/null ||
command ps -eo user,pid,ppid,time,args # For BusyBox
)
}
_fzf_path_completion() {
__fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"
}
_fzf_proc_completion_post() {
awk '{print $2}'
}
# Deprecated. No file only completion.
_fzf_file_completion() {
_fzf_path_completion "$@"
}
_fzf_host_completion() {
_fzf_complete +m -- "$@" < <(
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
_fzf_dir_completion() {
__fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@"
}
_fzf_complete_kill() {
_fzf_proc_completion "$@"
}
_fzf_proc_completion() {
_fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
command ps -eo user,pid,ppid,start,time,command 2>/dev/null ||
command ps -eo user,pid,ppid,time,args # For BusyBox
)
}
_fzf_proc_completion_post() {
awk '{print $2}'
}
_fzf_host_completion() {
_fzf_complete +m -- "$@" < <(
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2>/dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') |
awk '{if (length($2) > 0) {print $2}}' | sort -u
)
}
)
}
_fzf_var_completion() {
_fzf_complete -m -- "$@" < <(
declare -xp | sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p'
)
}
_fzf_var_completion() {
_fzf_complete -m -- "$@" < <(
declare -xp | sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p'
)
}
_fzf_alias_completion() {
_fzf_complete -m -- "$@" < <(
alias | sed -En 's|^alias ([^=]+).*|\1|p'
)
}
_fzf_alias_completion() {
_fzf_complete -m -- "$@" < <(
alias | sed -En 's|^alias ([^=]+).*|\1|p'
)
}
# fzf options
complete -o default -F _fzf_opts_completion fzf
# fzf-tmux is a thin fzf wrapper that has only a few more options than fzf
# itself. As a quick improvement we take fzf's completion. Adding the few extra
# fzf-tmux specific options (like `-w WIDTH`) are left as a future patch.
complete -o default -F _fzf_opts_completion fzf-tmux
# fzf options
complete -o default -F _fzf_opts_completion fzf
# fzf-tmux is a thin fzf wrapper that has only a few more options than fzf
# itself. As a quick improvement we take fzf's completion. Adding the few extra
# fzf-tmux specific options (like `-w WIDTH`) are left as a future patch.
complete -o default -F _fzf_opts_completion fzf-tmux
d_cmds="${FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}"
a_cmds="
d_cmds="${FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}"
a_cmds="
awk bat cat diff diff3
emacs emacsclient ex file ftp g++ gcc gvim head hg hx java
javac ld less more mvim nvim patch perl python ruby
@@ -319,64 +319,64 @@ a_cmds="
ln ls mv open rm rsync scp
svn tar unzip zip"
# Preserve existing completion
__fzf_orig_completion < <(complete -p $d_cmds $a_cmds 2> /dev/null)
# Preserve existing completion
__fzf_orig_completion < <(complete -p $d_cmds $a_cmds 2>/dev/null)
if type _completion_loader > /dev/null 2>&1; then
_fzf_completion_loader=1
fi
__fzf_defc() {
local cmd func opts orig_var orig def
cmd="$1"
func="$2"
opts="$3"
orig_var="_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}"
orig="${!orig_var-}"
if [[ -n "$orig" ]]; then
printf -v def "$orig" "$func"
eval "$def"
else
complete -F "$func" $opts "$cmd"
if type _completion_loader >/dev/null 2>&1; then
_fzf_completion_loader=1
fi
}
# Anything
for cmd in $a_cmds; do
__fzf_defc "$cmd" _fzf_path_completion "-o default -o bashdefault"
done
__fzf_defc() {
local cmd func opts orig_var orig def
cmd="$1"
func="$2"
opts="$3"
orig_var="_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}"
orig="${!orig_var-}"
if [[ -n "$orig" ]]; then
printf -v def "$orig" "$func"
eval "$def"
else
complete -F "$func" $opts "$cmd"
fi
}
# Directory
for cmd in $d_cmds; do
__fzf_defc "$cmd" _fzf_dir_completion "-o nospace -o dirnames"
done
unset cmd d_cmds a_cmds
_fzf_setup_completion() {
local kind fn cmd
kind=$1
fn=_fzf_${1}_completion
if [[ $# -lt 2 ]] || ! type -t "$fn" > /dev/null; then
echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..."
return 1
fi
shift
__fzf_orig_completion < <(complete -p "$@" 2> /dev/null)
for cmd in "$@"; do
case "$kind" in
dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;
var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;
alias) __fzf_defc "$cmd" "$fn" "-a" ;;
*) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;;
esac
# Anything
for cmd in $a_cmds; do
__fzf_defc "$cmd" _fzf_path_completion "-o default -o bashdefault"
done
}
# Environment variables / Aliases / Hosts / Process
_fzf_setup_completion 'var' export unset printenv
_fzf_setup_completion 'alias' unalias
_fzf_setup_completion 'host' ssh telnet
_fzf_setup_completion 'proc' kill
# Directory
for cmd in $d_cmds; do
__fzf_defc "$cmd" _fzf_dir_completion "-o nospace -o dirnames"
done
unset cmd d_cmds a_cmds
_fzf_setup_completion() {
local kind fn cmd
kind=$1
fn=_fzf_${1}_completion
if [[ $# -lt 2 ]] || ! type -t "$fn" >/dev/null; then
echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..."
return 1
fi
shift
__fzf_orig_completion < <(complete -p "$@" 2>/dev/null)
for cmd in "$@"; do
case "$kind" in
dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;
var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;
alias) __fzf_defc "$cmd" "$fn" "-a" ;;
*) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;;
esac
done
}
# Environment variables / Aliases / Hosts / Process
_fzf_setup_completion 'var' export unset printenv
_fzf_setup_completion 'alias' unalias
_fzf_setup_completion 'host' ssh telnet
_fzf_setup_completion 'proc' kill
fi

7
config/fzf/everforest.sh Normal file
View File

@@ -0,0 +1,7 @@
# Everforest theme for fzf
# Generated from template - do not edit manually
export FZF_DEFAULT_OPTS=" \
--color=bg+:#374247,bg:#2f383e,spinner:#83c092,hl:#a7c080 \
--color=fg:#d3c6aa,header:#a7c080,info:#dbbc7f,pointer:#83c092 \
--color=marker:#83c092,fg+:#d3c6aa,prompt:#dbbc7f,hl+:#a7c080"

View File

@@ -4,7 +4,7 @@
# Auto-completion
# ---------------
# shellcheck source=completion.bash
[[ $- == *i* ]] && source "$HOME/.dotfiles/config/fzf/completion.bash" 2> /dev/null
[[ $- == *i* ]] && source "$HOME/.dotfiles/config/fzf/completion.bash" 2>/dev/null
# Key bindings
# ------------

View File

@@ -23,81 +23,84 @@ __fzf_select__() {
eval "$cmd" |
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) "$@" |
while read -r item; do
printf '%q ' "$item" # escape special chars
printf '%q ' "$item" # escape special chars
done
}
if [[ $- =~ i ]]; then
__fzfcmd() {
[[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; } &&
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
}
__fzfcmd() {
[[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; } &&
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
}
fzf-file-widget() {
local selected="$(__fzf_select__ "$@")"
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}"
READLINE_POINT=$(( READLINE_POINT + ${#selected} ))
}
fzf-file-widget() {
local selected="$(__fzf_select__ "$@")"
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}"
READLINE_POINT=$((READLINE_POINT + ${#selected}))
}
__fzf_cd__() {
local cmd opts dir
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
__fzf_cd__() {
local cmd opts dir
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type d -print 2> /dev/null | cut -b3-"}"
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-} +m"
dir=$(set +o pipefail; eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd)) && printf 'builtin cd -- %q' "$dir"
}
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-} +m"
dir=$(
set +o pipefail
eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd)
) && printf 'builtin cd -- %q' "$dir"
}
__fzf_history__() {
local output opts script
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort ${FZF_CTRL_R_OPTS-} +m --read0"
script='BEGIN { getc; $/ = "\n\t"; $HISTCOUNT = $ENV{last_hist} + 1 } s/^[ *]//; print $HISTCOUNT - $. . "\t$_" if !$seen{$_}++'
output=$(
set +o pipefail
builtin fc -lnr -2147483648 |
last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" |
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE"
) || return
READLINE_LINE=${output#*$'\t'}
if [[ -z "$READLINE_POINT" ]]; then
echo "$READLINE_LINE"
__fzf_history__() {
local output opts script
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort ${FZF_CTRL_R_OPTS-} +m --read0"
script='BEGIN { getc; $/ = "\n\t"; $HISTCOUNT = $ENV{last_hist} + 1 } s/^[ *]//; print $HISTCOUNT - $. . "\t$_" if !$seen{$_}++'
output=$(
set +o pipefail
builtin fc -lnr -2147483648 |
last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" |
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE"
) || return
READLINE_LINE=${output#*$'\t'}
if [[ -z "$READLINE_POINT" ]]; then
echo "$READLINE_LINE"
else
READLINE_POINT=0x7fffffff
fi
}
# Required to refresh the prompt after fzf
bind -m emacs-standard '"\er": redraw-current-line'
bind -m vi-command '"\C-z": emacs-editing-mode'
bind -m vi-insert '"\C-z": emacs-editing-mode'
bind -m emacs-standard '"\C-z": vi-editing-mode'
if ((BASH_VERSINFO[0] < 4)); then
# CTRL-T - Paste the selected file path into the command line
bind -m emacs-standard '"\C-t": " \C-b\C-k \C-u`__fzf_select__`\e\C-e\er\C-a\C-y\C-h\C-e\e \C-y\ey\C-x\C-x\C-f"'
bind -m vi-command '"\C-t": "\C-z\C-t\C-z"'
bind -m vi-insert '"\C-t": "\C-z\C-t\C-z"'
# CTRL-R - Paste the selected command from history into the command line
bind -m emacs-standard '"\C-r": "\C-e \C-u\C-y\ey\C-u"$(__fzf_history__)"\e\C-e\er"'
bind -m vi-command '"\C-r": "\C-z\C-r\C-z"'
bind -m vi-insert '"\C-r": "\C-z\C-r\C-z"'
else
READLINE_POINT=0x7fffffff
# CTRL-T - Paste the selected file path into the command line
bind -m emacs-standard -x '"\C-t": fzf-file-widget'
bind -m vi-command -x '"\C-t": fzf-file-widget'
bind -m vi-insert -x '"\C-t": fzf-file-widget'
# CTRL-R - Paste the selected command from history into the command line
bind -m emacs-standard -x '"\C-r": __fzf_history__'
bind -m vi-command -x '"\C-r": __fzf_history__'
bind -m vi-insert -x '"\C-r": __fzf_history__'
fi
}
# Required to refresh the prompt after fzf
bind -m emacs-standard '"\er": redraw-current-line'
bind -m vi-command '"\C-z": emacs-editing-mode'
bind -m vi-insert '"\C-z": emacs-editing-mode'
bind -m emacs-standard '"\C-z": vi-editing-mode'
if (( BASH_VERSINFO[0] < 4 )); then
# CTRL-T - Paste the selected file path into the command line
bind -m emacs-standard '"\C-t": " \C-b\C-k \C-u`__fzf_select__`\e\C-e\er\C-a\C-y\C-h\C-e\e \C-y\ey\C-x\C-x\C-f"'
bind -m vi-command '"\C-t": "\C-z\C-t\C-z"'
bind -m vi-insert '"\C-t": "\C-z\C-t\C-z"'
# CTRL-R - Paste the selected command from history into the command line
bind -m emacs-standard '"\C-r": "\C-e \C-u\C-y\ey\C-u"$(__fzf_history__)"\e\C-e\er"'
bind -m vi-command '"\C-r": "\C-z\C-r\C-z"'
bind -m vi-insert '"\C-r": "\C-z\C-r\C-z"'
else
# CTRL-T - Paste the selected file path into the command line
bind -m emacs-standard -x '"\C-t": fzf-file-widget'
bind -m vi-command -x '"\C-t": fzf-file-widget'
bind -m vi-insert -x '"\C-t": fzf-file-widget'
# CTRL-R - Paste the selected command from history into the command line
bind -m emacs-standard -x '"\C-r": __fzf_history__'
bind -m vi-command -x '"\C-r": __fzf_history__'
bind -m vi-insert -x '"\C-r": __fzf_history__'
fi
# ALT-C - cd into the selected directory
bind -m emacs-standard '"\ec": " \C-b\C-k \C-u`__fzf_cd__`\e\C-e\er\C-m\C-y\C-h\e \C-y\ey\C-x\C-x\C-d"'
bind -m vi-command '"\ec": "\C-z\ec\C-z"'
bind -m vi-insert '"\ec": "\C-z\ec\C-z"'
# ALT-C - cd into the selected directory
bind -m emacs-standard '"\ec": " \C-b\C-k \C-u`__fzf_cd__`\e\C-e\er\C-m\C-y\C-h\e \C-y\ey\C-x\C-x\C-d"'
bind -m vi-command '"\ec": "\C-z\ec\C-z"'
bind -m vi-insert '"\ec": "\C-z\ec\C-z"'
fi

View File

@@ -63,3 +63,5 @@
old = red bold
new = green bold
whitespace = red reverse
[coderabbit]
machineId = cli/2d3277ec1da346c4b30b26d0fb373d8c

View File

@@ -0,0 +1,22 @@
# Everforest theme for git-delta
# Generated from template - do not edit manually
[delta]
syntax-theme = none
file-style = bold
file-decoration-style = none
hunk-header-decoration-style = cyan box ul
line-numbers = true
line-numbers-left-style = cyan
line-numbers-right-style = cyan
line-numbers-minus-style = red
line-numbers-plus-style = green
line-numbers-zero-style = "#859289"
minus-style = syntax "#e67e80"
minus-emph-style = syntax "#e67e80"
plus-style = syntax "#a7c080"
plus-emph-style = syntax "#a7c080"
zero-style = syntax
blame-code-style = syntax
blame-format = "{author:<18} ({commit:>8}) {timestamp:^16} "
blame-palette = "#7a8478" "#859289" "#9da9a0"

View File

@@ -51,4 +51,3 @@
# dotfiles special config
[includeIf "hasconfig:remote.*.url:https://github.com/ivuorinen/dotfiles.git"]
path = ~/.dotfiles/config/git/special/dotfiles ;

View File

@@ -1,4 +1,3 @@
set -gx GOENV_PATH_ORDER front
set -gx GOENV_PREPEND_GOPATH true
set -gx GOENV_AUTO_INSTALL true

View File

@@ -29,4 +29,3 @@
# outdir = "~/.gnupg/out"
# outfile = "{type}_{query}.{ext}"
# default_key = "0xA1B2C3XY"

View File

@@ -8,4 +8,3 @@ export HOMEBREW_AUTOREMOVE=true
export HOMEBREW_AUTO_UPDATE_SECS=86400
export HOMEBREW_CLEANUP_MAX_AGE_DAYS=30
export HOMEBREW_NO_ENV_HINTS=1

0
base/huskyrc → config/husky/init.sh Normal file → Executable file
View File

View File

@@ -226,4 +226,4 @@ if has('gui_running')
set guifont=JetBrainsMono:h14
endif
" vim: set filetype=vim :
" vim: set filetype=vim :

View File

@@ -110,4 +110,3 @@ Irssi::signal_add(
'message kick' => \&msg_kick
}
);

View File

@@ -13,4 +13,3 @@ termcapinfo xterm* ti@:te@
# Some settings for screen + vim
term xterm-256color
maptimeout 10

0
config/nbrc Normal file → Executable file
View File

View File

@@ -21,4 +21,3 @@ max_line_length = off
[*.lua]
max_line_length = 90

View File

@@ -1,3 +1,2 @@
spell/*
!spell/.gitkeep

View File

@@ -8,4 +8,3 @@ collapse_simple_statement = "Always"
[sort_requires]
enabled = true

View File

@@ -0,0 +1,114 @@
-- Everforest theme for Neovim
-- Generated from template - do not edit manually
local M = {}
M.colors = {
bg = '#2f383e',
bg1 = '#374247',
bg2 = '#404c51',
fg = '#d3c6aa',
red = '#e67e80',
orange = '#e69875',
yellow = '#dbbc7f',
green = '#a7c080',
aqua = '#83c092',
blue = '#7fbbb3',
purple = '#d699b6',
gray1 = '#7a8478',
gray2 = '#859289',
gray3 = '#9da9a0',
}
M.highlights = {
-- Editor highlights
Normal = { fg = M.colors.fg, bg = M.colors.bg },
NormalFloat = { fg = M.colors.fg, bg = M.colors.bg1 },
ColorColumn = { bg = M.colors.bg1 },
Conceal = { fg = M.colors.gray2 },
Cursor = { fg = M.colors.bg, bg = M.colors.fg },
lCursor = { fg = M.colors.bg, bg = M.colors.fg },
CursorIM = { fg = M.colors.bg, bg = M.colors.fg },
CursorColumn = { bg = M.colors.bg1 },
CursorLine = { bg = M.colors.bg1 },
Directory = { fg = M.colors.blue, bold = true },
DiffAdd = { fg = M.colors.green, bg = M.colors.bg },
DiffChange = { fg = M.colors.blue, bg = M.colors.bg },
DiffDelete = { fg = M.colors.red, bg = M.colors.bg },
DiffText = { fg = M.colors.yellow, bg = M.colors.bg },
EndOfBuffer = { fg = M.colors.gray2 },
ErrorMsg = { fg = M.colors.red, bold = true },
VertSplit = { fg = M.colors.gray2 },
Folded = { fg = M.colors.gray2, bg = M.colors.bg1 },
FoldColumn = { fg = M.colors.gray2, bg = M.colors.bg },
SignColumn = { fg = M.colors.fg, bg = M.colors.bg },
IncSearch = { fg = M.colors.bg, bg = M.colors.orange },
LineNr = { fg = M.colors.gray2 },
CursorLineNr = { fg = M.colors.yellow, bold = true },
MatchParen = { fg = M.colors.orange, bold = true },
ModeMsg = { fg = M.colors.fg, bold = true },
MoreMsg = { fg = M.colors.blue, bold = true },
NonText = { fg = M.colors.gray2 },
Pmenu = { fg = M.colors.fg, bg = M.colors.bg1 },
PmenuSel = { fg = M.colors.bg, bg = M.colors.blue },
PmenuSbar = { bg = M.colors.bg2 },
PmenuThumb = { bg = M.colors.gray2 },
Question = { fg = M.colors.yellow, bold = true },
QuickFixLine = { fg = M.colors.bg, bg = M.colors.yellow },
Search = { fg = M.colors.bg, bg = M.colors.yellow },
SpecialKey = { fg = M.colors.gray2 },
SpellBad = { fg = M.colors.red, undercurl = true },
SpellCap = { fg = M.colors.blue, undercurl = true },
SpellLocal = { fg = M.colors.aqua, undercurl = true },
SpellRare = { fg = M.colors.purple, undercurl = true },
StatusLine = { fg = M.colors.fg, bg = M.colors.bg1 },
StatusLineNC = { fg = M.colors.gray2, bg = M.colors.bg1 },
TabLine = { fg = M.colors.gray2, bg = M.colors.bg1 },
TabLineFill = { fg = M.colors.gray2, bg = M.colors.bg1 },
TabLineSel = { fg = M.colors.fg, bg = M.colors.bg },
Title = { fg = M.colors.orange, bold = true },
Visual = { bg = M.colors.bg2 },
VisualNOS = { fg = M.colors.gray2 },
WarningMsg = { fg = M.colors.yellow, bold = true },
Whitespace = { fg = M.colors.gray2 },
WildMenu = { fg = M.colors.bg, bg = M.colors.blue },
-- Syntax highlighting
Comment = { fg = M.colors.gray2 },
Constant = { fg = M.colors.purple },
String = { fg = M.colors.green },
Character = { fg = M.colors.green },
Number = { fg = M.colors.purple },
Boolean = { fg = M.colors.purple },
Float = { fg = M.colors.purple },
Identifier = { fg = M.colors.blue },
Function = { fg = M.colors.green },
Statement = { fg = M.colors.red },
Conditional = { fg = M.colors.red },
Repeat = { fg = M.colors.red },
Label = { fg = M.colors.orange },
Operator = { fg = M.colors.orange },
Keyword = { fg = M.colors.red },
Exception = { fg = M.colors.red },
PreProc = { fg = M.colors.aqua },
Include = { fg = M.colors.blue },
Define = { fg = M.colors.purple },
Macro = { fg = M.colors.purple },
PreCondit = { fg = M.colors.aqua },
Type = { fg = M.colors.yellow },
StorageClass = { fg = M.colors.orange },
Structure = { fg = M.colors.aqua },
Typedef = { fg = M.colors.yellow },
Special = { fg = M.colors.orange },
SpecialChar = { fg = M.colors.red },
Tag = { fg = M.colors.orange },
Delimiter = { fg = M.colors.gray2 },
SpecialComment = { fg = M.colors.aqua },
Debug = { fg = M.colors.red },
Underlined = { fg = M.colors.blue, underline = true },
Ignore = { fg = M.colors.gray2 },
Error = { fg = M.colors.red, bold = true },
Todo = { fg = M.colors.yellow, bold = true },
}
return M

View File

@@ -0,0 +1,114 @@
-- Everforest theme for Neovim
-- Generated from template - do not edit manually
local M = {}
M.colors = {
bg = '#f3ead3',
bg1 = '#ede6cf',
bg2 = '#e8e3cc',
fg = '#5c6a72',
red = '#e67e80',
orange = '#e69875',
yellow = '#dbbc7f',
green = '#a7c080',
aqua = '#83c092',
blue = '#7fbbb3',
purple = '#d699b6',
gray1 = '#a6b0a0',
gray2 = '#b3c0b0',
gray3 = '#c0cdb8',
}
M.highlights = {
-- Editor highlights
Normal = { fg = M.colors.fg, bg = M.colors.bg },
NormalFloat = { fg = M.colors.fg, bg = M.colors.bg1 },
ColorColumn = { bg = M.colors.bg1 },
Conceal = { fg = M.colors.gray2 },
Cursor = { fg = M.colors.bg, bg = M.colors.fg },
lCursor = { fg = M.colors.bg, bg = M.colors.fg },
CursorIM = { fg = M.colors.bg, bg = M.colors.fg },
CursorColumn = { bg = M.colors.bg1 },
CursorLine = { bg = M.colors.bg1 },
Directory = { fg = M.colors.blue, bold = true },
DiffAdd = { fg = M.colors.green, bg = M.colors.bg },
DiffChange = { fg = M.colors.blue, bg = M.colors.bg },
DiffDelete = { fg = M.colors.red, bg = M.colors.bg },
DiffText = { fg = M.colors.yellow, bg = M.colors.bg },
EndOfBuffer = { fg = M.colors.gray2 },
ErrorMsg = { fg = M.colors.red, bold = true },
VertSplit = { fg = M.colors.gray2 },
Folded = { fg = M.colors.gray2, bg = M.colors.bg1 },
FoldColumn = { fg = M.colors.gray2, bg = M.colors.bg },
SignColumn = { fg = M.colors.fg, bg = M.colors.bg },
IncSearch = { fg = M.colors.bg, bg = M.colors.orange },
LineNr = { fg = M.colors.gray2 },
CursorLineNr = { fg = M.colors.yellow, bold = true },
MatchParen = { fg = M.colors.orange, bold = true },
ModeMsg = { fg = M.colors.fg, bold = true },
MoreMsg = { fg = M.colors.blue, bold = true },
NonText = { fg = M.colors.gray2 },
Pmenu = { fg = M.colors.fg, bg = M.colors.bg1 },
PmenuSel = { fg = M.colors.bg, bg = M.colors.blue },
PmenuSbar = { bg = M.colors.bg2 },
PmenuThumb = { bg = M.colors.gray2 },
Question = { fg = M.colors.yellow, bold = true },
QuickFixLine = { fg = M.colors.bg, bg = M.colors.yellow },
Search = { fg = M.colors.bg, bg = M.colors.yellow },
SpecialKey = { fg = M.colors.gray2 },
SpellBad = { fg = M.colors.red, undercurl = true },
SpellCap = { fg = M.colors.blue, undercurl = true },
SpellLocal = { fg = M.colors.aqua, undercurl = true },
SpellRare = { fg = M.colors.purple, undercurl = true },
StatusLine = { fg = M.colors.fg, bg = M.colors.bg1 },
StatusLineNC = { fg = M.colors.gray2, bg = M.colors.bg1 },
TabLine = { fg = M.colors.gray2, bg = M.colors.bg1 },
TabLineFill = { fg = M.colors.gray2, bg = M.colors.bg1 },
TabLineSel = { fg = M.colors.fg, bg = M.colors.bg },
Title = { fg = M.colors.orange, bold = true },
Visual = { bg = M.colors.bg2 },
VisualNOS = { fg = M.colors.gray2 },
WarningMsg = { fg = M.colors.yellow, bold = true },
Whitespace = { fg = M.colors.gray2 },
WildMenu = { fg = M.colors.bg, bg = M.colors.blue },
-- Syntax highlighting
Comment = { fg = M.colors.gray2 },
Constant = { fg = M.colors.purple },
String = { fg = M.colors.green },
Character = { fg = M.colors.green },
Number = { fg = M.colors.purple },
Boolean = { fg = M.colors.purple },
Float = { fg = M.colors.purple },
Identifier = { fg = M.colors.blue },
Function = { fg = M.colors.green },
Statement = { fg = M.colors.red },
Conditional = { fg = M.colors.red },
Repeat = { fg = M.colors.red },
Label = { fg = M.colors.orange },
Operator = { fg = M.colors.orange },
Keyword = { fg = M.colors.red },
Exception = { fg = M.colors.red },
PreProc = { fg = M.colors.aqua },
Include = { fg = M.colors.blue },
Define = { fg = M.colors.purple },
Macro = { fg = M.colors.purple },
PreCondit = { fg = M.colors.aqua },
Type = { fg = M.colors.yellow },
StorageClass = { fg = M.colors.orange },
Structure = { fg = M.colors.aqua },
Typedef = { fg = M.colors.yellow },
Special = { fg = M.colors.orange },
SpecialChar = { fg = M.colors.red },
Tag = { fg = M.colors.orange },
Delimiter = { fg = M.colors.gray2 },
SpecialComment = { fg = M.colors.aqua },
Debug = { fg = M.colors.red },
Underlined = { fg = M.colors.blue, underline = true },
Ignore = { fg = M.colors.gray2 },
Error = { fg = M.colors.red, bold = true },
Todo = { fg = M.colors.yellow, bold = true },
}
return M

View File

@@ -65,6 +65,6 @@ vim.schedule(function()
end)
-- xiyaowong/transparent.nvim
-- vim.g.transparent_enabled = true
vim.g.transparent_enabled = true
-- vim: ts=2 sts=2 sw=2 et

View File

@@ -56,9 +56,12 @@ return {
opts = {
snippets = { preset = 'luasnip' },
-- 'default' for mappings similar to built-in completion
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
-- see the "default configuration" section below for full documentation on how to
-- 'super-tab' for mappings similar to vscode (tab to accept,
-- arrow keys to navigate)
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to
-- accept
-- see the "default configuration" section below for
-- documentation on how to
-- define your own keymap.
keymap = {
preset = 'default',

View File

@@ -11,6 +11,27 @@ return {
end,
},
{
'ivuorinen/nvim-shellspec',
ft = 'shellspec',
config = function()
require('shellspec').setup {
auto_format = true,
indent_size = 2,
indent_comments = true,
}
end,
},
{
'pablos123/shellcheck.nvim',
config = function()
require('shellcheck-nvim').setup {
shellcheck_options = { '-x' },
}
end,
},
-- Go development plugin for Vim
-- https://github.com/fatih/vim-go
{

View File

@@ -16,7 +16,8 @@ return {
},
opts = {
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
-- override markdown rendering so that **cmp** and other plugins
-- use **Treesitter**
override = {
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
['vim.lsp.util.stylize_markdown'] = true,

View File

@@ -54,7 +54,9 @@ return {
event_handlers = {
{
event = 'file_opened',
handler = function(_) require('neo-tree.command').execute { action = 'close' } end,
handler = function(_)
require('neo-tree.command').execute { action = 'close' }
end,
},
},
default_component_configs = {

View File

@@ -6,9 +6,9 @@ return {
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
require('everforest').setup {
background = 'soft', -- hard, medium, soft
transparent_background_level = 0, -- 0, 1, 2
sign_column_background = 'none', -- none, dimmed, normal
background = 'medium', -- hard, medium, soft
transparent_background_level = 2, -- 0, 1, 2
sign_column_background = 'grey', -- none, grey
disable_italic_comments = false,
diagnostic_virtual_text = 'coloured', -- coloured, gray, underline, none
diagnostic_line_highlight = true,
@@ -27,26 +27,6 @@ return {
end,
},
-- {
-- 'rose-pine/neovim',
-- name = 'rose-pine',
-- opts = {
-- dim_inactive_windows = false,
-- extend_background_behind_borders = true,
-- styles = {
-- bold = true,
-- italic = true,
-- transparency = true,
-- },
-- enable = {
-- terminal = true,
-- legacy_highlights = true, -- Improve compatibility for previous versions of Neovim
-- migrations = true, -- Handle deprecated options automatically
-- },
-- },
-- config = function() vim.cmd 'colorscheme rose-pine' end,
-- },
-- Automatic dark mode
-- https://github.com/f-person/auto-dark-mode.nvim
{
@@ -80,35 +60,37 @@ return {
-- Remove all background colors to make nvim transparent
-- https://github.com/xiyaowong/nvim-transparent
-- {
-- 'xiyaowong/nvim-transparent',
-- lazy = false,
-- enabled = false,
-- config = function()
-- local t = require 'transparent'
-- t.setup {
-- extra_groups = {
-- 'NormalNC',
-- 'NormalFloat',
-- 'FloatTitle',
-- 'FloatBorder',
-- 'NotifyDEBUGBorder',
-- 'NotifyERRORBorder',
-- 'NotifyINFOBorder',
-- 'NotifyINFOBorder73',
-- 'NotifyINFOBorder75',
-- 'NotifyINFOBorder101',
-- 'NotifyTRACEBorder',
-- 'NotifyWARNBorder',
-- 'TelescopeBorder',
-- 'TelescopePromptBorder',
-- 'TelescopeResultsBorder',
-- 'TelescopePreviewBorder',
-- },
-- }
-- t.clear_prefix 'NeoTree'
-- end,
-- },
{
'xiyaowong/nvim-transparent',
lazy = false,
enabled = true,
config = function()
local t = require 'transparent'
t.setup {
extra_groups = {
'NormalNC',
'NormalFloat',
'EndOfBuffer',
'FloatTitle',
'FloatBorder',
'NotifyDEBUGBorder',
'NotifyERRORBorder',
'NotifyINFOBorder',
'NotifyINFOBorder73',
'NotifyINFOBorder75',
'NotifyINFOBorder101',
'NotifyTRACEBorder',
'NotifyWARNBorder',
'NotifyBackground',
'TelescopeBorder',
'TelescopePromptBorder',
'TelescopeResultsBorder',
'TelescopePreviewBorder',
},
}
t.clear_prefix 'NeoTree'
end,
},
-- Display a character as the colorcolumn
-- https://github.com/lukas-reineke/virt-column.nvim

View File

@@ -199,7 +199,7 @@
"progress bar": {
"body": [
"for _ in {1..100}; do",
"\tprintf \"🬋\"",
"\tprintf \"\ud83e\udf0b\"",
"\tsleep 0.5",
"done"
],
@@ -242,7 +242,7 @@
"spinner": {
"body": [
"# spinner with 20s timeout",
"spinner=\"⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏\"",
"spinner=\"\u280b\u2819\u2839\u2838\u283c\u2834\u2826\u2827\u2807\u280f\"",
"for i in {1..100}; do",
"\tpos=\\$((i % \\${#spinner}))",
"\tprintf \"\\r%s\" \"\\${spinner:\\$pos:1}\"",

View File

@@ -1,6 +1,8 @@
{
"account_id": "S5Z2DMNFKJEZBPCWRHRWC4DCGI",
"entrypoint": ["gh"],
"entrypoint": [
"gh"
],
"credentials": [
{
"plugin": "github",

59
config/sesh/sesh.toml Normal file
View File

@@ -0,0 +1,59 @@
#
# ███████╗███████╗███████╗██╗ ██╗ ██████╗ ██████╗ ███╗ ██╗███████╗██╗ ██████╗
# ██╔════╝██╔════╝██╔════╝██║ ██║ ██╔════╝██╔═══██╗████╗ ██║██╔════╝██║██╔════╝
# ███████╗█████╗ ███████╗███████║ ██║ ██║ ██║██╔██╗ ██║█████╗ ██║██║ ███╗
# ╚════██║██╔══╝ ╚════██║██╔══██║ ██║ ██║ ██║██║╚██╗██║██╔══╝ ██║██║ ██║
# ███████║███████╗███████║██║ ██║ ╚██████╗╚██████╔╝██║ ╚████║██║ ██║╚██████╔╝
# ╚══════╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝
#
# Smart session manager for the terminal
# https://github.com/joshmedeski/sesh
strict_mode = false
# [marker]
# inactivity_threshold = 10 # Seconds before alerts start
# alert_level_1_time = 60 # Light alert duration
# alert_level_2_time = 300 # Medium alert duration
# alert_level_3_time = 600 # Urgent alert duration
blacklist = [
"^scratch$",
"^_"
]
[[session]]
name = "home (~)"
path = "~"
disable_startup_command = true
# startup_command = "l"
[[session]]
name = "dotfiles"
path = "~/.dotfiles"
[[session]]
name = "neovim config"
path = "~/.dotfiles/config/nvim"
[[session]]
name = "sesh config"
path = "~/.dotfiles/config/sesh"
startup_command = "nvim sesh.toml"
preview_command = "bat --language=toml --style=snip --color=always ~/.dotfiles/config/sesh/sesh.toml"
[[session]]
name = "my custom binaries"
path = "~/.dotfiles/local/bin"
[[session]]
name = "code"
path = "~/Code/"
disable_startup_command = true
# startup_command = "l"
[[session]]
name = "Downloads"
path = "~/Downloads"
startup_command = "lsa"

View File

@@ -102,4 +102,3 @@ ctrl + alt - k : \
ctrl + alt - l : \
yabai -m window --resize right:50:0; \
yabai -m window --resize left:50:0

View File

@@ -152,4 +152,3 @@ format = "[$virtualenv]($style) "
[username]
format = "[$user]($style) "

View File

@@ -1,2 +1 @@
plugin_cache_dir = "$HOME/.cache/terraform/plugin-cache"

View File

@@ -1,93 +1,46 @@
# set-option -g status-style 'fg=#cad3f5,bg=default'
# set-window-option -g window-status-style 'fg=#cad3f5,bg=default dim'
# set-window-option -g window-status-current-style 'fg=#04a5e5,bg=default'
# set-window-option -g window-status-activity-style 'fg=#cad3f5,bg=default nodim'
# set-window-option -g window-status-bell-style 'fg=#cad3f5,bg=default'
# set -g message-style 'fg=#c6a0f6 bg=#24273a bold'
# Everforest dark theme for tmux
# Generated from template - do not edit manually
## COLORSCHEME: everforest dark medium
set -g @everforest_bg_dim '#efebd4 '
set -g @everforest_bg0 '#fdf6e3 '
set -g @everforest_bg1 '#f6f0d9'
set -g @everforest_bg2 '#efebd4'
set -g @everforest_bg3 '#e6e2cc'
set -g @everforest_bg4 '#e0dcc7'
set -g @everforest_bg5 '#bdc3af'
set -g @everforest_bg_visual '#eaedc8'
set -g @everforest_bg_red '#fbe3da'
set -g @everforest_bg_green '#f0f1d2'
set -g @everforest_bg_blue '#e9f0e9'
set -g @everforest_bg_yellow '#faedcd'
# Enable proper color support
set -g default-terminal "tmux-256color"
set -as terminal-features ",*:RGB"
set -g @everforest_fg '#5c6a72'
set -g @everforest_red '#f85552'
set -g @everforest_orange '#f57d26'
set -g @everforest_yellow '#dfa000'
set -g @everforest_green '#8da101'
set -g @everforest_aqua '#35a77c'
set -g @everforest_blue '#3a94c5'
set -g @everforest_purple '#df69ba'
set -g @everforest_grey0 '#a6b0a0'
set -g @everforest_grey1 '#939f91'
set -g @everforest_grey2 '#829181'
set -g @everforest_statusline1 '#93b259'
set -g @everforest_statusline2 '#708089'
set -g @everforest_statusline3 '#e66868'
set -g pane-border-style "bg=default,fg=#859289"
set -g pane-active-border-style "bg=default,fg=#a7c080"
set-option -g status "on"
set -g status-interval 2
# Window tabs
set -g window-style "bg=default,fg=default,dim"
set -g window-status-style "bg=default,fg=default,dim"
set -g window-status-current-style "bg=default,fg=#d3c6aa"
set -g window-status-activity-style "bg=default,fg=#dbbc7f,nodim"
set -g window-status-bell-style "bg=default,fg=yellow,nodim"
set -g window-status-last-style "bg=default,fg=#a7c080"
set -g window-status-format " #I:#W "
set-option -g status-fg '#5c6a72' # fg (No idea why I can't use variables here)
set-option -g status-bg '#fdf6e4' # bg0
# Messages
set -g message-style "bg=default,fg=#d3c6aa"
set -g message-command-style "bg=default,fg=#d3c6aa"
set-option -g mode-style fg='#{@everforest_purple}',bg='#{@everforest_bg_red}' # fg=purple, bg=bg_visual
# Status bar
set -g status-style "bg=default,fg=default"
set -g status-left " #[default]"
set -g status-right " #[fg=#a7c080]#S@#[fg=#859289]#h #[fg=#7fbbb3]%H:%M #[fg=#dbbc7f]%d.%m "
set -g status-left-style "bg=default,fg=white"
set -g status-right-style "bg=default,fg=white"
# default statusbar colors
set-option -g status-style fg='#{@everforest_fg}',bg='#{@everforest_bg_dim}',default # fg=fg bg=bg_dim
set -g menu-style "bg=default,fg=white"
set -g menu-selected-style "bg=default,fg=#a7c080"
set -g menu-border-style "fg=#a7c080"
set -g menu-border-lines "single"
# ---- Windows ----
# default window title colors
set-window-option -g window-status-style fg='#{@everforest_bg5}',bg='#{@everforest_bg0}' # fg=yellow bg=bg0
set -g popup-style "bg=default,fg=white"
set -g popup-border-style "fg=#a7c080"
set -g popup-border-lines "single"
# default window with an activity alert
set-window-option -g window-status-activity-style 'bg=#{@everforest_bg1},fg=#{@everforest_bg3}' # bg=bg1, fg=fg3
# active window title colors
set-window-option -g window-status-current-style fg='#{@everforest_fg}',bg='#{@everforest_bg_green}' # fg=fg bg=bg_green
# ---- Pane ----
# pane borders
set-option -g pane-border-style fg='#{@everforest_bg1}' # fg=bg1
set-option -g pane-active-border-style 'fg=#{@everforest_blue}' # fg=blue
# pane number display
set-option -g display-panes-active-colour '#3a9c53' # blue
set-option -g display-panes-colour '#f57d26' # orange
# ---- Command ----
# message info
set-option -g message-style fg='#{@everforest_statusline3}',bg='#{@everforest_bg_dim}' # fg=statusline3 bg=bg_dim
# writing commands inactive
set-option -g message-command-style 'fg=#{@everforest_bg3},bg=#{@everforest_bg1}' # bg=fg3, fg=bg1
# ---- Miscellaneous ----
# clock
set-window-option -g clock-mode-colour '#3a9c53' #blue
# bell
set-window-option -g window-status-bell-style fg='#{@everforest_bg0}',bg='#{@everforest_statusline3}' # fg=bg, bg=statusline3
# ---- Formatting ----
set-option -g status-left-style none
set -g status-left-length 60
set -g status-left '#[fg=#{@everforest_bg_dim},bg=#{@everforest_green},bold] #S #[fg=#{@everforest_green},bg=#{@everforest_bg2},nobold]#[fg=#{@everforest_green},bg=#{@everforest_bg2},bold] #(whoami) #[fg=#{@everforest_bg2},bg=#{@everforest_bg0},nobold]'
set-option -g status-right-style none
set -g status-right-length 150
set -g status-right '#[fg=#{@everforest_bg2}]#[fg=#{@everforest_fg},bg=#{@everforest_bg2}] #[fg=#{@everforest_fg},bg=#{@everforest_bg2}]%Y-%m-%d  %H:%M #[fg=#{@everforest_aqua},bg=#{@everforest_bg2},bold]#[fg=#{@everforest_bg_dim},bg=#{@everforest_aqua},bold] #h '
set -g window-status-separator '#[fg=#{@everforest_grey2},bg=#{@everforest_bg0}] '
set -g window-status-format "#[fg=#{@everforest_grey0},bg=#{@everforest_bg0}] #I  #[fg=#{@everforest_grey0},bg=#{@everforest_bg0}]#W "
set -g window-status-current-format "#[fg=#{@everforest_bg0},bg=#{@everforest_bg_green}]#[fg=#{@everforest_fg},bg=#{@everforest_bg_green}] #I  #[fg=#{@everforest_fg},bg=#{@everforest_bg_green},bold]#W #[fg=#{@everforest_bg_green},bg=#{@everforest_bg0},nobold]"
set -g display-panes-colour "blue"
set -g display-panes-active-colour "red"
set -g display-panes-time 1000 # milliseconds
set -g pane-border-indicators "arrows"
set -g pane-border-lines "single"
set -g clock-mode-style "24"

View File

@@ -1,93 +1,6 @@
# set-option -g status-style 'fg=#4c4f69,bg=default'
# set-window-option -g window-status-style 'fg=#4c4f69,bg=default dim'
# set-window-option -g window-status-current-style 'fg=#8839ef,bg=default'
# set-window-option -g window-status-activity-style 'fg=#4c4f69,bg=default nodim'
# set-window-option -g window-status-bell-style 'fg=#4c4f69,bg=default'
# set -g message-style 'fg=#8839ef bg=#e6e9ef bold' # fg magenta, bg black
## COLORSCHEME: everforest light medium
set -g @everforest_bg_dim '#e5dfc5'
set -g @everforest_bg0 '#f3ead3'
set -g @everforest_bg1 '#eae4ca'
set -g @everforest_bg2 '#e5dfc5'
set -g @everforest_bg3 '#ddd8be'
set -g @everforest_bg4 '#d8d3ba'
set -g @everforest_bg5 '#b9c0ab'
set -g @everforest_bg_visual '#e1e4b0'
set -g @everforest_bg_red '#f4dbd0'
set -g @everforest_bg_green '#e5e6c5'
set -g @everforest_bg_blue '#e1e7dd'
set -g @everforest_bg_yellow '#f1e4c5'
set -g @everforest_fg '#5c6a72'
set -g @everforest_red '#f85552'
set -g @everforest_orange '#f57d26'
set -g @everforest_yellow '#dfa000'
set -g @everforest_green '#8da101'
set -g @everforest_aqua '#35a77c'
set -g @everforest_blue '#3a94c5'
set -g @everforest_purple '#df69ba'
set -g @everforest_grey0 '#a6b0a0'
set -g @everforest_grey1 '#939f91'
set -g @everforest_grey2 '#829181'
set -g @everforest_statusline1 '#93b259'
set -g @everforest_statusline2 '#708089'
set -g @everforest_statusline3 '#e66868'
set-option -g status "on"
set -g status-interval 2
set-option -g status-fg '#5c6a72' # fg (No idea why I can't use variables here)
set-option -g status-bg '#f3ead3' # bg0
set-option -g mode-style fg='#{@everforest_purple}',bg='#{@everforest_bg_red}' # fg=purple, bg=bg_visual
# default statusbar colors
set-option -g status-style fg='#{@everforest_fg}',bg='#{@everforest_bg_dim}',default # fg=fg bg=bg_dim
# ---- Windows ----
# default window title colors
set-window-option -g window-status-style fg='#{@everforest_bg5}',bg='#{@everforest_bg0}' # fg=yellow bg=bg0
# default window with an activity alert
set-window-option -g window-status-activity-style 'bg=#{@everforest_bg1},fg=#{@everforest_bg3}' # bg=bg1, fg=fg3
# active window title colors
set-window-option -g window-status-current-style fg='#{@everforest_fg}',bg='#{@everforest_bg_green}' # fg=fg bg=bg_green
# ---- Pane ----
# pane borders
set-option -g pane-border-style fg='#{@everforest_bg1}' # fg=bg1
set-option -g pane-active-border-style 'fg=#{@everforest_blue}' # fg=blue
# pane number display
set-option -g display-panes-active-colour '#3a9c53' # blue
set-option -g display-panes-colour '#f57d26' # orange
# ---- Command ----
# message info
set-option -g message-style fg='#{@everforest_statusline3}',bg='#{@everforest_bg_dim}' # fg=statusline3 bg=bg_dim
# writing commands inactive
set-option -g message-command-style 'fg=#{@everforest_bg3},bg=#{@everforest_bg1}' # bg=fg3, fg=bg1
# ---- Miscellaneous ----
# clock
set-window-option -g clock-mode-colour '#3a9c53' #blue
# bell
set-window-option -g window-status-bell-style fg='#{@everforest_bg0}',bg='#{@everforest_statusline3}' # fg=bg, bg=statusline3
# ---- Formatting ----
set-option -g status-left-style none
set -g status-left-length 60
set -g status-left '#[fg=#{@everforest_bg_dim},bg=#{@everforest_green},bold] #S #[fg=#{@everforest_green},bg=#{@everforest_bg2},nobold]#[fg=#{@everforest_green},bg=#{@everforest_bg2},bold] #(whoami) #[fg=#{@everforest_bg2},bg=#{@everforest_bg0},nobold]'
set-option -g status-right-style none
set -g status-right-length 150
set -g status-right '#[fg=#{@everforest_bg2}]#[fg=#{@everforest_fg},bg=#{@everforest_bg2}] #[fg=#{@everforest_fg},bg=#{@everforest_bg2}]%Y-%m-%d  %H:%M #[fg=#{@everforest_aqua},bg=#{@everforest_bg2},bold]#[fg=#{@everforest_bg_dim},bg=#{@everforest_aqua},bold] #h '
set -g window-status-separator '#[fg=#{@everforest_grey2},bg=#{@everforest_bg0}] '
set -g window-status-format "#[fg=#{@everforest_grey0},bg=#{@everforest_bg0}] #I  #[fg=#{@everforest_grey0},bg=#{@everforest_bg0}]#W "
set -g window-status-current-format "#[fg=#{@everforest_bg0},bg=#{@everforest_bg_green}]#[fg=#{@everforest_fg},bg=#{@everforest_bg_green}] #I  #[fg=#{@everforest_fg},bg=#{@everforest_bg_green},bold]#W #[fg=#{@everforest_bg_green},bg=#{@everforest_bg0},nobold]"
set-option -g status-style 'fg=#4c4f69,bg=default'
set-window-option -g window-status-style 'fg=#4c4f69,bg=default dim'
set-window-option -g window-status-current-style 'fg=#8839ef,bg=default'
set-window-option -g window-status-activity-style 'fg=#4c4f69,bg=default nodim'
set-window-option -g window-status-bell-style 'fg=#4c4f69,bg=default'
set -g message-style 'fg=#8839ef bg=#e6e9ef bold' # fg magenta, bg black

View File

@@ -51,8 +51,8 @@ if-shell '[ "$DEBUG" = "1" ]' 'set -g debug-file ~/.cache/tmux-debug.log'
# │ Theme │
# ╰──────────────────────────────────────────────────────────╯
set -g pane-active-border-style "fg=#7aa2f7"
set -g pane-border-style "fg=#31748f"
set -g pane-active-border-style "bg=default,fg=#7aa2f7"
set -g pane-border-style "bg=default,fg=#31748f"
set -g status-style "bg=default"
set -g status-justify "left"
set -g status-left ''
@@ -106,6 +106,28 @@ bind -N "tms windows" C-w display-popup -E "tms windows"
bind -N "tms switch" C-s display-popup -E "tms switch"
bind -N "tms refresh" C-r display-popup -E "tms refresh"
# global sessions
# bind-key "K" display-popup -h 90% -w 50% -E "sesh ui"
bind-key "K" run-shell "sesh connect \"$(
sesh list --icons --hide-duplicates | fzf-tmux -p 100%,100% --no-border \
--list-border \
--no-sort --prompt '⚡ ' \
--input-border \
--header-border \
--bind 'tab:down,btab:up' \
--bind 'ctrl-b:abort' \
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)' \
--bind 'ctrl-t:change-prompt( )+reload(sesh list -t --icons)' \
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \
--preview-window 'right:70%' \
--preview 'sesh preview {}' \
)\""
bind-key "N" display-popup -E "sesh ui"
# ╭──────────────────────────────────────────────────────────╮
# │ Plugins │
# ╰──────────────────────────────────────────────────────────╯
@@ -168,4 +190,4 @@ run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-fzf-url/fzf-url.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/resurrect.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux"
# run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-dark-notify/main.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-dark-notify/main.tmux"

View File

@@ -4,7 +4,7 @@
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/"

View File

@@ -1 +1 @@
en_US
en_US

View File

@@ -1,24 +1,24 @@
[colors]
ansi = [
'#475258',
'#e67e80',
'#a7c080',
'#dbbc7f',
'#7fbbb3',
'#d699b6',
'#83c092',
'#d3c6aa',
'#475258',
'#e67e80',
'#a7c080',
'#dbbc7f',
'#7fbbb3',
'#d699b6',
'#83c092',
'#d3c6aa',
]
background = '#2d353b'
brights = [
'#475258',
'#e67e80',
'#a7c080',
'#dbbc7f',
'#7fbbb3',
'#d699b6',
'#83c092',
'#d3c6aa',
'#475258',
'#e67e80',
'#a7c080',
'#dbbc7f',
'#7fbbb3',
'#d699b6',
'#83c092',
'#d3c6aa',
]
cursor_bg = '#d3c6aa'
cursor_border = '#d3c6aa'

View File

@@ -1,24 +1,24 @@
[colors]
ansi = [
'#5c6a72',
'#f85552',
'#8da101',
'#dfa000',
'#3a94c5',
'#df69ba',
'#35a77c',
'#e0dcc7',
'#5c6a72',
'#f85552',
'#8da101',
'#dfa000',
'#3a94c5',
'#df69ba',
'#35a77c',
'#e0dcc7',
]
background = '#fdf6e3'
brights = [
'#5c6a72',
'#f85552',
'#8da101',
'#dfa000',
'#3a94c5',
'#df69ba',
'#35a77c',
'#e0dcc7',
'#5c6a72',
'#f85552',
'#8da101',
'#dfa000',
'#3a94c5',
'#df69ba',
'#35a77c',
'#e0dcc7',
]
cursor_bg = '#5c6a72'
cursor_border = '#5c6a72'

View File

@@ -12,6 +12,10 @@ config.color_scheme_dirs = {
-- Font and font size
config.font_size = 16
config.font = wezterm.font_with_fallback {
{
family = 'Monaspace Argon NF',
weight = 'Regular',
},
{
family = 'Operator Mono',
weight = 'Book',
@@ -22,7 +26,20 @@ config.font = wezterm.font_with_fallback {
'Symbols Nerd Font Mono',
}
config.font_shaper = 'Harfbuzz'
config.harfbuzz_features = { 'calt=1', 'clig=1', 'liga=1' }
config.harfbuzz_features = {
'calt=1',
'clig=1',
'liga=1',
'ss01=1',
'ss02=1',
'ss03=1',
'ss04=1',
'ss05=1',
'ss06=1',
'ss07=1',
'ss08=1',
'ss09=1',
}
config.selection_word_boundary = ' \t\n{[}]()"\'`,;:'

View File

@@ -29,4 +29,3 @@ rules:
allow-non-breakable-inline-mappings: true
max: 120
truthy: disable

View File

@@ -1,156 +0,0 @@
{
"features": {
"edit_prediction_provider": "copilot"
},
"context_servers": {
"github-activity-summarizer": {
"source": "extension",
"settings": {}
},
"mcp-server-time": {
"source": "custom",
"command": "uvx",
"args": ["mcp-server-time"]
}
},
"telemetry": {
"metrics": false
},
"agent": {
"always_allow_tool_actions": true,
"default_profile": "write",
"default_model": {
"provider": "copilot_chat",
"model": "claude-sonnet-4"
},
"play_sound_when_agent_done": true
},
"languages": {
"PHP": {
"language_servers": ["intelephense", "phpactor"],
"formatter": "language_server"
},
"Python": {
"enable_language_server": true,
"allow_rewrap": "anywhere",
"auto_indent_on_paste": true
},
"Shell Script": {
"enable_language_server": true
},
"JavaScript": {
"enable_language_server": true,
"code_actions_on_format": {
"source.fixAll.eslint": true
}
},
"Markdown": {
"enable_language_server": true,
"preferred_line_length": 120,
"formatter": "language_server"
},
"Lua": {
"enable_language_server": true,
"tab_size": 2
},
"Go": {
"language_servers": ["gopls", "golangci-lint"]
}
},
"lsp": {
"eslint": {
"settings": {
"nodePath": "./node_modules/.bin"
}
},
"gopls": {
"initialization_options": {
"hints": {
"assignVariableTypes": true,
"compositeLiteralFields": true,
"compositeLiteralTypes": true,
"constantValues": true,
"functionTypeParameters": true,
"parameterNames": true,
"rangeVariableTypes": true
}
}
}
},
"diagnostics": {
"button": true,
"include_warnings": true,
"lsp_pull_diagnostics": {
"enabled": true,
"debounce_ms": 50
},
"inline": {
"enabled": true,
"update_debounce_ms": 150
}
},
"multi_cursor_modifier": "cmd_or_ctrl",
"indent_guides": {
"enabled": true,
"coloring": "indent_aware"
},
"preferred_line_length": 100,
"soft_wrap": "bounded",
"wrap_guides": [100, 120, 160, 200],
"format_on_save": "on",
"vim_mode": true,
"theme": {
"mode": "system",
"light": "Everforest Dark Soft",
"dark": "Everforest Dark Hard"
},
"inlay_hints": {
"enabled": true,
"show_type_hints": true,
"show_parameter_hints": true,
"show_other_hints": true
},
"ui_font_size": 16,
"buffer_font_size": 16,
"buffer_font_fallbacks": ["JetBrainsMono Nerd Font"],
"use_autoclose": false,
"auto_install_extensions": {
"angular": true,
"ansible": true,
"basher": true,
"biome": true,
"blade": true,
"csharp": true,
"css-modules-kit": true,
"dockerfile": true,
"git-firefly": true,
"github-activity-summarizer": true,
"go-snippets": true,
"golangci-lint": true,
"gosum": true,
"html": true,
"ini": true,
"json": true,
"json5": true,
"just": true,
"just-ls": true,
"lua": true,
"make": true,
"php": true,
"python-requirements": true,
"python-snippets": true,
"rose-pine-theme": true,
"ruff": true,
"scss": true,
"sieve": true,
"sql": true,
"stylelint": true,
"templ": true,
"toml": true,
"vue": true,
"vue-snippets": true,
"wakatime": true,
"xcode-themes": true,
"yaml": true
}
}

View File

@@ -24,4 +24,3 @@ load-nvmrc() {
add-zsh-hook chpwd load-nvmrc
load-nvmrc

View File

@@ -25,9 +25,9 @@ git submodule update --init --recursive "${DOTBOT_DIR}"
if [ "${DOTBOT_HOST}" != "" ]; then
DOTBOT_HOST_CONFIG="${BASEDIR}/hosts/${DOTBOT_HOST}/${CONFIG}"
echo "-> Trying if host config can be found: ${DOTBOT_HOST_CONFIG}"
[ -r "$DOTBOT_HOST_CONFIG" ] && [ -f "$DOTBOT_HOST_CONFIG" ] \
&& echo "(!) Found $DOTBOT_HOST_CONFIG" \
&& "$DOTBOT_BIN_PATH" \
[ -r "$DOTBOT_HOST_CONFIG" ] && [ -f "$DOTBOT_HOST_CONFIG" ] &&
echo "(!) Found $DOTBOT_HOST_CONFIG" &&
"$DOTBOT_BIN_PATH" \
-d "$BASEDIR" \
--plugin-dir=tools/dotbot-asdf \
--plugin-dir=tools/dotbot-brew \

View File

@@ -77,11 +77,11 @@ Examples:
$BIN Update all git repositories
$BIN --verbose Update with detailed output
$BIN --exclude node_modules --exclude vendor
Update repositories but skip node_modules
and vendor dirs
Update repositories but skip node_modules
and vendor dirs
$BIN --cleanup Update and clean up merged branches
$BIN --config ~/.gitupdate.conf
Use options from config file
Use options from config file
EOF
exit 0
}

230
local/bin/x-codeql Executable file
View File

@@ -0,0 +1,230 @@
#!/bin/sh
# x-codeql: CodeQL security scanning wrapper
# POSIX-compatible shell script
set -e
VERSION="1.0.0"
# Language mappings: extension -> codeql language
LANG_MAP="c:.c,.h|cpp:.cpp,.cc,.cxx,.hpp,.hxx|csharp:.cs|go:.go|java:.java|
javascript:.js,.jsx,.mjs,.ts,.tsx|python:.py|ruby:.rb|swift:.swift"
usage()
{
cat << EOF
Usage: $0 [OPTIONS]
Options:
--path PATH Source path to analyze (default: current directory)
--parallel Run language analyses in parallel
-h, --help Show this help message
-v, --version Show version
EOF
exit "${1:-0}"
}
log()
{
printf '[%s] %s\n' "$(date '+%H:%M:%S')" "$*" >&2
}
err()
{
log "ERROR: $*"
exit 1
}
check_codeql()
{
command -v codeql > /dev/null 2>&1 || err "codeql binary not found in PATH"
log "Found codeql: $(codeql version --format=terse)"
}
get_cache_dir()
{
cache="${XDG_CACHE_HOME:-$HOME/.cache}/codeql"
mkdir -p "$cache" || err "Cannot create cache directory: $cache"
printf '%s' "$cache"
}
detect_languages()
{
src_path="$1"
detected=""
# Check for GitHub Actions workflows
if [ -d "$src_path/.github/workflows" ] \
&& find "$src_path/.github/workflows" -name '*.yml' -o -name '*.yaml' \
2> /dev/null | grep -q .; then
detected="actions"
fi
# Scan for language files
IFS='|'
for mapping in $LANG_MAP; do
lang="${mapping%%:*}"
exts="${mapping#*:}"
found=0
IFS=','
for ext in $exts; do
if find "$src_path" -type f -name "*$ext" -print -quit 2> /dev/null \
| grep -q .; then
found=1
break
fi
done
[ "$found" -eq 1 ] && detected="$detected $lang"
IFS='|'
done
[ -z "$detected" ] && err "No supported languages detected in $src_path"
# Remove duplicates and trim whitespace
printf '%s' "$detected" | tr ' ' '\n' | sort -u | tr '\n' ' ' | sed 's/ $//'
}
create_database()
{
lang="$1"
src_path="$2"
db_path="$3"
log "Creating $lang database..."
codeql database create "$db_path" \
--language="$lang" \
--source-root="$src_path" \
--overwrite
}
show_results_stats()
{
sarif_file="$1"
lang="$2"
if ! command -v jq > /dev/null 2>&1; then
# No jq, basic check only
if [ ! -s "$sarif_file" ] || ! grep -q '"results"' "$sarif_file"; then
return 1
fi
return 0
fi
result_count=$(jq -r '.runs[0].results | length' "$sarif_file" 2> /dev/null || echo "0")
if [ "$result_count" -eq 0 ]; then
return 1
fi
log "Found $result_count result(s) for $lang"
jq -r '.runs[0].results[] | "\(.ruleId): \(.message.text)"' "$sarif_file" \
2> /dev/null | head -5 | while read -r line; do
log " - $line"
done
[ "$result_count" -gt 5 ] && log " ... and $((result_count - 5)) more"
return 0
}
analyze_language()
{
lang="$1"
src_path="$2"
cache_dir="$3"
output_dir="$4"
# Extract last 2 path components for unique DB name
path_suffix="$(printf '%s' "$src_path" | awk -F/ '{print $(NF-1)"-"$NF}')"
db_path="$cache_dir/db-$path_suffix-$lang"
sarif_file="$output_dir/codeql-$lang.sarif"
create_database "$lang" "$src_path" "$db_path"
log "Analyzing $lang with security-and-quality suite..."
# Try security-and-quality suite, fall back to default if not found
if ! codeql database analyze "$db_path" \
--format=sarif-latest \
--output="$sarif_file" \
--sarif-category="$lang" \
--download \
"codeql/$lang-queries:codeql-suites/$lang-security-and-quality.qls" \
2> /dev/null; then
log "Suite not found, trying default pack for $lang..."
codeql database analyze "$db_path" \
--format=sarif-latest \
--output="$sarif_file" \
--sarif-category="$lang" \
--download \
"codeql/$lang-queries"
fi
# Check results and clean up if empty
if [ -f "$sarif_file" ]; then
if ! show_results_stats "$sarif_file" "$lang"; then
log "No results found for $lang, removing empty SARIF file"
rm -f "$sarif_file"
fi
fi
# Cleanup database
rm -rf "$db_path"
}
main()
{
src_path="."
parallel=0
while [ $# -gt 0 ]; do
case "$1" in
--path)
src_path="${2:?--path requires an argument}"
shift 2
;;
--parallel)
parallel=1
shift
;;
-v | --version)
printf 'x-codeql %s\n' "$VERSION"
exit 0
;;
-h | --help)
usage 0
;;
*)
err "Unknown option: $1"
;;
esac
done
[ -d "$src_path" ] || err "Path does not exist: $src_path"
src_path="$(cd "$src_path" && pwd)"
check_codeql
cache="$(get_cache_dir)"
log "Detecting languages in $src_path..."
languages="$(detect_languages "$src_path")"
log "Found languages: $languages"
output_dir="$(pwd)"
if [ "$parallel" -eq 1 ]; then
log "Running analyses in parallel..."
for lang in $languages; do
analyze_language "$lang" "$src_path" "$cache" "$output_dir" &
done
wait
else
for lang in $languages; do
analyze_language "$lang" "$src_path" "$cache" "$output_dir"
done
fi
log "Analysis complete. SARIF files in $output_dir"
}
main "$@"

View File

@@ -28,9 +28,9 @@ versions, Git tags, branch tags, and commit SHAs with simple commands.
2. Make it executable: `chmod +x x-gh-get-latest-version`
3. Optionally set up a GitHub token as an environment variable:
```bash
export GITHUB_TOKEN="your_personal_access_token"
```
```bash
export GITHUB_TOKEN="your_personal_access_token"
```
## Usage

View File

@@ -19,9 +19,9 @@ to test the connectivity of a remote host and your route to it.
=head1 AUTHOR
Steve
--
http://www.steve.org.uk/
Steve
--
http://www.steve.org.uk/
=cut
@@ -214,7 +214,7 @@ sub parsedOptions
exit
if (
!GetOptions( "help" => \$vars{ 'help' },
!GetOptions( "help" => \$vars{ 'help' },
"verbose" => \$vars{ 'verbose' },
"forever" => \$vars{ 'loop' },
"loop" => \$vars{ 'loop' },
@@ -226,4 +226,3 @@ sub parsedOptions
return (%vars);
}

357
local/bin/x-pr-comments Executable file
View File

@@ -0,0 +1,357 @@
#!/usr/bin/env bash
# x-pr-comments - Fetch GitHub Pull Request comments and review suggestions
# Copyright (c) 2025 - Licensed under MIT
#
# Usage:
# x-pr-comments <pr-number> # When run inside a git repository
# x-pr-comments <github-pr-url> # Direct GitHub PR URL
# x-pr-comments -h|--help # Show this help
#
# Examples:
# x-pr-comments 1 # PR #1 in current repo
# x-pr-comments https://github.com/user/repo/pull/1
#
# Requirements:
# - gh CLI tool installed and authenticated
# - Internet connection for GitHub API access
#
# Output:
# Structured list of PR comments and file change requests with LLM processing directions
set -euo pipefail
# Colors for output
readonly RED='\033[0;31m'
readonly GREEN='\033[0;32m'
readonly YELLOW='\033[1;33m'
readonly BLUE='\033[0;34m'
readonly NC='\033[0m' # No Color
# Show usage information
show_usage()
{
sed -n '3,20p' "$0" | sed 's/^# //' | sed 's/^#//'
}
# Log functions
log_error()
{
echo -e "${RED}ERROR:${NC} $1" >&2
}
log_warn()
{
echo -e "${YELLOW}WARN:${NC} $1" >&2
}
log_info()
{
if [[ "${INFO:-0}" == "1" ]]; then
echo -e "${GREEN}INFO:${NC} $1" >&2
fi
}
log_debug()
{
if [[ "${DEBUG:-0}" == "1" ]]; then
echo -e "${BLUE}DEBUG:${NC} $1" >&2
fi
}
# Filter out CodeRabbit comments containing "Addressed in commit"
filter_coderabbit_addressed_comments()
{
local input_data="$1"
local is_wrapped="$2" # true for {comments: [...]}, false for [...]
local jq_filter='select(
(.user.login | contains("coderabbit") | not) or
(.body | contains("Addressed in commit") | not)
)'
if [[ "$is_wrapped" == "true" ]]; then
echo "$input_data" | jq "{comments: [.comments[] | $jq_filter]}" 2>/dev/null || echo "$input_data"
else
echo "$input_data" | jq "[.[] | $jq_filter]" 2>/dev/null || echo "$input_data"
fi
}
# Fetch and filter API data with consistent logging
fetch_and_filter_data()
{
local endpoint="$1"
local data_name="$2"
local is_wrapped="$3" # true/false
local data
data=$(gh api "$endpoint" 2>/dev/null || echo "[]")
if [[ "$is_wrapped" == "true" ]]; then
data=$(echo "$data" | jq '{comments: .}' 2>/dev/null || echo '{"comments":[]}')
fi
data=$(filter_coderabbit_addressed_comments "$data" "$is_wrapped")
local count_field="length"
[[ "$is_wrapped" == "true" ]] && count_field=".comments | length"
local count
count=$(echo "$data" | jq -r "$count_field" 2>/dev/null || echo "0")
log_debug "$data_name count: $count"
echo "$data"
}
# Format file-specific comments grouped by review
format_grouped_review_comments()
{
local review_comments="$1"
local reviews="$2"
local repo="$3"
local count
count=$(echo "$review_comments" | jq -r 'length' 2>/dev/null || echo "0")
if [[ "$count" -eq 0 ]]; then
echo "No file-specific comments found."
return
fi
# Group comments by review ID and format them
echo "$review_comments" | jq -r --argjson reviews "$reviews" '
group_by(.pull_request_review_id) | .[] |
. as $comments |
($reviews[] | select(.id == $comments[0].pull_request_review_id)) as $review |
"### Review by \($review.user.login) (\($review.submitted_at)) [\($review.state)]
Review ID: \($review.id) - API: gh api /repos/'"$repo"'/pulls/1/reviews/\($review.id)
" + ([.[] | "
#### Comment ID: \(.id)
- **File:** \(.path)
- **Commit:** \(.commit_id)
- **Author:** \(.user.login) (\(.user.type))
- **Lines:** \(if .start_line then "\(.start_line)-\(.line // "N/A")" else "\(.line // "N/A")" end) (original: \(.original_line // "N/A"))
- **Position:** \(.position // "N/A") (original: \(.original_position // "N/A"))
- **Subject Type:** \(.subject_type // "N/A")
- **API:** gh api /repos/'"$repo"'/pulls/comments/\(.id)
**Body:**
\(.body)
"] | join("")) + "
---
"
' 2>/dev/null || {
log_debug "Error grouping review comments by review ID"
echo "Error parsing grouped review comments."
}
}
# Check if gh CLI is available
check_dependencies()
{
if ! command -v gh &> /dev/null; then
log_error "GitHub CLI (gh) is not installed. Please install it first:"
log_error " https://cli.github.com/"
exit 1
fi
if ! gh auth status &> /dev/null; then
log_error "GitHub CLI is not authenticated. Run: gh auth login"
exit 1
fi
}
# Get repository info from git remote
get_repo_info()
{
if ! git rev-parse --is-inside-work-tree &> /dev/null; then
log_error "Not inside a git repository"
return 1
fi
local remote_url
remote_url=$(git remote get-url origin 2> /dev/null || echo "")
if [[ -z "$remote_url" ]]; then
log_error "No origin remote found"
return 1
fi
# Parse GitHub URL (both HTTPS and SSH formats)
if [[ "$remote_url" =~ github\.com[:/]([^/]+)/([^/]+)(\.git)?$ ]]; then
local repo_name="${BASH_REMATCH[2]}"
# Remove .git suffix if present
repo_name="${repo_name%.git}"
echo "${BASH_REMATCH[1]}/${repo_name}"
else
log_error "Remote URL is not a GitHub repository: $remote_url"
return 1
fi
}
# Parse GitHub PR URL to extract owner/repo/pr-number
parse_github_url()
{
local url="$1"
if [[ "$url" =~ github\.com/([^/]+)/([^/]+)/pull/([0-9]+) ]]; then
echo "${BASH_REMATCH[1]}/${BASH_REMATCH[2]}" "${BASH_REMATCH[3]}"
else
log_error "Invalid GitHub PR URL format: $url"
return 1
fi
}
# Format output with LLM directions
format_output()
{
local repo="$1"
local pr_number="$2"
local pr_info="$3"
local review_comments="$4"
local reviews="$5"
# Header and instructions
cat << EOF
# GitHub PR Comments Analysis Report
## LLM Processing Instructions
You are analyzing review comments and change requests from GitHub Pull Request #$pr_number in repository $repo.
**Your tasks:**
1. **Review Analysis**: For each review, understand the reviewer's overall feedback and concerns
2. **Change Request Validation**: Check if each file-specific comment is still relevant to the current codebase
3. **Priority Assessment**: Rank change requests by importance and impact on code quality
4. **Implementation Planning**: Create actionable tasks for addressing valid change requests
5. **Pattern Recognition**: Identify recurring issues across different reviews
**Tools to use:**
- \`find\`, \`cat\`, \`rg\` commands and available tools to examine current codebase
- File system tools to verify mentioned files exist and check current state
- \`gh pr diff $pr_number\` to see what changes are being reviewed
## Pull Request Information
EOF
# PR information
echo "$pr_info" | jq -r '"**Title:** \(.title)
**State:** \(.state)
**URL:** \(.url)
**Number:** '"$pr_number"'
**Repository:** '"$repo"'
"' 2>/dev/null || {
echo "**Error:** Could not parse PR information"
return 1
}
# Review Comments Section
echo -e "\n## Review Comments and Change Requests\n"
format_grouped_review_comments "$review_comments" "$reviews" "$repo"
# Footer
cat << EOF
## Next Steps for LLM Analysis
1. **Analyze and verify all comments, including nitpick**
- Consider all comments from code reviewers as change requests
- Analyze all "Outside diff range comments" as change requests
- All Copilot and CodeRabbit comments and change requests MUST BE analyzed
- Do not trust blindly the comments, validate them against current codebase
2. **Validate change requests:**
- Check if mentioned files exist and match current state
- Verify if suggestions are still applicable
- Identify any already-addressed issues
3. **Generate actionable implementation plan:**
- Prioritized list of valid change requests
- Grouped by file/area for efficient implementation
- Clear next steps for addressing reviewer feedback
- All valid change requests MUST BE handled, even if low priority
4. **Use todo lists and memory tools to track progress*
- All valid change requests MUST BE handled
- Keep handling them until each of them are handled
5. **Identify patterns and recurring issues:**
- Highlight common themes across reviews
- Suggest broader improvements to code quality and practices
- Suggest LLM instructions to avoid similar issues in future
EOF
}
# Fetch and display PR data directly
fetch_and_display_pr_data()
{
local repo="$1"
local pr_number="$2"
log_info "Fetching PR #$pr_number from $repo..."
# Get PR basic info
local pr_info
pr_info=$(gh pr view "$pr_number" --repo "$repo" --json title,state,url 2> /dev/null) || {
log_error "Failed to fetch PR #$pr_number from $repo"
return 1
}
# Fetch review data using helper function
local review_comments reviews
review_comments=$(fetch_and_filter_data "/repos/$repo/pulls/$pr_number/comments" "Review comments" "false")
reviews=$(fetch_and_filter_data "/repos/$repo/pulls/$pr_number/reviews" "Reviews" "false")
# Display formatted output
format_output "$repo" "$pr_number" "$pr_info" "$review_comments" "$reviews"
}
# Main function
main()
{
local repo=""
local pr_number=""
# Parse arguments
case "${1:-}" in
-h | --help)
show_usage
exit 0
;;
"")
log_error "Missing argument. Provide PR number or GitHub URL."
show_usage
exit 1
;;
https://github.com/*)
local parsed
parsed=$(parse_github_url "$1") || exit 1
read -r repo pr_number <<< "$parsed"
;;
[0-9]*)
repo=$(get_repo_info) || exit 1
pr_number="$1"
;;
*)
log_error "Invalid argument: $1"
show_usage
exit 1
;;
esac
check_dependencies
log_debug "Repository: $repo"
log_debug "PR Number: $pr_number"
# Fetch and display data
fetch_and_display_pr_data "$repo" "$pr_number"
}
# Run main function with all arguments
main "$@"

View File

@@ -0,0 +1,30 @@
# x-pr-comments
---
## Usage
```bash
x-pr-comments <pr-number> # When run inside a git repository
x-pr-comments <github-pr-url> # Direct GitHub PR URL
x-pr-comments -h|--help # Show help
```
Fetches GitHub Pull Request comments and review suggestions, formats them
for LLM analysis with processing instructions and API endpoints for detailed
examination.
## Examples
```bash
x-pr-comments 1 # PR #1 in current repo
x-pr-comments https://github.com/user/repo/pull/1
```
## Requirements
- GitHub CLI (`gh`) installed and authenticated
- Internet connection for GitHub API access
- Git repository context for PR number usage
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->

View File

@@ -1,7 +1,7 @@
# This is the official list of project authors for copyright purposes.
# This file is distinct from the CONTRIBUTORS.txt file.
# See the latter for an explanation.
#
#
# Names should be added to this file as:
# Name or Organization <email address>

View File

@@ -18,7 +18,7 @@ with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The

0
scripts/install-cheat-purebashbible.sh Normal file → Executable file
View File

View File

@@ -1,3 +1,2 @@
Host github.com
User git

View File

@@ -2,4 +2,3 @@ Host lakka
User viir
HostName lakka.kapsi.fi
IdentityFile ~/.ssh/id_rsa

View File

@@ -5,9 +5,9 @@ set -euo pipefail
if [ -x "node_modules/bats/bin/bats" ]; then
git ls-files '*.bats' -z | xargs -0 node_modules/bats/bin/bats
elif command -v npx >/dev/null; then
elif command -v npx > /dev/null; then
git ls-files '*.bats' -z | xargs -0 npx --yes bats
elif command -v bats >/dev/null; then
elif command -v bats > /dev/null; then
git ls-files '*.bats' -z | xargs -0 bats
else
echo "bats not installed. Run 'yarn install' first." >&2

Some files were not shown because too many files have changed in this diff Show More