From 7b6e95c4ab2ca3d9244d09838b28926b496b5fb1 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Mon, 13 Oct 2025 14:14:45 +0300 Subject: [PATCH] chore: linting --- .editorconfig | 12 +- .gitignore | 4 + .gitmodules | 2 +- .prettierignore | 1 + .serena/.gitignore | 1 + .serena/memories/areas_for_improvement.md | 67 +++ .serena/memories/code_style_conventions.md | 50 ++ .serena/memories/critical_linting_errors.md | 80 +++ .serena/memories/darwin_system_utilities.md | 66 +++ .serena/memories/immediate_action_items.md | 114 ++++ .serena/memories/project_overview.md | 61 ++ .serena/memories/project_structure.md | 116 ++++ .serena/memories/shellcheck_issues.md | 62 ++ .serena/memories/suggested_commands.md | 121 ++++ .serena/memories/task_completion_checklist.md | 115 ++++ .serena/project.yml | 90 +++ .yamlignore | 1 - add-submodules.sh | 2 +- base/plan | 2 - base/shellcheckrc | 1 - config/cheat/cheatsheets/personal/printf | 2 - config/dircolors | 10 +- config/direnv/direnv.toml | 1 - config/direnv/lib/use_asdf.sh | 3 +- config/fish/alias.fish | 18 +- config/fish/completions/aqua.fish | 1 - config/fish/completions/git-profile.fish | 1 - config/fish/completions/phpenv.fish | 1 - config/fish/conf.d/phpenv.fish | 1 - config/fish/exports.fish | 44 +- .../functions/_puffer_fish_expand_bang.fish | 1 - config/fish/functions/nvm.fish | 1 - config/fish/functions/paths.fish | 4 +- config/fish/functions/phpenv.fish | 1 - config/fzf/completion.bash | 560 +++++++++--------- config/fzf/everforest.sh | 7 + config/fzf/fzf.bash | 2 +- config/fzf/key-bindings.bash | 131 ++-- config/git/config | 2 + config/git/shared | 1 - config/goenv/goenvrc.fish | 1 - config/gpg-tui/gpg-tui.toml | 1 - config/homebrew/brew.env | 1 - base/huskyrc => config/husky/init.sh | 0 config/ideavim/ideavimrc | 2 +- config/irssi/scripts/autorun/highlite.pl | 1 - config/misc/screenrc | 1 - config/nbrc | 0 config/nvim/.editorconfig | 1 - config/nvim/.gitignore | 1 - config/nvim/.stylua.toml | 1 - config/nvim/lua/options.lua | 2 +- config/nvim/lua/plugins/blink.lua | 9 +- config/nvim/lua/plugins/code.lua | 21 + config/nvim/lua/plugins/folke.lua | 3 +- config/nvim/lua/plugins/neotree.lua | 4 +- config/nvim/lua/plugins/ui.lua | 86 ++- config/nvim/snippets/sh.json | 4 +- config/op/plugins/gh.json | 4 +- config/skhd/skhdrc | 1 - config/starship.toml | 1 - config/terraform/terraformrc | 1 - config/tmux/plugins/tmux-dark-notify | 2 +- config/tmux/plugins/tmux-window-name | 2 +- config/tmux/theme-dark.conf | 121 ++-- config/tmux/theme-light.conf | 99 +--- config/tmux/tmux.conf | 6 +- config/user-dirs.dirs | 2 +- config/user-dirs.locale | 2 +- .../colors/everforest-dark-medium.toml | 32 +- .../colors/everforest-light-medium.toml | 32 +- config/wezterm/wezterm.lua | 19 +- config/yamllint/config | 1 - .../nvm-auto-use/nvm-auto-use.plugin.zsh | 1 - install | 6 +- local/bin/git-update-dirs | 6 +- local/bin/x-gh-get-latest-version.md | 6 +- local/bin/x-multi-ping.pl | 9 +- local/share/fonts/JetBrainsMono-AUTHORS.txt | 2 +- local/share/fonts/JetBrainsMono-OFL.txt | 2 +- scripts/install-cheat-purebashbible.sh | 0 ssh/shared.d/github | 1 - ssh/shared.d/lakka | 1 - test-all.sh | 4 +- tests/dfm.bats | 0 tests/x-gh-get-latest-version.bats | 0 tests/x-localip.bats | 0 tests/x-mkd.bats | 0 tests/x-path.bats | 0 89 files changed, 1556 insertions(+), 706 deletions(-) create mode 100644 .serena/.gitignore create mode 100644 .serena/memories/areas_for_improvement.md create mode 100644 .serena/memories/code_style_conventions.md create mode 100644 .serena/memories/critical_linting_errors.md create mode 100644 .serena/memories/darwin_system_utilities.md create mode 100644 .serena/memories/immediate_action_items.md create mode 100644 .serena/memories/project_overview.md create mode 100644 .serena/memories/project_structure.md create mode 100644 .serena/memories/shellcheck_issues.md create mode 100644 .serena/memories/suggested_commands.md create mode 100644 .serena/memories/task_completion_checklist.md create mode 100644 .serena/project.yml create mode 100644 config/fzf/everforest.sh rename base/huskyrc => config/husky/init.sh (100%) mode change 100644 => 100755 mode change 100644 => 100755 config/nbrc mode change 100644 => 100755 scripts/install-cheat-purebashbible.sh mode change 100644 => 100755 tests/dfm.bats mode change 100644 => 100755 tests/x-gh-get-latest-version.bats mode change 100644 => 100755 tests/x-localip.bats mode change 100644 => 100755 tests/x-mkd.bats mode change 100644 => 100755 tests/x-path.bats diff --git a/.editorconfig b/.editorconfig index fb3b97d..14e6228 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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 diff --git a/.gitignore b/.gitignore index e8baff2..25a4781 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ .env .idea .nfs* +.scannerwork .vscode Brewfile.lock.json antidote_plugins.zsh @@ -51,3 +52,6 @@ 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.* diff --git a/.gitmodules b/.gitmodules index e83ad4c..51a655e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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"] diff --git a/.prettierignore b/.prettierignore index 3f8fea3..570308b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,7 @@ # vim: ft=gitignore .mypy_cache/* Brewfile.lock.json +base/plan config/cheat/cheatsheets/community config/cheat/cheatsheets/tldr config/fzf/* diff --git a/.serena/.gitignore b/.serena/.gitignore new file mode 100644 index 0000000..14d86ad --- /dev/null +++ b/.serena/.gitignore @@ -0,0 +1 @@ +/cache diff --git a/.serena/memories/areas_for_improvement.md b/.serena/memories/areas_for_improvement.md new file mode 100644 index 0000000..7567018 --- /dev/null +++ b/.serena/memories/areas_for_improvement.md @@ -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 diff --git a/.serena/memories/code_style_conventions.md b/.serena/memories/code_style_conventions.md new file mode 100644 index 0000000..6922fef --- /dev/null +++ b/.serena/memories/code_style_conventions.md @@ -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 diff --git a/.serena/memories/critical_linting_errors.md b/.serena/memories/critical_linting_errors.md new file mode 100644 index 0000000..d15c9b3 --- /dev/null +++ b/.serena/memories/critical_linting_errors.md @@ -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" diff --git a/.serena/memories/darwin_system_utilities.md b/.serena/memories/darwin_system_utilities.md new file mode 100644 index 0000000..3ad60d3 --- /dev/null +++ b/.serena/memories/darwin_system_utilities.md @@ -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 diff --git a/.serena/memories/immediate_action_items.md b/.serena/memories/immediate_action_items.md new file mode 100644 index 0000000..ce93556 --- /dev/null +++ b/.serena/memories/immediate_action_items.md @@ -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 diff --git a/.serena/memories/project_overview.md b/.serena/memories/project_overview.md new file mode 100644 index 0000000..caf343d --- /dev/null +++ b/.serena/memories/project_overview.md @@ -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 diff --git a/.serena/memories/project_structure.md b/.serena/memories/project_structure.md new file mode 100644 index 0000000..494e09f --- /dev/null +++ b/.serena/memories/project_structure.md @@ -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 diff --git a/.serena/memories/shellcheck_issues.md b/.serena/memories/shellcheck_issues.md new file mode 100644 index 0000000..b778e4c --- /dev/null +++ b/.serena/memories/shellcheck_issues.md @@ -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 diff --git a/.serena/memories/suggested_commands.md b/.serena/memories/suggested_commands.md new file mode 100644 index 0000000..2d0b3d1 --- /dev/null +++ b/.serena/memories/suggested_commands.md @@ -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 # 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 diff --git a/.serena/memories/task_completion_checklist.md b/.serena/memories/task_completion_checklist.md new file mode 100644 index 0000000..b02be4a --- /dev/null +++ b/.serena/memories/task_completion_checklist.md @@ -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` diff --git a/.serena/project.yml b/.serena/project.yml new file mode 100644 index 0000000..a0ff204 --- /dev/null +++ b/.serena/project.yml @@ -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' diff --git a/.yamlignore b/.yamlignore index 5f24151..a462727 100644 --- a/.yamlignore +++ b/.yamlignore @@ -14,4 +14,3 @@ local/bin/antigen.zsh local/bin/asdf tools/antidote/* tools/dotbot* - diff --git a/add-submodules.sh b/add-submodules.sh index 0f3cfe7..21b2426 100755 --- a/add-submodules.sh +++ b/add-submodules.sh @@ -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 diff --git a/base/plan b/base/plan index 5edea0d..dc57a4b 100644 --- a/base/plan +++ b/base/plan @@ -12,5 +12,3 @@ ~-.__| /_ - ~ ^| /- _ `..-' f: f: | / | / ~-. `-. _||_||_ |_____| |_____| ~ - . _ _ _ _ _> - - diff --git a/base/shellcheckrc b/base/shellcheckrc index 7898c5b..9c5ad27 100644 --- a/base/shellcheckrc +++ b/base/shellcheckrc @@ -4,4 +4,3 @@ # paths in source statements (since 0.8.0). external-sources=true includeAllWorkspaceSymbols=true - diff --git a/config/cheat/cheatsheets/personal/printf b/config/cheat/cheatsheets/personal/printf index 9f90d8e..99f0b51 100644 --- a/config/cheat/cheatsheets/personal/printf +++ b/config/cheat/cheatsheets/personal/printf @@ -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. - - diff --git a/config/dircolors b/config/dircolors index a0d6184..de50515 100644 --- a/config/dircolors +++ b/config/dircolors @@ -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 ... diff --git a/config/direnv/direnv.toml b/config/direnv/direnv.toml index f62e683..b802841 100644 --- a/config/direnv/direnv.toml +++ b/config/direnv/direnv.toml @@ -10,4 +10,3 @@ prefix = [ exact = [ "~/.dotfiles/.envrc" ] - diff --git a/config/direnv/lib/use_asdf.sh b/config/direnv/lib/use_asdf.sh index dfba325..373bc03 100644 --- a/config/direnv/lib/use_asdf.sh +++ b/config/direnv/lib/use_asdf.sh @@ -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 "$@")" } diff --git a/config/fish/alias.fish b/config/fish/alias.fish index 46c76ee..8f99e51 100644 --- a/config/fish/alias.fish +++ b/config/fish/alias.fish @@ -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 \ diff --git a/config/fish/completions/aqua.fish b/config/fish/completions/aqua.fish index cef863c..e6eb9a8 100644 --- a/config/fish/completions/aqua.fish +++ b/config/fish/completions/aqua.fish @@ -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' - diff --git a/config/fish/completions/git-profile.fish b/config/fish/completions/git-profile.fish index 777fda4..4e9c8f1 100644 --- a/config/fish/completions/git-profile.fish +++ b/config/fish/completions/git-profile.fish @@ -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' - diff --git a/config/fish/completions/phpenv.fish b/config/fish/completions/phpenv.fish index 8b627e8..1323660 100644 --- a/config/fish/completions/phpenv.fish +++ b/config/fish/completions/phpenv.fish @@ -120,4 +120,3 @@ complete -c phpenv -f \ # Complete help options complete -c phpenv -f -s h -l help -d "Show help" - diff --git a/config/fish/conf.d/phpenv.fish b/config/fish/conf.d/phpenv.fish index 1b93ca9..0ca1859 100644 --- a/config/fish/conf.d/phpenv.fish +++ b/config/fish/conf.d/phpenv.fish @@ -35,4 +35,3 @@ if test -n "$PHPENV_GLOBAL_VERSION"; and not set -q PHPENV_INITIALIZED end set -g PHPENV_INITIALIZED true end - diff --git a/config/fish/exports.fish b/config/fish/exports.fish index b428a04..80bed8c 100644 --- a/config/fish/exports.fish +++ b/config/fish/exports.fish @@ -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 diff --git a/config/fish/functions/_puffer_fish_expand_bang.fish b/config/fish/functions/_puffer_fish_expand_bang.fish index 401d85e..6fb9dfb 100644 --- a/config/fish/functions/_puffer_fish_expand_bang.fish +++ b/config/fish/functions/_puffer_fish_expand_bang.fish @@ -6,4 +6,3 @@ function _puffer_fish_expand_bang commandline -i '!' end end - diff --git a/config/fish/functions/nvm.fish b/config/fish/functions/nvm.fish index 575d0e3..97d790e 100644 --- a/config/fish/functions/nvm.fish +++ b/config/fish/functions/nvm.fish @@ -1,4 +1,3 @@ function nvm bass source $NVM_DIR/nvm.sh --no-use ';' nvm $argv end - diff --git a/config/fish/functions/paths.fish b/config/fish/functions/paths.fish index 09eccfd..9f06b03 100644 --- a/config/fish/functions/paths.fish +++ b/config/fish/functions/paths.fish @@ -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' diff --git a/config/fish/functions/phpenv.fish b/config/fish/functions/phpenv.fish index 40a5d2f..dd31acb 100644 --- a/config/fish/functions/phpenv.fish +++ b/config/fish/functions/phpenv.fish @@ -1075,4 +1075,3 @@ function __phpenv_validate_extensions -a phpenv_extensions_string return 1 end end - diff --git a/config/fzf/completion.bash b/config/fzf/completion.bash index 9474ea0..7404f6f 100755 --- a/config/fzf/completion.bash +++ b/config/fzf/completion.bash @@ -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 diff --git a/config/fzf/everforest.sh b/config/fzf/everforest.sh new file mode 100644 index 0000000..cffb6c5 --- /dev/null +++ b/config/fzf/everforest.sh @@ -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" diff --git a/config/fzf/fzf.bash b/config/fzf/fzf.bash index 62ace84..da4c5f2 100755 --- a/config/fzf/fzf.bash +++ b/config/fzf/fzf.bash @@ -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 # ------------ diff --git a/config/fzf/key-bindings.bash b/config/fzf/key-bindings.bash index 03089d4..c388d0d 100755 --- a/config/fzf/key-bindings.bash +++ b/config/fzf/key-bindings.bash @@ -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 diff --git a/config/git/config b/config/git/config index 708f5d4..5b6aa4e 100644 --- a/config/git/config +++ b/config/git/config @@ -63,3 +63,5 @@ old = red bold new = green bold whitespace = red reverse +[coderabbit] + machineId = cli/2d3277ec1da346c4b30b26d0fb373d8c diff --git a/config/git/shared b/config/git/shared index baf5ccd..55cacf8 100644 --- a/config/git/shared +++ b/config/git/shared @@ -51,4 +51,3 @@ # dotfiles special config [includeIf "hasconfig:remote.*.url:https://github.com/ivuorinen/dotfiles.git"] path = ~/.dotfiles/config/git/special/dotfiles ; - diff --git a/config/goenv/goenvrc.fish b/config/goenv/goenvrc.fish index 99e035f..e311302 100644 --- a/config/goenv/goenvrc.fish +++ b/config/goenv/goenvrc.fish @@ -1,4 +1,3 @@ set -gx GOENV_PATH_ORDER front set -gx GOENV_PREPEND_GOPATH true set -gx GOENV_AUTO_INSTALL true - diff --git a/config/gpg-tui/gpg-tui.toml b/config/gpg-tui/gpg-tui.toml index 4640cdd..042116e 100644 --- a/config/gpg-tui/gpg-tui.toml +++ b/config/gpg-tui/gpg-tui.toml @@ -29,4 +29,3 @@ # outdir = "~/.gnupg/out" # outfile = "{type}_{query}.{ext}" # default_key = "0xA1B2C3XY" - diff --git a/config/homebrew/brew.env b/config/homebrew/brew.env index 32ca9e1..3c58a55 100644 --- a/config/homebrew/brew.env +++ b/config/homebrew/brew.env @@ -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 - diff --git a/base/huskyrc b/config/husky/init.sh old mode 100644 new mode 100755 similarity index 100% rename from base/huskyrc rename to config/husky/init.sh diff --git a/config/ideavim/ideavimrc b/config/ideavim/ideavimrc index 266e583..1c729c5 100644 --- a/config/ideavim/ideavimrc +++ b/config/ideavim/ideavimrc @@ -226,4 +226,4 @@ if has('gui_running') set guifont=JetBrainsMono:h14 endif -" vim: set filetype=vim : \ No newline at end of file +" vim: set filetype=vim : diff --git a/config/irssi/scripts/autorun/highlite.pl b/config/irssi/scripts/autorun/highlite.pl index 515d0dd..d74b2f6 100644 --- a/config/irssi/scripts/autorun/highlite.pl +++ b/config/irssi/scripts/autorun/highlite.pl @@ -110,4 +110,3 @@ Irssi::signal_add( 'message kick' => \&msg_kick } ); - diff --git a/config/misc/screenrc b/config/misc/screenrc index b483947..12ec529 100644 --- a/config/misc/screenrc +++ b/config/misc/screenrc @@ -13,4 +13,3 @@ termcapinfo xterm* ti@:te@ # Some settings for screen + vim term xterm-256color maptimeout 10 - diff --git a/config/nbrc b/config/nbrc old mode 100644 new mode 100755 diff --git a/config/nvim/.editorconfig b/config/nvim/.editorconfig index be76539..cd2a4df 100644 --- a/config/nvim/.editorconfig +++ b/config/nvim/.editorconfig @@ -21,4 +21,3 @@ max_line_length = off [*.lua] max_line_length = 90 - diff --git a/config/nvim/.gitignore b/config/nvim/.gitignore index 0dd91a7..28c21f4 100644 --- a/config/nvim/.gitignore +++ b/config/nvim/.gitignore @@ -1,3 +1,2 @@ spell/* !spell/.gitkeep - diff --git a/config/nvim/.stylua.toml b/config/nvim/.stylua.toml index db00bc5..8842763 100644 --- a/config/nvim/.stylua.toml +++ b/config/nvim/.stylua.toml @@ -8,4 +8,3 @@ collapse_simple_statement = "Always" [sort_requires] enabled = true - diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua index e0c937a..4a74a71 100644 --- a/config/nvim/lua/options.lua +++ b/config/nvim/lua/options.lua @@ -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 diff --git a/config/nvim/lua/plugins/blink.lua b/config/nvim/lua/plugins/blink.lua index 4f4342e..6f81d46 100644 --- a/config/nvim/lua/plugins/blink.lua +++ b/config/nvim/lua/plugins/blink.lua @@ -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', diff --git a/config/nvim/lua/plugins/code.lua b/config/nvim/lua/plugins/code.lua index 6cc9aa7..bac5eb8 100644 --- a/config/nvim/lua/plugins/code.lua +++ b/config/nvim/lua/plugins/code.lua @@ -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 { diff --git a/config/nvim/lua/plugins/folke.lua b/config/nvim/lua/plugins/folke.lua index 4202198..e845103 100644 --- a/config/nvim/lua/plugins/folke.lua +++ b/config/nvim/lua/plugins/folke.lua @@ -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, diff --git a/config/nvim/lua/plugins/neotree.lua b/config/nvim/lua/plugins/neotree.lua index 064ff81..bfb029b 100644 --- a/config/nvim/lua/plugins/neotree.lua +++ b/config/nvim/lua/plugins/neotree.lua @@ -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 = { diff --git a/config/nvim/lua/plugins/ui.lua b/config/nvim/lua/plugins/ui.lua index ea693db..45d943f 100644 --- a/config/nvim/lua/plugins/ui.lua +++ b/config/nvim/lua/plugins/ui.lua @@ -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 diff --git a/config/nvim/snippets/sh.json b/config/nvim/snippets/sh.json index 967a750..8f84af3 100644 --- a/config/nvim/snippets/sh.json +++ b/config/nvim/snippets/sh.json @@ -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}\"", diff --git a/config/op/plugins/gh.json b/config/op/plugins/gh.json index c8d5f4f..f148f53 100644 --- a/config/op/plugins/gh.json +++ b/config/op/plugins/gh.json @@ -1,6 +1,8 @@ { "account_id": "S5Z2DMNFKJEZBPCWRHRWC4DCGI", - "entrypoint": ["gh"], + "entrypoint": [ + "gh" + ], "credentials": [ { "plugin": "github", diff --git a/config/skhd/skhdrc b/config/skhd/skhdrc index 22bc1b8..d75daba 100644 --- a/config/skhd/skhdrc +++ b/config/skhd/skhdrc @@ -102,4 +102,3 @@ ctrl + alt - k : \ ctrl + alt - l : \ yabai -m window --resize right:50:0; \ yabai -m window --resize left:50:0 - diff --git a/config/starship.toml b/config/starship.toml index efe5f0a..ee25319 100644 --- a/config/starship.toml +++ b/config/starship.toml @@ -152,4 +152,3 @@ format = "[$virtualenv]($style) " [username] format = "[$user]($style) " - diff --git a/config/terraform/terraformrc b/config/terraform/terraformrc index c0bda35..1a4a23a 100644 --- a/config/terraform/terraformrc +++ b/config/terraform/terraformrc @@ -1,2 +1 @@ plugin_cache_dir = "$HOME/.cache/terraform/plugin-cache" - diff --git a/config/tmux/plugins/tmux-dark-notify b/config/tmux/plugins/tmux-dark-notify index dfa2b45..633f181 160000 --- a/config/tmux/plugins/tmux-dark-notify +++ b/config/tmux/plugins/tmux-dark-notify @@ -1 +1 @@ -Subproject commit dfa2b45b3edab2fbd6961bdb40b2a7c50fc17060 +Subproject commit 633f181373977ed42c73ec767f5f03e7fefe6b91 diff --git a/config/tmux/plugins/tmux-window-name b/config/tmux/plugins/tmux-window-name index 0772aa2..9a75967 160000 --- a/config/tmux/plugins/tmux-window-name +++ b/config/tmux/plugins/tmux-window-name @@ -1 +1 @@ -Subproject commit 0772aa2033714058a840e3bb8e3ac161bfc042b4 +Subproject commit 9a75967ced4f3925de0714e96395223aa7e2b4ad diff --git a/config/tmux/theme-dark.conf b/config/tmux/theme-dark.conf index 61c6211..ad4d9d8 100644 --- a/config/tmux/theme-dark.conf +++ b/config/tmux/theme-dark.conf @@ -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" diff --git a/config/tmux/theme-light.conf b/config/tmux/theme-light.conf index 66f67f2..ac46659 100644 --- a/config/tmux/theme-light.conf +++ b/config/tmux/theme-light.conf @@ -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 diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index acb54ab..58adf7e 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -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 '' @@ -190,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" diff --git a/config/user-dirs.dirs b/config/user-dirs.dirs index 0d9358c..74fba8c 100644 --- a/config/user-dirs.dirs +++ b/config/user-dirs.dirs @@ -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/" diff --git a/config/user-dirs.locale b/config/user-dirs.locale index 3e0b419..7741b83 100644 --- a/config/user-dirs.locale +++ b/config/user-dirs.locale @@ -1 +1 @@ -en_US \ No newline at end of file +en_US diff --git a/config/wezterm/colors/everforest-dark-medium.toml b/config/wezterm/colors/everforest-dark-medium.toml index 89be5c8..7d7b747 100644 --- a/config/wezterm/colors/everforest-dark-medium.toml +++ b/config/wezterm/colors/everforest-dark-medium.toml @@ -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' diff --git a/config/wezterm/colors/everforest-light-medium.toml b/config/wezterm/colors/everforest-light-medium.toml index b5cd43f..c59076b 100644 --- a/config/wezterm/colors/everforest-light-medium.toml +++ b/config/wezterm/colors/everforest-light-medium.toml @@ -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' diff --git a/config/wezterm/wezterm.lua b/config/wezterm/wezterm.lua index 8e54e3b..db3b314 100644 --- a/config/wezterm/wezterm.lua +++ b/config/wezterm/wezterm.lua @@ -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{[}]()"\'`,;:' diff --git a/config/yamllint/config b/config/yamllint/config index ea44510..ebb8fad 100644 --- a/config/yamllint/config +++ b/config/yamllint/config @@ -29,4 +29,3 @@ rules: allow-non-breakable-inline-mappings: true max: 120 truthy: disable - diff --git a/config/zsh/plugins/nvm-auto-use/nvm-auto-use.plugin.zsh b/config/zsh/plugins/nvm-auto-use/nvm-auto-use.plugin.zsh index 72ffc48..8610962 100644 --- a/config/zsh/plugins/nvm-auto-use/nvm-auto-use.plugin.zsh +++ b/config/zsh/plugins/nvm-auto-use/nvm-auto-use.plugin.zsh @@ -24,4 +24,3 @@ load-nvmrc() { add-zsh-hook chpwd load-nvmrc load-nvmrc - diff --git a/install b/install index 094183c..a8439ef 100755 --- a/install +++ b/install @@ -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 \ diff --git a/local/bin/git-update-dirs b/local/bin/git-update-dirs index f0cba69..36bd49c 100755 --- a/local/bin/git-update-dirs +++ b/local/bin/git-update-dirs @@ -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 } diff --git a/local/bin/x-gh-get-latest-version.md b/local/bin/x-gh-get-latest-version.md index 748ff35..8e23a66 100644 --- a/local/bin/x-gh-get-latest-version.md +++ b/local/bin/x-gh-get-latest-version.md @@ -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 diff --git a/local/bin/x-multi-ping.pl b/local/bin/x-multi-ping.pl index c0134a3..5f65493 100755 --- a/local/bin/x-multi-ping.pl +++ b/local/bin/x-multi-ping.pl @@ -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); } - diff --git a/local/share/fonts/JetBrainsMono-AUTHORS.txt b/local/share/fonts/JetBrainsMono-AUTHORS.txt index 8814941..7055ae3 100644 --- a/local/share/fonts/JetBrainsMono-AUTHORS.txt +++ b/local/share/fonts/JetBrainsMono-AUTHORS.txt @@ -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 diff --git a/local/share/fonts/JetBrainsMono-OFL.txt b/local/share/fonts/JetBrainsMono-OFL.txt index 8bee414..23a3dca 100644 --- a/local/share/fonts/JetBrainsMono-OFL.txt +++ b/local/share/fonts/JetBrainsMono-OFL.txt @@ -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 diff --git a/scripts/install-cheat-purebashbible.sh b/scripts/install-cheat-purebashbible.sh old mode 100644 new mode 100755 diff --git a/ssh/shared.d/github b/ssh/shared.d/github index 5796471..b8297c5 100644 --- a/ssh/shared.d/github +++ b/ssh/shared.d/github @@ -1,3 +1,2 @@ Host github.com User git - diff --git a/ssh/shared.d/lakka b/ssh/shared.d/lakka index 72b35ac..a707805 100644 --- a/ssh/shared.d/lakka +++ b/ssh/shared.d/lakka @@ -2,4 +2,3 @@ Host lakka User viir HostName lakka.kapsi.fi IdentityFile ~/.ssh/id_rsa - diff --git a/test-all.sh b/test-all.sh index 7a8ee03..3ff0d54 100755 --- a/test-all.sh +++ b/test-all.sh @@ -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 diff --git a/tests/dfm.bats b/tests/dfm.bats old mode 100644 new mode 100755 diff --git a/tests/x-gh-get-latest-version.bats b/tests/x-gh-get-latest-version.bats old mode 100644 new mode 100755 diff --git a/tests/x-localip.bats b/tests/x-localip.bats old mode 100644 new mode 100755 diff --git a/tests/x-mkd.bats b/tests/x-mkd.bats old mode 100644 new mode 100755 diff --git a/tests/x-path.bats b/tests/x-path.bats old mode 100644 new mode 100755