diff --git a/.editorconfig b/.editorconfig index 007025f..fb3b97d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ trim_trailing_whitespace = true max_line_length = 80 [*.md] -max_line_length = 100 +max_line_length = 120 [*.lua] max_line_length = 90 @@ -38,6 +38,9 @@ space_redirects = true keep_padding = false function_next_line = true # --func-next-line +[config/git/config] +indent_style = tab + # Ignore the entire "third_party" directory when calling shfmt on directories, # such as "shfmt -l -w .". When formatting files directly, # like "shfmt -w third_party/foo.sh" or "shfmt --filename=third_party/foo.sh", diff --git a/.editorconfig-checker.json b/.editorconfig-checker.json index 05ed3e2..4951dce 100644 --- a/.editorconfig-checker.json +++ b/.editorconfig-checker.json @@ -1,11 +1,21 @@ { - "Version": "v3.3.0", "Verbose": false, "Debug": false, "IgnoreDefaults": false, "SpacesAfterTabs": false, "NoColor": false, - "Exclude": [], + "Exclude": [ + "base/plan", + "config/fish/completions/.*", + "config/fish/conf.d/.*", + "config/fish/functions/.*", + "config/fzf/key-bindings.fish", + "config/irssi/scripts/autorun/.*", + "config/vim/autoload/.*", + "docs/.*", + "local/man/.*", + "local/share/.*" + ], "AllowedContentTypes": [], "PassedFiles": [], "Disable": { diff --git a/.envrc b/.envrc deleted file mode 100644 index a63eb96..0000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -use asdf diff --git a/.github/AGENTS.md b/.github/AGENTS.md deleted file mode 100644 index 6a7ad2f..0000000 --- a/.github/AGENTS.md +++ /dev/null @@ -1,30 +0,0 @@ -# Guidelines for AI contributors - -These instructions help language models work with this repository. - -## Setup - -1. Run `yarn install` to get linting tools and the Bats test framework. - -## Formatting - -- Format code and docs with Prettier and markdownlint: - -```bash -yarn fix:prettier -yarn fix:markdown -``` - -- Shell scripts should pass `shellcheck`. - -## Testing - -- When code changes, run `yarn test` to execute Bats tests. -- If only comments or documentation change, tests may be skipped. - -## Commits and PRs - -- Use Semantic Commit messages: `type(scope): summary`. -- Keep PR titles in the same format. - - diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 357aa21..3a5a9d4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,4 @@ +--- version: 2 updates: # Maintain dependencies for GitHub Actions diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 988c672..e8bf605 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -2,6 +2,7 @@ # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: Lint Code Base +# yamllint disable-line on: pull_request: branches: [master, main] @@ -18,9 +19,11 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 permissions: - statuses: write contents: read + issues: write packages: read + pull-requests: write + statuses: write steps: - name: Checkout @@ -32,5 +35,4 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Run PR Lint - # https://github.com/ivuorinen/actions uses: ivuorinen/actions/pr-lint@fa0232d3c4ba16d087b606296435354a69c01756 # 25.8.11 diff --git a/.github/workflows/semantic-pr.yml b/.github/workflows/semantic-pr.yml index 05386c6..79de177 100644 --- a/.github/workflows/semantic-pr.yml +++ b/.github/workflows/semantic-pr.yml @@ -2,8 +2,9 @@ # $schema: "https://json.schemastore.org/github-workflow.json" name: Semantic PR +# yamllint disable-line on: - pull_request_target: + pull_request: types: - opened - edited diff --git a/.markdownlintignore b/.markdownlintignore index b41c7c1..980961a 100644 --- a/.markdownlintignore +++ b/.markdownlintignore @@ -6,4 +6,4 @@ config/tmux/plugins/* local/bin/asdf/* tools/* node_modules/* - +.git/* diff --git a/.mega-linter.yml b/.mega-linter.yml index 49bd6ce..86e2ab1 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -2,7 +2,6 @@ # Configuration file for MegaLinter # See all available variables at # https://megalinter.io/configuration/ and in linters documentation - APPLY_FIXES: all SHOW_ELAPSED_TIME: false # Show elapsed time at the end of MegaLinter run PARALLEL: true @@ -15,15 +14,13 @@ PRINT_ALPACA: false # Print Alpaca logo in console SARIF_REPORTER: true # Generate SARIF report SHOW_SKIPPED_LINTERS: false # Show skipped linters in MegaLinter log TYPESCRIPT_DEFAULT_STYLE: prettier # Default style for TypeScript - DISABLE_LINTERS: - REPOSITORY_DEVSKIM - + - JAVASCRIPT_ES YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.json JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.json TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.json - +REPOSITORY_GIT_DIFF_DISABLE_ERRORS: true FILTER_REGEX_EXCLUDE: > (node_modules|tools|config/cheat/cheatsheets/community|config/cheat/cheatsheets/tldr|config/fzf|config/zsh|config/tmux/plugins) - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b990e2..05e77c6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +--- repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 diff --git a/.prettierrc.js b/.prettierrc.js index c9aa2b4..cce301e 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -8,6 +8,7 @@ module.exports = { options: { printWidth: 120, proseWrap: 'preserve', + tabWidth: 2, }, }, ], diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000..58648f3 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,21 @@ +--- +extends: default + +ignore: | + node_modules + tools + config/tmux/plugins + +rules: + empty-lines: + level: warning + max: 1 + line-length: + max: 200 + level: warning + truthy: + check-keys: false + comments: + min-spaces-from-content: 1 + trailing-spaces: + level: warning diff --git a/AGENTS.md b/AGENTS.md index f92609c..390dc61 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,12 +1,19 @@ # Project guidelines -This repository contains configuration files and helper scripts for managing a development environment. Dotbot drives the installation and host specific folders under `hosts/` include extra configs. +This repository contains configuration files and helper scripts for managing +a development environment. +Dotbot drives installation, and host-specific folders under `hosts/` contain extra configs. + +## Setup + +1. Run `yarn install` to fetch linting tools and the Bats test framework. +2. Re-run `yarn install` whenever `package.json` changes. +3. Yarn is the package manager of choice; avoid `npm` commands. ## Keeping the repository up to date 1. Update submodules with `git submodule update --remote --merge`. 2. Pull the latest changes and run `./install`. -3. Run `yarn install` whenever `package.json` changes. ## Linting and tests @@ -17,13 +24,20 @@ This repository contains configuration files and helper scripts for managing a d yarn fix:markdown ``` -- Shell scripts must pass `shellcheck`. Run: +- Shell scripts must pass `shellcheck`. ```bash find . -path ./node_modules -prune -o -name '*.sh' -print0 | xargs -0 shellcheck ``` -- Execute tests with `yarn test`. +- Ensure `.editorconfig` rules pass: + + ```bash + tools/install-ec.sh + ec + ``` + +- Execute tests with `yarn test` when code changes. ## Debugging lint issues @@ -32,3 +46,10 @@ This repository contains configuration files and helper scripts for managing a d - Consult `.shellcheckrc` for project specific checks. Scripts rely on helpers in `config/shared.sh` so they run under Bash, Zsh and Fish by default. + +## Commits and PRs + +- Use Semantic Commit messages: `type(scope): summary`. +- Keep PR titles in the same format. + + diff --git a/config/amethyst/amethyst.yml b/config/amethyst/amethyst.yml index 89ba8d7..bc65a86 100644 --- a/config/amethyst/amethyst.yml +++ b/config/amethyst/amethyst.yml @@ -180,7 +180,7 @@ swap-main: # Move focus to the n-th screen in the list; e.g., # focus-screen-3 will move mouse focus to the 3rd screen. # Note that the main window in the given screen will be focused. -#focus-screen-n: +# focus-screen-n: # focus-screen-: # mod: mod1 # key: y @@ -197,12 +197,12 @@ swap-main: # key: i # Select tall layout -#select-tall-layout: -# mod: mod1 -# key: a +# select-tall-layout: +# mod: mod1 +# key: a # Select wide layout -#select-wide-layout: +# select-wide-layout: # mod: mod1 # key: s diff --git a/config/gh-dash/config.yml b/config/gh-dash/config.yml index 9bceca9..c593cbb 100644 --- a/config/gh-dash/config.yml +++ b/config/gh-dash/config.yml @@ -1,3 +1,4 @@ +--- prSections: - title: My Pull Requests filters: is:open author:@me diff --git a/config/glow/glow.yml b/config/glow/glow.yml index 5d4eb90..fff2912 100644 --- a/config/glow/glow.yml +++ b/config/glow/glow.yml @@ -1,3 +1,4 @@ +--- # mouse support (TUI-mode only) mouse: false # use pager to display markdown diff --git a/config/iterm2/catppuccin-mocha.itermcolors b/config/iterm2/catppuccin-mocha.itermcolors deleted file mode 100644 index 60a0261..0000000 --- a/config/iterm2/catppuccin-mocha.itermcolors +++ /dev/null @@ -1,331 +0,0 @@ - - - - - Ansi 0 Color - - Color Space - sRGB - Red Component - 0.27058823529411763 - Green Component - 0.2784313725490196 - Blue Component - 0.35294117647058826 - Alpha Component - 1 - - Ansi 1 Color - - Color Space - sRGB - Red Component - 0.9529411764705882 - Green Component - 0.5450980392156862 - Blue Component - 0.6588235294117647 - Alpha Component - 1 - - Ansi 2 Color - - Color Space - sRGB - Red Component - 0.6509803921568628 - Green Component - 0.8901960784313725 - Blue Component - 0.6313725490196078 - Alpha Component - 1 - - Ansi 3 Color - - Color Space - sRGB - Red Component - 0.9764705882352941 - Green Component - 0.8862745098039215 - Blue Component - 0.6862745098039216 - Alpha Component - 1 - - Ansi 4 Color - - Color Space - sRGB - Red Component - 0.5372549019607843 - Green Component - 0.7058823529411765 - Blue Component - 0.9803921568627451 - Alpha Component - 1 - - Ansi 5 Color - - Color Space - sRGB - Red Component - 0.9607843137254902 - Green Component - 0.7607843137254902 - Blue Component - 0.9058823529411765 - Alpha Component - 1 - - Ansi 6 Color - - Color Space - sRGB - Red Component - 0.5803921568627451 - Green Component - 0.8862745098039215 - Blue Component - 0.8352941176470589 - Alpha Component - 1 - - Ansi 7 Color - - Color Space - sRGB - Red Component - 0.7294117647058823 - Green Component - 0.7607843137254902 - Blue Component - 0.8705882352941177 - Alpha Component - 1 - - Ansi 8 Color - - Color Space - sRGB - Red Component - 0.34509803921568627 - Green Component - 0.3568627450980392 - Blue Component - 0.4392156862745098 - Alpha Component - 1 - - Ansi 9 Color - - Color Space - sRGB - Red Component - 0.9529411764705882 - Green Component - 0.5450980392156862 - Blue Component - 0.6588235294117647 - Alpha Component - 1 - - Ansi 10 Color - - Color Space - sRGB - Red Component - 0.6509803921568628 - Green Component - 0.8901960784313725 - Blue Component - 0.6313725490196078 - Alpha Component - 1 - - Ansi 11 Color - - Color Space - sRGB - Red Component - 0.9764705882352941 - Green Component - 0.8862745098039215 - Blue Component - 0.6862745098039216 - Alpha Component - 1 - - Ansi 12 Color - - Color Space - sRGB - Red Component - 0.5372549019607843 - Green Component - 0.7058823529411765 - Blue Component - 0.9803921568627451 - Alpha Component - 1 - - Ansi 13 Color - - Color Space - sRGB - Red Component - 0.9607843137254902 - Green Component - 0.7607843137254902 - Blue Component - 0.9058823529411765 - Alpha Component - 1 - - Ansi 14 Color - - Color Space - sRGB - Red Component - 0.5803921568627451 - Green Component - 0.8862745098039215 - Blue Component - 0.8352941176470589 - Alpha Component - 1 - - Ansi 15 Color - - Color Space - sRGB - Red Component - 0.6509803921568628 - Green Component - 0.6784313725490196 - Blue Component - 0.7843137254901961 - Alpha Component - 1 - - Background Color - - Color Space - sRGB - Red Component - 0.11764705882352941 - Green Component - 0.11764705882352941 - Blue Component - 0.1803921568627451 - Alpha Component - 1 - - Foreground Color - - Color Space - sRGB - Red Component - 0.803921568627451 - Green Component - 0.8392156862745098 - Blue Component - 0.9568627450980393 - Alpha Component - 1 - - Link Color - - Color Space - sRGB - Red Component - 0.5372549019607843 - Green Component - 0.8627450980392157 - Blue Component - 0.9215686274509803 - Alpha Component - 1 - - Bold Color - - Color Space - sRGB - Red Component - 0.803921568627451 - Green Component - 0.8392156862745098 - Blue Component - 0.9568627450980393 - Alpha Component - 1 - - Cursor Color - - Color Space - sRGB - Red Component - 0.9607843137254902 - Green Component - 0.8784313725490196 - Blue Component - 0.8627450980392157 - Alpha Component - 1 - - Cursor Text Color - - Color Space - sRGB - Red Component - 0.803921568627451 - Green Component - 0.8392156862745098 - Blue Component - 0.9568627450980393 - Alpha Component - 1 - - Cursor Guide Color - - Color Space - sRGB - Red Component - 0.803921568627451 - Green Component - 0.8392156862745098 - Blue Component - 0.9568627450980393 - Alpha Component - 0.07 - - Selection Color - - Color Space - sRGB - Red Component - 0.34509803921568627 - Green Component - 0.3568627450980392 - Blue Component - 0.4392156862745098 - Alpha Component - 1 - - Selected Text Color - - Color Space - sRGB - Red Component - 0.803921568627451 - Green Component - 0.8392156862745098 - Blue Component - 0.9568627450980393 - Alpha Component - 1 - - - \ No newline at end of file diff --git a/config/iterm2/com.googlecode.iterm2.plist b/config/iterm2/com.googlecode.iterm2.plist deleted file mode 100644 index 3a88bd0..0000000 --- a/config/iterm2/com.googlecode.iterm2.plist +++ /dev/null @@ -1,1333 +0,0 @@ - - - - - AllowClipboardAccess - - AutoHideTmuxClientSession - - Custom Color Presets - - catppuccin-mocha - - Ansi 0 Color - - Alpha Component - 1 - Blue Component - 0.35294117647058826 - Color Space - sRGB - Green Component - 0.27843137254901962 - Red Component - 0.27058823529411763 - - Ansi 1 Color - - Alpha Component - 1 - Blue Component - 0.6588235294117647 - Color Space - sRGB - Green Component - 0.54509803921568623 - Red Component - 0.95294117647058818 - - Ansi 10 Color - - Alpha Component - 1 - Blue Component - 0.63137254901960782 - Color Space - sRGB - Green Component - 0.8901960784313725 - Red Component - 0.65098039215686276 - - Ansi 11 Color - - Alpha Component - 1 - Blue Component - 0.68627450980392157 - Color Space - sRGB - Green Component - 0.88627450980392153 - Red Component - 0.97647058823529409 - - Ansi 12 Color - - Alpha Component - 1 - Blue Component - 0.98039215686274506 - Color Space - sRGB - Green Component - 0.70588235294117652 - Red Component - 0.53725490196078429 - - Ansi 13 Color - - Alpha Component - 1 - Blue Component - 0.90588235294117647 - Color Space - sRGB - Green Component - 0.76078431372549016 - Red Component - 0.96078431372549022 - - Ansi 14 Color - - Alpha Component - 1 - Blue Component - 0.83529411764705885 - Color Space - sRGB - Green Component - 0.88627450980392153 - Red Component - 0.58039215686274515 - - Ansi 15 Color - - Alpha Component - 1 - Blue Component - 0.78431372549019607 - Color Space - sRGB - Green Component - 0.67843137254901964 - Red Component - 0.65098039215686276 - - Ansi 2 Color - - Alpha Component - 1 - Blue Component - 0.63137254901960782 - Color Space - sRGB - Green Component - 0.8901960784313725 - Red Component - 0.65098039215686276 - - Ansi 3 Color - - Alpha Component - 1 - Blue Component - 0.68627450980392157 - Color Space - sRGB - Green Component - 0.88627450980392153 - Red Component - 0.97647058823529409 - - Ansi 4 Color - - Alpha Component - 1 - Blue Component - 0.98039215686274506 - Color Space - sRGB - Green Component - 0.70588235294117652 - Red Component - 0.53725490196078429 - - Ansi 5 Color - - Alpha Component - 1 - Blue Component - 0.90588235294117647 - Color Space - sRGB - Green Component - 0.76078431372549016 - Red Component - 0.96078431372549022 - - Ansi 6 Color - - Alpha Component - 1 - Blue Component - 0.83529411764705885 - Color Space - sRGB - Green Component - 0.88627450980392153 - Red Component - 0.58039215686274515 - - Ansi 7 Color - - Alpha Component - 1 - Blue Component - 0.87058823529411766 - Color Space - sRGB - Green Component - 0.76078431372549016 - Red Component - 0.72941176470588232 - - Ansi 8 Color - - Alpha Component - 1 - Blue Component - 0.4392156862745098 - Color Space - sRGB - Green Component - 0.35686274509803922 - Red Component - 0.34509803921568627 - - Ansi 9 Color - - Alpha Component - 1 - Blue Component - 0.6588235294117647 - Color Space - sRGB - Green Component - 0.54509803921568623 - Red Component - 0.95294117647058818 - - Background Color - - Alpha Component - 1 - Blue Component - 0.1803921568627451 - Color Space - sRGB - Green Component - 0.11764705882352941 - Red Component - 0.11764705882352941 - - Bold Color - - Alpha Component - 1 - Blue Component - 0.95686274509803926 - Color Space - sRGB - Green Component - 0.83921568627450982 - Red Component - 0.80392156862745101 - - Cursor Color - - Alpha Component - 1 - Blue Component - 0.86274509803921573 - Color Space - sRGB - Green Component - 0.8784313725490196 - Red Component - 0.96078431372549022 - - Cursor Guide Color - - Alpha Component - 0.070000000000000007 - Blue Component - 0.95686274509803926 - Color Space - sRGB - Green Component - 0.83921568627450982 - Red Component - 0.80392156862745101 - - Cursor Text Color - - Alpha Component - 1 - Blue Component - 0.95686274509803926 - Color Space - sRGB - Green Component - 0.83921568627450982 - Red Component - 0.80392156862745101 - - Foreground Color - - Alpha Component - 1 - Blue Component - 0.95686274509803926 - Color Space - sRGB - Green Component - 0.83921568627450982 - Red Component - 0.80392156862745101 - - Link Color - - Alpha Component - 1 - Blue Component - 0.92156862745098034 - Color Space - sRGB - Green Component - 0.86274509803921573 - Red Component - 0.53725490196078429 - - Selected Text Color - - Alpha Component - 1 - Blue Component - 0.95686274509803926 - Color Space - sRGB - Green Component - 0.83921568627450982 - Red Component - 0.80392156862745101 - - Selection Color - - Alpha Component - 1 - Blue Component - 0.4392156862745098 - Color Space - sRGB - Green Component - 0.35686274509803922 - Red Component - 0.34509803921568627 - - - - Default Bookmark Guid - B563F48B-314D-48CC-908E-ACA971D430BE - DimBackgroundWindows - - DimOnlyText - - DisableFullscreenTransparency - - EnableDivisionView - - HapticFeedbackForEsc - - HideActivityIndicator - - HideScrollbar - - HideTabNumber - - HotkeyMigratedFromSingleToMulti - - IRMemory - 4 - MaxVertically - - New Bookmarks - - - ASCII Anti Aliased - - ASCII Ligatures - - Allow Title Reporting - - Ambiguous Double Width - - Ansi 0 Color - - Alpha Component - 1 - Blue Component - 0.11764705926179886 - Color Space - sRGB - Green Component - 0.098039217293262482 - Red Component - 0.078431375324726105 - - Ansi 1 Color - - Alpha Component - 1 - Blue Component - 0.16300037503242493 - Color Space - sRGB - Green Component - 0.23660069704055786 - Red Component - 0.7074432373046875 - - Ansi 10 Color - - Alpha Component - 1 - Blue Component - 0.56541937589645386 - Color Space - sRGB - Green Component - 0.9042816162109375 - Red Component - 0.3450070321559906 - - Ansi 11 Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.8833775520324707 - Red Component - 0.9259033203125 - - Ansi 12 Color - - Alpha Component - 1 - Blue Component - 0.9485321044921875 - Color Space - sRGB - Green Component - 0.67044717073440552 - Red Component - 0.65349078178405762 - - Ansi 13 Color - - Alpha Component - 1 - Blue Component - 0.8821563720703125 - Color Space - sRGB - Green Component - 0.4927266538143158 - Red Component - 0.8821563720703125 - - Ansi 14 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 0.99263292551040649 - Red Component - 0.37597531080245972 - - Ansi 15 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 0.99999600648880005 - - Ansi 2 Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.7607843279838562 - Red Component - 0.0 - - Ansi 3 Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.76959484815597534 - Red Component - 0.78058648109436035 - - Ansi 4 Color - - Alpha Component - 1 - Blue Component - 0.78216177225112915 - Color Space - sRGB - Green Component - 0.26474356651306152 - Red Component - 0.15404300391674042 - - Ansi 5 Color - - Alpha Component - 1 - Blue Component - 0.74494361877441406 - Color Space - sRGB - Green Component - 0.24931684136390686 - Red Component - 0.752197265625 - - Ansi 6 Color - - Alpha Component - 1 - Blue Component - 0.78166204690933228 - Color Space - sRGB - Green Component - 0.77425903081893921 - Red Component - 0.0 - - Ansi 7 Color - - Alpha Component - 1 - Blue Component - 0.78104829788208008 - Color Space - sRGB - Green Component - 0.78105825185775757 - Red Component - 0.7810397744178772 - - Ansi 8 Color - - Alpha Component - 1 - Blue Component - 0.4078223705291748 - Color Space - sRGB - Green Component - 0.40782788395881653 - Red Component - 0.40781760215759277 - - Ansi 9 Color - - Alpha Component - 1 - Blue Component - 0.45833224058151245 - Color Space - sRGB - Green Component - 0.47524076700210571 - Red Component - 0.8659515380859375 - - BM Growl - - Background Color - - Alpha Component - 1 - Blue Component - 0.12103271484375 - Color Space - sRGB - Green Component - 0.099111050367355347 - Red Component - 0.0806884765625 - - Background Image Location - - Badge Color - - Alpha Component - 0.5 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 1 - - Blinking Cursor - - Blur - - Blur Radius - 20 - Bold Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 0.99999600648880005 - - Character Encoding - 4 - Close Sessions On End - - Columns - 130 - Command - - Cursor Boost - 0.19958333333333333 - Cursor Color - - Alpha Component - 1 - Blue Component - 0.99998724460601807 - Color Space - sRGB - Green Component - 1 - Red Component - 0.99997633695602417 - - Cursor Guide Color - - Alpha Component - 0.25 - Blue Component - 1 - Color Space - sRGB - Green Component - 0.9268307089805603 - Red Component - 0.70213186740875244 - - Cursor Text Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.0 - Red Component - 0.0 - - Cursor Type - 1 - Custom Command - No - Custom Directory - Yes - Default Bookmark - No - Description - Default - Disable Window Resizing - - Draw Powerline Glyphs - - Flashing Bell - - Foreground Color - - Alpha Component - 1 - Blue Component - 0.86198854446411133 - Color Space - sRGB - Green Component - 0.86199951171875 - Red Component - 0.86197912693023682 - - Guid - B563F48B-314D-48CC-908E-ACA971D430BE - Horizontal Spacing - 1 - Icon - 1 - Idle Code - 0 - Jobs to Ignore - - rlogin - ssh - slogin - telnet - - Keyboard Map - - 0x2d-0x40000 - - Action - 11 - Text - 0x1f - - 0x32-0x40000 - - Action - 11 - Text - 0x00 - - 0x33-0x40000 - - Action - 11 - Text - 0x1b - - 0x34-0x40000 - - Action - 11 - Text - 0x1c - - 0x35-0x40000 - - Action - 11 - Text - 0x1d - - 0x36-0x40000 - - Action - 11 - Text - 0x1e - - 0x37-0x40000 - - Action - 11 - Text - 0x1f - - 0x38-0x40000 - - Action - 11 - Text - 0x7f - - 0xf700-0x220000 - - Action - 10 - Text - [1;2A - - 0xf700-0x240000 - - Action - 10 - Text - [1;5A - - 0xf700-0x260000 - - Action - 10 - Text - [1;6A - - 0xf700-0x280000 - - Action - 11 - Text - 0x1b 0x1b 0x5b 0x41 - - 0xf701-0x220000 - - Action - 10 - Text - [1;2B - - 0xf701-0x240000 - - Action - 10 - Text - [1;5B - - 0xf701-0x260000 - - Action - 10 - Text - [1;6B - - 0xf701-0x280000 - - Action - 11 - Text - 0x1b 0x1b 0x5b 0x42 - - 0xf702-0x220000 - - Action - 10 - Text - [1;2D - - 0xf702-0x240000 - - Action - 10 - Text - [1;5D - - 0xf702-0x260000 - - Action - 10 - Text - [1;6D - - 0xf702-0x280000 - - Action - 11 - Text - 0x1b 0x1b 0x5b 0x44 - - 0xf703-0x220000 - - Action - 10 - Text - [1;2C - - 0xf703-0x240000 - - Action - 10 - Text - [1;5C - - 0xf703-0x260000 - - Action - 10 - Text - [1;6C - - 0xf703-0x280000 - - Action - 11 - Text - 0x1b 0x1b 0x5b 0x43 - - 0xf704-0x20000 - - Action - 10 - Text - [1;2P - - 0xf705-0x20000 - - Action - 10 - Text - [1;2Q - - 0xf706-0x20000 - - Action - 10 - Text - [1;2R - - 0xf707-0x20000 - - Action - 10 - Text - [1;2S - - 0xf708-0x20000 - - Action - 10 - Text - [15;2~ - - 0xf709-0x20000 - - Action - 10 - Text - [17;2~ - - 0xf70a-0x20000 - - Action - 10 - Text - [18;2~ - - 0xf70b-0x20000 - - Action - 10 - Text - [19;2~ - - 0xf70c-0x20000 - - Action - 10 - Text - [20;2~ - - 0xf70d-0x20000 - - Action - 10 - Text - [21;2~ - - 0xf70e-0x20000 - - Action - 10 - Text - [23;2~ - - 0xf70f-0x20000 - - Action - 10 - Text - [24;2~ - - 0xf729-0x20000 - - Action - 10 - Text - [1;2H - - 0xf729-0x40000 - - Action - 10 - Text - [1;5H - - 0xf72b-0x20000 - - Action - 10 - Text - [1;2F - - 0xf72b-0x40000 - - Action - 10 - Text - [1;5F - - - Link Color - - Alpha Component - 1 - Blue Component - 0.9337158203125 - Color Space - sRGB - Green Component - 0.55789834260940552 - Red Component - 0.19802422821521759 - - Minimum Contrast - 0.49644531250000001 - Mouse Reporting - - Name - Default - Non Ascii Font - Monaco 12 - Non-ASCII Anti Aliased - - Normal Font - JetBrainsMonoNFM-Regular 13 - Only The Default BG Color Uses Transparency - - Open Password Manager Automatically - - Option Key Sends - 0 - Prompt Before Closing 2 - - Reduce Flicker - - Right Option Key Sends - 0 - Rows - 40 - Screen - -1 - Scrollback Lines - 0 - Selected Text Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.0 - Red Component - 0.0 - - Selection Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 0.84313726425170898 - Red Component - 0.70196080207824707 - - Send Code When Idle - - Set Local Environment Vars - - Shortcut - - Show Mark Indicators - - Show Status Bar - - Show Timestamps - 2 - Silence Bell - - Status Bar Layout - - advanced configuration - - algorithm - 0 - auto-rainbow style - 0 - font - .AppleSystemUIFont 12 - remove empty components - - - components - - - class - iTermStatusBarClockComponent - configuration - - knobs - - base: compression resistance - 1 - base: priority - 5 - format - YYYY-MM-dd HH:mm - localize - 0 - maxwidth - 150 - minwidth - 150 - - layout advanced configuration dictionary value - - algorithm - 0 - auto-rainbow style - 0 - remove empty components - - - - - - class - iTermStatusBarHostnameComponent - configuration - - knobs - - abbreviate-localhost - - base: compression resistance - 1 - base: priority - 5 - maxwidth - +infinity - minwidth - 0 - shared text color - - Alpha Component - 1 - Blue Component - 0.43218994140625 - Color Space - sRGB - Green Component - 0.34513998031616211 - Red Component - 0.0 - - - layout advanced configuration dictionary value - - algorithm - 0 - auto-rainbow style - 0 - font - .AppleSystemUIFont 12 - remove empty components - - - - - - class - iTermStatusBarSpringComponent - configuration - - knobs - - base: compression resistance - 1 - base: priority - 5 - iTermStatusBarSpringComponentSizeMultipleKey - 1 - iTermStatusBarSpringComponentSpringConstantKey - 0.01 - - layout advanced configuration dictionary value - - algorithm - 0 - auto-rainbow style - 0 - font - .AppleSystemUIFont 12 - remove empty components - - - - - - class - iTermStatusBarSpringComponent - configuration - - knobs - - base: compression resistance - 1 - base: priority - 5 - iTermStatusBarSpringComponentSizeMultipleKey - 1 - iTermStatusBarSpringComponentSpringConstantKey - 0.01 - - layout advanced configuration dictionary value - - algorithm - 0 - auto-rainbow style - 0 - remove empty components - - - - - - - Sync Title - - Tags - - Terminal Type - xterm-256color - Transparency - 0.14999999999999997 - Unlimited Scrollback - - Use Bold Font - - Use Bright Bold - - Use Cursor Guide - - Use Italic Font - - Use Non-ASCII Font - - Vertical Spacing - 1 - Visual Bell - - Window Type - 0 - Working Directory - /Users/ivuorinen/Code - - - PointerActions - - Button,1,1,, - - Action - kContextMenuPointerAction - - Button,2,1,, - - Action - kPasteFromClipboardPointerAction - - Gesture,ThreeFingerSwipeDown,, - - Action - kPrevWindowPointerAction - - Gesture,ThreeFingerSwipeLeft,, - - Action - kPrevTabPointerAction - - Gesture,ThreeFingerSwipeRight,, - - Action - kNextTabPointerAction - - Gesture,ThreeFingerSwipeUp,, - - Action - kNextWindowPointerAction - - - PreserveWindowSizeWhenTabBarVisibilityChanges - - Print In Black And White - - PromptOnQuit - - SeparateStatusBarsPerPane - - SmartPlacement - - SoundForEsc - - SplitPaneDimmingAmount - 0.29999999999999993 - StatusBarPosition - 0 - TabStyleWithAutomaticOption - 5 - TabsHaveCloseButton - - ThreeFingerEmulates - - TmuxUnpauseAutomatically - - VisualIndicatorForEsc - - kCPKSelectionViewPreferredModeKey - 0 - kCPKSelectionViewShowHSBTextFieldsKey - - - diff --git a/config/iterm2/iterm2-config.json b/config/iterm2/iterm2-config.json deleted file mode 100644 index 7f118f0..0000000 --- a/config/iterm2/iterm2-config.json +++ /dev/null @@ -1,410 +0,0 @@ -{ - "Badge Text": "", - "Working Directory": "/Users/ivuorinen/Code", - "Prompt Before Closing 2": false, - "Selected Text Color": { - "Red Component": 0.80392156862745101, - "Color Space": "sRGB", - "Blue Component": 0.95686274509803926, - "Alpha Component": 1, - "Green Component": 0.83921568627450982 - }, - "Rows": 25, - "Ansi 11 Color": { - "Red Component": 0.97647058823529409, - "Color Space": "sRGB", - "Blue Component": 0.68627450980392157, - "Alpha Component": 1, - "Green Component": 0.88627450980392153 - }, - "Use Italic Font": true, - "Foreground Color": { - "Red Component": 0.80392156862745101, - "Color Space": "sRGB", - "Blue Component": 0.95686274509803926, - "Alpha Component": 1, - "Green Component": 0.83921568627450982 - }, - "Right Option Key Sends": 0, - "Character Encoding": 4, - "Selection Color": { - "Red Component": 0.34509803921568627, - "Color Space": "sRGB", - "Blue Component": 0.4392156862745098, - "Alpha Component": 1, - "Green Component": 0.35686274509803922 - }, - "Blend": 0.24709154211956524, - "Mouse Reporting": true, - "Cursor Boost": 0, - "Ansi 4 Color": { - "Red Component": 0.53725490196078429, - "Color Space": "sRGB", - "Blue Component": 0.98039215686274506, - "Alpha Component": 1, - "Green Component": 0.70588235294117652 - }, - "Non-ASCII Anti Aliased": true, - "Sync Title": false, - "Badge Font": "JetBrainsMonoNerdFontCompleteM-Bold", - "Disable Window Resizing": true, - "Description": "Default", - "Close Sessions On End": true, - "Jobs to Ignore": ["rlogin", "ssh", "slogin", "telnet"], - "Scrollback Lines": 0, - "Draw Powerline Glyphs": true, - "Flashing Bell": true, - "Cursor Guide Color": { - "Red Component": 0.80392156862745101, - "Color Space": "sRGB", - "Blue Component": 0.95686274509803926, - "Alpha Component": 0.070000000000000007, - "Green Component": 0.83921568627450982 - }, - "BM Growl": true, - "Ansi 3 Color": { - "Red Component": 0.97647058823529409, - "Color Space": "sRGB", - "Blue Component": 0.68627450980392157, - "Alpha Component": 1, - "Green Component": 0.88627450980392153 - }, - "Icon": 1, - "Use Non-ASCII Font": false, - "Link Color": { - "Red Component": 0.53725490196078429, - "Color Space": "sRGB", - "Blue Component": 0.92156862745098034, - "Alpha Component": 1, - "Green Component": 0.86274509803921573 - }, - "Shortcut": "", - "Background Image Location": "", - "Bold Color": { - "Red Component": 0.80392156862745101, - "Color Space": "sRGB", - "Blue Component": 0.95686274509803926, - "Alpha Component": 1, - "Green Component": 0.83921568627450982 - }, - "Use Cursor Guide": false, - "Unlimited Scrollback": true, - "Custom Command": "No", - "Title Components": 512, - "Keyboard Map": { - "0xf700-0x260000": { - "Action": 10, - "Text": "[1;6A" - }, - "0x37-0x40000": { - "Action": 11, - "Text": "0x1f" - }, - "0x32-0x40000": { - "Action": 11, - "Text": "0x00" - }, - "0xf709-0x20000": { - "Action": 10, - "Text": "[17;2~" - }, - "0xf70c-0x20000": { - "Action": 10, - "Text": "[20;2~" - }, - "0xf729-0x20000": { - "Action": 10, - "Text": "[1;2H" - }, - "0xf72b-0x40000": { - "Action": 10, - "Text": "[1;5F" - }, - "0xf705-0x20000": { - "Action": 10, - "Text": "[1;2Q" - }, - "0xf703-0x260000": { - "Action": 10, - "Text": "[1;6C" - }, - "0xf700-0x220000": { - "Action": 10, - "Text": "[1;2A" - }, - "0xf701-0x280000": { - "Action": 11, - "Text": "0x1b 0x1b 0x5b 0x42" - }, - "0x38-0x40000": { - "Action": 11, - "Text": "0x7f" - }, - "0x33-0x40000": { - "Action": 11, - "Text": "0x1b" - }, - "0xf703-0x220000": { - "Action": 10, - "Text": "[1;2C" - }, - "0xf701-0x240000": { - "Action": 10, - "Text": "[1;5B" - }, - "0xf70d-0x20000": { - "Action": 10, - "Text": "[21;2~" - }, - "0xf702-0x260000": { - "Action": 10, - "Text": "[1;6D" - }, - "0xf729-0x40000": { - "Action": 10, - "Text": "[1;5H" - }, - "0xf706-0x20000": { - "Action": 10, - "Text": "[1;2R" - }, - "0x34-0x40000": { - "Action": 11, - "Text": "0x1c" - }, - "0xf700-0x280000": { - "Action": 11, - "Text": "0x1b 0x1b 0x5b 0x41" - }, - "0x2d-0x40000": { - "Action": 11, - "Text": "0x1f" - }, - "0xf70e-0x20000": { - "Action": 10, - "Text": "[23;2~" - }, - "0xf702-0x220000": { - "Action": 10, - "Text": "[1;2D" - }, - "0xf703-0x280000": { - "Action": 11, - "Text": "0x1b 0x1b 0x5b 0x43" - }, - "0xf700-0x240000": { - "Action": 10, - "Text": "[1;5A" - }, - "0xf707-0x20000": { - "Action": 10, - "Text": "[1;2S" - }, - "0xf70a-0x20000": { - "Action": 10, - "Text": "[18;2~" - }, - "0x35-0x40000": { - "Action": 11, - "Text": "0x1d" - }, - "0xf70f-0x20000": { - "Action": 10, - "Text": "[24;2~" - }, - "0xf703-0x240000": { - "Action": 10, - "Text": "[1;5C" - }, - "0xf701-0x260000": { - "Action": 10, - "Text": "[1;6B" - }, - "0xf702-0x280000": { - "Action": 11, - "Text": "0x1b 0x1b 0x5b 0x44" - }, - "0xf72b-0x20000": { - "Action": 10, - "Text": "[1;2F" - }, - "0x36-0x40000": { - "Action": 11, - "Text": "0x1e" - }, - "0xf708-0x20000": { - "Action": 10, - "Text": "[15;2~" - }, - "0xf701-0x220000": { - "Action": 10, - "Text": "[1;2B" - }, - "0xf70b-0x20000": { - "Action": 10, - "Text": "[19;2~" - }, - "0xf702-0x240000": { - "Action": 10, - "Text": "[1;5D" - }, - "0xf704-0x20000": { - "Action": 10, - "Text": "[1;2P" - } - }, - "Ansi 14 Color": { - "Red Component": 0.58039215686274515, - "Color Space": "sRGB", - "Blue Component": 0.83529411764705885, - "Alpha Component": 1, - "Green Component": 0.88627450980392153 - }, - "Ansi 2 Color": { - "Red Component": 0.65098039215686276, - "Color Space": "sRGB", - "Blue Component": 0.63137254901960782, - "Alpha Component": 1, - "Green Component": 0.8901960784313725 - }, - "Send Code When Idle": false, - "ASCII Anti Aliased": true, - "Tags": [], - "Ansi 9 Color": { - "Red Component": 0.95294117647058818, - "Color Space": "sRGB", - "Blue Component": 0.6588235294117647, - "Alpha Component": 1, - "Green Component": 0.54509803921568623 - }, - "Badge Right Margin": 10, - "Use Bold Font": true, - "Silence Bell": false, - "Ansi 12 Color": { - "Red Component": 0.53725490196078429, - "Color Space": "sRGB", - "Blue Component": 0.98039215686274506, - "Alpha Component": 1, - "Green Component": 0.70588235294117652 - }, - "Window Type": 0, - "Use Bright Bold": true, - "Cursor Text Color": { - "Red Component": 0.80392156862745101, - "Color Space": "sRGB", - "Blue Component": 0.95686274509803926, - "Alpha Component": 1, - "Green Component": 0.83921568627450982 - }, - "Default Bookmark": "No", - "Cursor Color": { - "Red Component": 0.96078431372549022, - "Color Space": "sRGB", - "Blue Component": 0.86274509803921573, - "Alpha Component": 1, - "Green Component": 0.8784313725490196 - }, - "Ansi 1 Color": { - "Red Component": 0.95294117647058818, - "Color Space": "sRGB", - "Blue Component": 0.6588235294117647, - "Alpha Component": 1, - "Green Component": 0.54509803921568623 - }, - "Name": "Default", - "Blinking Cursor": false, - "Guid": "82636119-EA17-4A26-9AA7-408172F4A9C8", - "Badge Max Width": 0.45000000000000001, - "Idle Code": 0, - "Ansi 10 Color": { - "Red Component": 0.65098039215686276, - "Color Space": "sRGB", - "Blue Component": 0.63137254901960782, - "Alpha Component": 1, - "Green Component": 0.8901960784313725 - }, - "Ansi 8 Color": { - "Red Component": 0.34509803921568627, - "Color Space": "sRGB", - "Blue Component": 0.4392156862745098, - "Alpha Component": 1, - "Green Component": 0.35686274509803922 - }, - "Badge Color": { - "Red Component": 1, - "Color Space": "sRGB", - "Blue Component": 0, - "Alpha Component": 0.5, - "Green Component": 0.14910030364990234 - }, - "Smart Cursor Color": true, - "Ambiguous Double Width": false, - "Blur Radius": 9.5927277260638313, - "Badge Max Height": 0.10000000000000001, - "Ansi 0 Color": { - "Red Component": 0.27058823529411763, - "Color Space": "sRGB", - "Blue Component": 0.35294117647058826, - "Alpha Component": 1, - "Green Component": 0.27843137254901962 - }, - "Blur": true, - "Normal Font": "JetBrainsMonoNerdFontCompleteM-Light 15", - "Vertical Spacing": 1, - "Ansi 7 Color": { - "Red Component": 0.72941176470588232, - "Color Space": "sRGB", - "Blue Component": 0.87058823529411766, - "Alpha Component": 1, - "Green Component": 0.76078431372549016 - }, - "Command": "", - "Terminal Type": "xterm-256color", - "Horizontal Spacing": 1, - "Option Key Sends": 0, - "Only The Default BG Color Uses Transparency": true, - "Minimum Contrast": 0.14973958333333334, - "Ansi 15 Color": { - "Red Component": 0.65098039215686276, - "Color Space": "sRGB", - "Blue Component": 0.78431372549019607, - "Alpha Component": 1, - "Green Component": 0.67843137254901964 - }, - "Ansi 6 Color": { - "Red Component": 0.58039215686274515, - "Color Space": "sRGB", - "Blue Component": 0.83529411764705885, - "Alpha Component": 1, - "Green Component": 0.88627450980392153 - }, - "Badge Top Margin": 10, - "Transparency": 0.10293218085106381, - "Background Color": { - "Red Component": 0.11764705882352941, - "Color Space": "sRGB", - "Blue Component": 0.1803921568627451, - "Alpha Component": 1, - "Green Component": 0.11764705882352941 - }, - "Screen": -2, - "Non Ascii Font": "Monaco 12", - "Ansi 13 Color": { - "Red Component": 0.96078431372549022, - "Color Space": "sRGB", - "Blue Component": 0.90588235294117647, - "Alpha Component": 1, - "Green Component": 0.76078431372549016 - }, - "Columns": 120, - "Visual Bell": true, - "ASCII Ligatures": false, - "Ansi 5 Color": { - "Red Component": 0.96078431372549022, - "Color Space": "sRGB", - "Blue Component": 0.90588235294117647, - "Alpha Component": 1, - "Green Component": 0.76078431372549016 - }, - "Custom Directory": "Yes" -} diff --git a/config/nvim/snippets/php.snippets b/config/nvim/snippets/php.snippets deleted file mode 100644 index b7afa63..0000000 --- a/config/nvim/snippets/php.snippets +++ /dev/null @@ -1,165 +0,0 @@ -snippet php "php" - - -snippet . "$this->" i - $this-> - -# If statement - -snippet if "if" - if (${1}) { - ${2} - } - -snippet ife "ife" - if (${1}) { - ${2} - } else { - ${3} - } - -snippet elif "elif" - else if (${1}) { - ${2} - } - -snippet el "el" - else { - ${1} - } - -# Switch - -snippet sw "sw" - switch (${1}) { - default: - break; - } - -snippet case "case" - case '${1}': - ${2} - break;${3} - -# Do-while loop - -snippet do "do" - do { - ${2} - } while (${1}); - -# While loop - -snippet wh "wh" - while (${1}) { - ${2} - } - -# For loop - -snippet for "for" - for (${1}; ${2}; ${3}) { - ${4} - } - -snippet fore "fore" - foreach (${1} as ${2}) { - ${3} - } - -# Functions and methods - -snippet fun "fun" - function ${1}(${2}) { - ${3} - } - -snippet met "met" - ${1}function ${2}(${3}) { - ${4} - } - -# Return - -snippet r "return" - return ${1} - -# Todos - -snippet todo "todo" - // TODO ${1} diff --git a/config/skhd/skhdrc b/config/skhd/skhdrc index 490fd09..22bc1b8 100644 --- a/config/skhd/skhdrc +++ b/config/skhd/skhdrc @@ -41,19 +41,23 @@ shift + cmd - return : wezterm # Floating windows # float / unfloat window and center on screen medium size -alt - t : yabai -m window --toggle float;\ - yabai -m window --grid 9:16:1:1:14:7 +alt - t : \ + yabai -m window --toggle float;\ + yabai -m window --grid 9:16:1:1:14:7 # float / unfloat window and center on screen large size -shift + alt - t : yabai -m window --toggle float;\ - yabai -m window --grid 90:160:5:5:150:80 +shift + alt - t : \ + yabai -m window --toggle float;\ + yabai -m window --grid 90:160:5:5:150:80 # make floating window fill screen -alt - y : yabai -m window --toggle float;\ - yabai -m window --grid 1:1:0:0:1:1 +alt - y : \ + yabai -m window --toggle float;\ + yabai -m window --grid 1:1:0:0:1:1 # toggle float window and center on screen medium size -shift + alt - y : yabai -m window --toggle float \ +shift + alt - y : \ + yabai -m window --toggle float \ && yabai -m window --resize \ abs:$(($(yabai -m query --displays --display | jq .frame.w) / 2)):$(($(yabai -m query --displays --display | jq .frame.h) * 4 / 5)) \ && yabai -m window --move \ @@ -86,11 +90,16 @@ shift + alt - k : yabai -m window --swap north shift + alt - l : yabai -m window --swap east ## resize windows -ctrl + alt - h : yabai -m window --resize left:-50:0; \ - yabai -m window --resize right:-50:0 -ctrl + alt - j : yabai -m window --resize bottom:0:50; \ - yabai -m window --resize top:0:50 -ctrl + alt - k : yabai -m window --resize top:0:-50; \ - yabai -m window --resize bottom:0:-50 -ctrl + alt - l : yabai -m window --resize right:50:0; \ - yabai -m window --resize left:50:0 +ctrl + alt - h : \ + yabai -m window --resize left:-50:0; \ + yabai -m window --resize right:-50:0 +ctrl + alt - j : \ + yabai -m window --resize bottom:0:50; \ + yabai -m window --resize top:0:50 +ctrl + alt - k : \ + yabai -m window --resize top:0:-50; \ + yabai -m window --resize bottom:0:-50 +ctrl + alt - l : \ + yabai -m window --resize right:50:0; \ + yabai -m window --resize left:50:0 + diff --git a/local/bin/git-dirty.md b/local/bin/git-dirty.md index 9241a9d..e3a8194 100644 --- a/local/bin/git-dirty.md +++ b/local/bin/git-dirty.md @@ -1,12 +1,14 @@ # git-dirty -A powerful tool to recursively check Git repository status across multiple directories. +A powerful tool to recursively check Git repository status across +multiple directories. ## Overview -`git-dirty` scans directories to identify Git repositories and reports their status. -It quickly shows which repositories have uncommitted changes, untracked files, or need -to be pushed, making it easy to maintain clean workspaces across multiple projects. +`git-dirty` scans directories to identify Git repositories and reports their +status. It quickly shows which repositories have uncommitted changes, +untracked files, or need to be pushed, making it easy to maintain clean +workspaces across multiple projects. ## Features @@ -95,9 +97,10 @@ The script uses the following status indicators: ## Branch Display -The script shows branch names for repositories not on main branches. This helps identify -repositories where work is happening on feature branches. Main branches (configurable as -`main`, `master`, and `trunk` by default) are hidden to reduce output clutter. +The script shows branch names for repositories not on main branches. +This helps identify repositories where work is happening on feature branches. +Main branches (configurable as `main`, `master`, and `trunk` by default) are +hidden to reduce output clutter. ## Configuration @@ -132,41 +135,44 @@ GIT_DIRTY_EXCLUDE="node_modules vendor .cache build dist tmp" ## Skip Directories from Checking -If you want to skip a directory from being checked, add a `.ignore` file next to the `.git` folder. -You can add `.ignore` to your global `.gitignore` file to avoid committing these files. +If you want to skip a directory from being checked, add a `.ignore` file next +to the `.git` folder. You can add `.ignore` to your global `.gitignore` file +to avoid committing these files. ## Performance Features -- **Parallel processing**: Significant speed improvements when using the `-p` flag +- **Parallel processing**: Significant speed improvements when + using the `-p` flag - **Progress bars**: Real-time feedback on scanning progress with ETA - **Rate limiting**: Controls parallel jobs to prevent system overloading -- **Smart directory traversal**: Skips excluded directories for faster processing +- **Smart directory traversal**: Skips excluded directories for + faster processing ## Tips -1. **Add an alias**: Create an alias in your shell configuration: +Add an alias: Create an alias in your shell configuration: - ```bash - alias gd='git-dirty' - ``` +```bash +alias gd='git-dirty' +``` -2. **Use it with specific directories**: +Use it with specific directories: - ```bash - git-dirty ~/specific/project - ``` +```bash +git-dirty ~/specific/project +``` -3. **Run in parallel mode for large codebases**: +Run in parallel mode for large codebases: - ```bash - git-dirty -p ~/huge-monorepo - ``` +```bash +git-dirty -p ~/huge-monorepo +``` -4. **Turn off branch display for cleaner output**: +Turn off branch display for cleaner output: - ```bash - git-dirty -b - ``` +```bash +git-dirty -b +``` ## Requirements diff --git a/package.json b/package.json index a1ac5e1..7071a9a 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,14 @@ "doc": "docs" }, "scripts": { - "lint:markdown": "npx markdownlint -d .", - "fix:markdown": "npx markdownlint -df .", - "lint:prettier": "npx prettier . --check", - "fix:prettier": "npx prettier . --write", - "test": "bash test-all.sh" + "lint:markdown": "markdownlint -d .", + "fix:markdown": "markdownlint -df .", + "lint:prettier": "prettier . --check", + "fix:prettier": "prettier . --write", + "test": "bash test-all.sh", + "lint:ec": "ec -f gcc", + "lint": "yarn lint:markdown && yarn lint:prettier && yarn lint:ec", + "fix": "yarn fix:markdown && yarn fix:prettier" }, "repository": { "type": "git", @@ -30,6 +33,9 @@ "@ivuorinen/base-configs": "^2.0.0", "@types/node": "^24.0.1", "bats": "^1.12.0", + "editorconfig-checker": "^6.1.0", + "markdownlint": "^0.38", + "prettier": "^3.6.2", "typescript": "^5.8.3" }, "packageManager": "yarn@1.22.22" diff --git a/tools/install-ec.sh b/tools/install-ec.sh new file mode 100755 index 0000000..8524d81 --- /dev/null +++ b/tools/install-ec.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Install editorconfig-checker if not already installed +set -euo pipefail + +if command -v ec > /dev/null 2>&1; then + exit 0 +fi + +if ! command -v yarn > /dev/null 2>&1; then + echo "yarn is required to install editorconfig-checker" >&2 + exit 1 +fi + +if yarn --version | grep -q '^1\.'; then + yarn global add --silent editorconfig-checker@"${VERSION:-latest}" +else + yarn dlx --quiet editorconfig-checker@"${VERSION:-latest}" --version > /dev/null +fi diff --git a/yarn.lock b/yarn.lock index 748feed..9540f81 100644 --- a/yarn.lock +++ b/yarn.lock @@ -954,13 +954,20 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-2.1.0.tgz#052aa67a48eccc4309d7f0191b7e41434b90bb78" integrity sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA== -"@types/node@*", "@types/node@^24.0.1": +"@types/node@*": version "24.1.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-24.1.0.tgz#0993f7dc31ab5cc402d112315b463e383d68a49c" integrity sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w== dependencies: undici-types "~7.8.0" +"@types/node@^24.0.1": + version "24.2.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.2.1.tgz#83e41543f0a518e006594bb394e2cd961de56727" + integrity sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ== + dependencies: + undici-types "~7.10.0" + "@types/normalize-package-data@^2.4.0", "@types/normalize-package-data@^2.4.3": version "2.4.4" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" @@ -1822,6 +1829,11 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== +editorconfig-checker@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/editorconfig-checker/-/editorconfig-checker-6.1.0.tgz#e6c47a7b93fbd8839673c9a585b9b973bb67ea9c" + integrity sha512-i25NwXlcWhadiO62AFUauucFPi9LwasoMRqoM8KkG3rJp6bx09mL/fDQpNMz2f6Nx/7EPVIZHK5/tIdztWzflA== + electron-to-chromium@^1.5.173: version "1.5.190" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.190.tgz#f0ac8be182291a45e8154dbb12f18d2b2318e4ac" @@ -3727,7 +3739,7 @@ markdownlint-cli@^0.45.0: run-con "~1.3.2" smol-toml "~1.3.4" -markdownlint@~0.38.0: +markdownlint@^0.38, markdownlint@~0.38.0: version "0.38.0" resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.38.0.tgz#862ca9d08f3a28f4149bd388ac369bb95865534e" integrity sha512-xaSxkaU7wY/0852zGApM8LdlIfGCW8ETZ0Rr62IQtAnUMlMuifsg09vWJcNYeL4f0anvr8Vo4ZQar8jGpV0btQ== @@ -4886,7 +4898,7 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^3: +prettier@^3, prettier@^3.6.2: version "3.6.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393" integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== @@ -5906,11 +5918,16 @@ typed-array-length@^1.0.7: possible-typed-array-names "^1.0.0" reflect.getprototypeof "^1.0.6" -typescript@>=4.2.0, typescript@^5.8.3: +typescript@>=4.2.0: version "5.8.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.3.tgz#92f8a3e5e3cf497356f4178c34cd65a7f5e8440e" integrity sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ== +typescript@^5.8.3: + version "5.9.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.2.tgz#d93450cddec5154a2d5cabe3b8102b83316fb2a6" + integrity sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A== + uc.micro@^2.0.0, uc.micro@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" @@ -5931,6 +5948,11 @@ unbox-primitive@^1.1.0: has-symbols "^1.1.0" which-boxed-primitive "^1.1.1" +undici-types@~7.10.0: + version "7.10.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.10.0.tgz#4ac2e058ce56b462b056e629cc6a02393d3ff350" + integrity sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag== + undici-types@~7.8.0: version "7.8.0" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.8.0.tgz#de00b85b710c54122e44fbfd911f8d70174cd294"