mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-16 14:05:17 +00:00
Compare commits
1 Commits
25.7.3
...
feat/skhd-
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b26215197 |
5
.gitattributes
vendored
5
.gitattributes
vendored
@@ -85,7 +85,6 @@ LICENSE text
|
|||||||
NEWS text
|
NEWS text
|
||||||
readme text
|
readme text
|
||||||
*README* text
|
*README* text
|
||||||
# Files literally named "TODO", not a todo list item
|
|
||||||
TODO text
|
TODO text
|
||||||
|
|
||||||
# Templates
|
# Templates
|
||||||
@@ -123,8 +122,7 @@ package.json text eol=lf
|
|||||||
package-lock.json text eol=lf -diff
|
package-lock.json text eol=lf -diff
|
||||||
pnpm-lock.yaml text eol=lf -diff
|
pnpm-lock.yaml text eol=lf -diff
|
||||||
.prettierrc text
|
.prettierrc text
|
||||||
# Ensure yarn.lock shows textual diffs
|
yarn.lock text -diff
|
||||||
yarn.lock text eol=lf
|
|
||||||
*.toml text
|
*.toml text
|
||||||
*.yaml text
|
*.yaml text
|
||||||
*.yml text
|
*.yml text
|
||||||
@@ -253,4 +251,3 @@ install text eol=lf diff=shell
|
|||||||
*.snippets text eol=lf
|
*.snippets text eol=lf
|
||||||
*.theme text eol=lf
|
*.theme text eol=lf
|
||||||
*.yamlfmt text eol=lf
|
*.yamlfmt text eol=lf
|
||||||
*.bats text eol=lf diff=shell
|
|
||||||
|
|||||||
30
.github/AGENTS.md
vendored
30
.github/AGENTS.md
vendored
@@ -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.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
8
.github/CODE_OF_CONDUCT.md
vendored
8
.github/CODE_OF_CONDUCT.md
vendored
@@ -60,7 +60,7 @@ representative at an online or offline event.
|
|||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
reported to the community leaders responsible for enforcement at
|
reported to the community leaders responsible for enforcement at
|
||||||
<ismo@ivuorinen.net>.
|
ismo@ivuorinen.net.
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
@@ -116,7 +116,7 @@ the community.
|
|||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||||
version 2.0, available at
|
version 2.0, available at
|
||||||
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
|
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||||
|
|
||||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||||
enforcement ladder](https://github.com/mozilla/diversity).
|
enforcement ladder](https://github.com/mozilla/diversity).
|
||||||
@@ -124,5 +124,5 @@ enforcement ladder](https://github.com/mozilla/diversity).
|
|||||||
[homepage]: https://www.contributor-covenant.org
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see the FAQ at
|
For answers to common questions about this code of conduct, see the FAQ at
|
||||||
<https://www.contributor-covenant.org/faq>. Translations are available at
|
https://www.contributor-covenant.org/faq. Translations are available at
|
||||||
<https://www.contributor-covenant.org/translations>.
|
https://www.contributor-covenant.org/translations.
|
||||||
|
|||||||
46
.github/README.md
vendored
46
.github/README.md
vendored
@@ -43,12 +43,6 @@ see what interesting stuff you've done with it. Sharing is caring.
|
|||||||
| `local/bin` | Helper scripts that I've collected or wrote. |
|
| `local/bin` | Helper scripts that I've collected or wrote. |
|
||||||
| `scripts` | Setup scripts. |
|
| `scripts` | Setup scripts. |
|
||||||
|
|
||||||
### Host specific configuration
|
|
||||||
|
|
||||||
Configurations under `hosts/<hostname>` are applied only when running on the
|
|
||||||
matching machine. Each host folder contains its own `install.conf.yaml` that
|
|
||||||
is processed by Dotbot during installation.
|
|
||||||
|
|
||||||
### dotfile folders
|
### dotfile folders
|
||||||
|
|
||||||
| Repo | Destination | Description |
|
| Repo | Destination | Description |
|
||||||
@@ -64,21 +58,6 @@ is processed by Dotbot during installation.
|
|||||||
|
|
||||||
Running `dfm` gives you a list of available commands.
|
Running `dfm` gives you a list of available commands.
|
||||||
|
|
||||||
#### Documentation generation
|
|
||||||
|
|
||||||
`dfm docs` generates Markdown documentation under the `docs/` directory. The
|
|
||||||
subcommands are:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
dfm docs alias # regenerate alias table
|
|
||||||
dfm docs folders # document interesting folders
|
|
||||||
dfm docs keybindings # update keybinding docs for tmux, nvim and others
|
|
||||||
dfm docs all # run every docs task
|
|
||||||
```
|
|
||||||
|
|
||||||
The `docs/` folder contains generated cheat sheets, keybindings and other
|
|
||||||
reference files. New documentation can be added without modifying this README.
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
The folder structure follows [XDG Base Directory Specification][xdg] where possible.
|
The folder structure follows [XDG Base Directory Specification][xdg] where possible.
|
||||||
@@ -94,31 +73,6 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
|
|||||||
|
|
||||||
Please see [docs/folders.md][docs-folders] for more information.
|
Please see [docs/folders.md][docs-folders] for more information.
|
||||||
|
|
||||||
## Managing submodules
|
|
||||||
|
|
||||||
This repository uses Git submodules for external dependencies. After cloning,
|
|
||||||
run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git submodule update --init --recursive
|
|
||||||
```
|
|
||||||
|
|
||||||
To pull submodule updates later use:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git submodule update --remote --merge
|
|
||||||
```
|
|
||||||
|
|
||||||
The helper script `add-submodules.sh` documents how each submodule is added and
|
|
||||||
configured. Submodules are automatically updated by the
|
|
||||||
[update-submodules.yml](.github/workflows/update-submodules.yml) workflow.
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
|
|
||||||
Shell scripts under `local/bin` are validated with [Bats](https://github.com/bats-core/bats-core).
|
|
||||||
Run `yarn test` to execute every test file. Bats is installed as a development
|
|
||||||
dependency, so run `yarn install` first if needed.
|
|
||||||
|
|
||||||
[dfm]: https://github.com/ivuorinen/dotfiles/blob/main/local/bin/dfm
|
[dfm]: https://github.com/ivuorinen/dotfiles/blob/main/local/bin/dfm
|
||||||
[docs-folders]: https://github.com/ivuorinen/dotfiles/blob/main/docs/folders.md
|
[docs-folders]: https://github.com/ivuorinen/dotfiles/blob/main/docs/folders.md
|
||||||
[xdg]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
[xdg]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
|
|||||||
2
.github/workflows/changelog.yml
vendored
2
.github/workflows/changelog.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
# $schema: "https://json.schemastore.org/github-workflow.json"
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Debug Changelog # Workflow name displayed on GitHub
|
name: Debug Changelog # Workflow name displayed on GitHub
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|||||||
66
.github/workflows/linters.yml
vendored
66
.github/workflows/linters.yml
vendored
@@ -1,10 +1,8 @@
|
|||||||
---
|
---
|
||||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Lint Code Base
|
name: Reviewdog
|
||||||
|
|
||||||
on:
|
on: [push]
|
||||||
pull_request:
|
|
||||||
branches: [master, main]
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@@ -13,24 +11,50 @@ concurrency:
|
|||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Linter:
|
linters:
|
||||||
name: PR Lint
|
name: Linters
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 15
|
runs-on: self-hosted
|
||||||
permissions:
|
|
||||||
statuses: write
|
permissions: write-all
|
||||||
contents: read
|
|
||||||
packages: read
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
||||||
|
|
||||||
- name: Yarn Lock Changes
|
- name: Setup Node.js environment
|
||||||
uses: Simek/yarn-lock-changes@34017425198654c20162a4dfd4f238fbece9636f # v0.12.1
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
|
|
||||||
|
- name: GitHub Actions
|
||||||
|
uses: reviewdog/action-actionlint@a5524e1c19e62881d79c1f1b9b6f09f16356e281 # v1.65.2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
reporter: github-pr-review
|
||||||
|
|
||||||
- name: Run PR Lint
|
- name: detect-secrets
|
||||||
# https://github.com/ivuorinen/actions
|
uses: reviewdog/action-detect-secrets@master
|
||||||
uses: ivuorinen/actions/pr-lint@c0f919957eb60743682a6e0cd6d454fd4b142ac9 # 25.6.30
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
reporter: github-pr-review
|
||||||
|
|
||||||
|
- name: markdownlint
|
||||||
|
uses: reviewdog/action-markdownlint@3667398db9118d7e78f7a63d10e26ce454ba5f58 # v0.26.2
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
reporter: github-pr-review
|
||||||
|
|
||||||
|
- name: shfmt
|
||||||
|
uses: reviewdog/action-shfmt@d8f080930b9be5847b4f97e9f4122b81a82aaeac # v1.0.4
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
shfmt_flags: |
|
||||||
|
--find
|
||||||
|
--list
|
||||||
|
--write
|
||||||
|
--diff
|
||||||
|
--simplify
|
||||||
|
--language-dialect bash
|
||||||
|
--indent 2
|
||||||
|
--binary-next-line
|
||||||
|
--case-indent
|
||||||
|
--space-redirects
|
||||||
|
--func-next-line
|
||||||
|
|||||||
2
.github/workflows/new-release.yml
vendored
2
.github/workflows/new-release.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
# $schema: "https://json.schemastore.org/github-workflow.json"
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Release Daily State
|
name: Release Daily State
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|||||||
4
.github/workflows/pre-commit-autoupdate.yml
vendored
4
.github/workflows/pre-commit-autoupdate.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
# $schema: "https://json.schemastore.org/github-workflow.json"
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Pre-commit autoupdate
|
name: Pre-commit autoupdate
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -16,7 +16,7 @@ permissions: read-all
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-update:
|
auto-update:
|
||||||
runs-on: self-hosted
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|||||||
2
.github/workflows/semantic-pr.yml
vendored
2
.github/workflows/semantic-pr.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
# $schema: "https://json.schemastore.org/github-workflow.json"
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Semantic PR
|
name: Semantic PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|||||||
6
.github/workflows/sync-labels.yml
vendored
6
.github/workflows/sync-labels.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
# $schema: "https://json.schemastore.org/github-workflow.json"
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Sync labels
|
name: Sync labels
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
# yamllint disable-line rule:truthy
|
||||||
@@ -23,10 +23,10 @@ permissions: read-all
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
SyncLabels:
|
SyncLabels:
|
||||||
runs-on: self-hosted
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: ivuorinen/actions/sync-labels@c0f919957eb60743682a6e0cd6d454fd4b142ac9 # 25.6.30
|
- uses: ivuorinen/actions/sync-labels@main
|
||||||
|
|||||||
2
.github/workflows/update-submodules.yml
vendored
2
.github/workflows/update-submodules.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
# $schema: "https://json.schemastore.org/github-workflow.json"
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Update submodules
|
name: Update submodules
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
---
|
|
||||||
# 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
|
|
||||||
VALIDATE_ALL_CODEBASE: true
|
|
||||||
FILEIO_REPORTER: false # Generate file.io report
|
|
||||||
GITHUB_STATUS_REPORTER: true # Generate GitHub status report
|
|
||||||
IGNORE_GENERATED_FILES: true # Ignore generated files
|
|
||||||
JAVASCRIPT_DEFAULT_STYLE: prettier # Default style for JavaScript
|
|
||||||
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
|
|
||||||
|
|
||||||
YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml
|
|
||||||
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.json
|
|
||||||
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.json
|
|
||||||
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.json
|
|
||||||
|
|
||||||
FILTER_REGEX_EXCLUDE: >
|
|
||||||
(node_modules|tools|config/cheat/cheatsheets/community|config/cheat/cheatsheets/tldr|config/fzf|config/zsh|config/tmux/plugins)
|
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ repos:
|
|||||||
- id: actionlint
|
- id: actionlint
|
||||||
|
|
||||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||||
rev: 41.17.2
|
rev: 41.1.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: renovate-config-validator
|
- id: renovate-config-validator
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1 @@
|
|||||||
[
|
[{"account_id":"S5Z2DMNFKJEZBPCWRHRWC4DCGI","vault_id":"injcin7obv3jdet3r2u3kfihfy","item_id":"f6vinbnc6l7ngdzvlw66ayewlq"}]
|
||||||
{
|
|
||||||
"account_id": "S5Z2DMNFKJEZBPCWRHRWC4DCGI",
|
|
||||||
"vault_id": "injcin7obv3jdet3r2u3kfihfy",
|
|
||||||
"item_id": "f6vinbnc6l7ngdzvlw66ayewlq"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
52
config/skhd/move.sh
Executable file
52
config/skhd/move.sh
Executable file
@@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
direction="$1" # east | west
|
||||||
|
|
||||||
|
# Active window and display
|
||||||
|
window=$(yabai -m query --windows --window)
|
||||||
|
display=$(yabai -m query --displays --display)
|
||||||
|
|
||||||
|
win_x=$(echo "$window" | jq '.frame.x')
|
||||||
|
win_w=$(echo "$window" | jq '.frame.w')
|
||||||
|
disp_x=$(echo "$display" | jq '.frame.x')
|
||||||
|
disp_w=$(echo "$display" | jq '.frame.w')
|
||||||
|
|
||||||
|
# Edge detection buffer
|
||||||
|
padding=20
|
||||||
|
move_to_display=false
|
||||||
|
|
||||||
|
if [[ "$direction" == "east" ]]; then
|
||||||
|
[[ $((win_x + win_w)) -ge $((disp_x + disp_w - padding)) ]] && move_to_display=true
|
||||||
|
elif [[ "$direction" == "west" ]]; then
|
||||||
|
[[ $win_x -le $((disp_x + padding)) ]] && move_to_display=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $move_to_display; then
|
||||||
|
# Find the target display based on the direction
|
||||||
|
if [[ "$direction" == "east" ]]; then
|
||||||
|
target_display=$(yabai -m query --displays | jq ".[] | select(.frame.x > $disp_x)" | jq -s '.[0].index')
|
||||||
|
else
|
||||||
|
target_display=$(yabai -m query --displays | jq ".[] | select(.frame.x < $disp_x)" | jq -s '.[-1].index')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$target_display" && "$target_display" != "null" ]]; then
|
||||||
|
# Find current space on the target display
|
||||||
|
target_space=$(yabai -m query --spaces | jq ".[] | select(.display == $target_display) | .index" | head -n1)
|
||||||
|
|
||||||
|
# If no space found, create a new one
|
||||||
|
if [[ -z "$target_space" || "$target_space" == "null" ]]; then
|
||||||
|
yabai -m space --create
|
||||||
|
sleep 0.3
|
||||||
|
# Asign the new space to the target display
|
||||||
|
target_space=$(yabai -m query --spaces | jq ".[] | select(.display == $target_display) | .index" | head -n1)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Move the window to the new space and focus it
|
||||||
|
yabai -m window --space "$target_space"
|
||||||
|
yabai -m space --focus "$target_space"
|
||||||
|
yabai -m display --focus "$target_display"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
yabai -m window --warp "$direction"
|
||||||
|
fi
|
||||||
|
|
||||||
@@ -80,10 +80,12 @@ ctrl + alt - h : yabai -m window --grid 1:2:0:0:1:1 # 1/2 left
|
|||||||
ctrl + alt - l : yabai -m window --grid 1:2:1:0:1:1 # 1/2 right
|
ctrl + alt - l : yabai -m window --grid 1:2:1:0:1:1 # 1/2 right
|
||||||
|
|
||||||
## swap windows
|
## swap windows
|
||||||
shift + alt - h : yabai -m window --swap west
|
#shift + alt - h : yabai -m window --swap west
|
||||||
shift + alt - j : yabai -m window --swap south
|
shift + alt - j : yabai -m window --swap south
|
||||||
shift + alt - k : yabai -m window --swap north
|
shift + alt - k : yabai -m window --swap north
|
||||||
shift + alt - l : yabai -m window --swap east
|
#shift + alt - l : yabai -m window --swap east
|
||||||
|
alt + shift - l : ~/.config/skhd/move.sh east
|
||||||
|
alt + shift - h : ~/.config/skhd/move.sh west
|
||||||
|
|
||||||
## resize windows
|
## resize windows
|
||||||
ctrl + alt - h : yabai -m window --resize left:-50:0; \
|
ctrl + alt - h : yabai -m window --resize left:-50:0; \
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
# Host specific directories
|
|
||||||
|
|
||||||
Host folders contain machine specific overrides and an `install.conf.yaml` file that Dotbot processes during setup.
|
|
||||||
|
|
||||||
Current hosts:
|
|
||||||
|
|
||||||
- **air** – personal computer
|
|
||||||
- **lakka** – remote server
|
|
||||||
- **s** – work laptop
|
|
||||||
- **tunkki** – local server
|
|
||||||
- **v** – work desktop
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# a
|
|
||||||
|
|
||||||
Encrypt or decrypt files and directories using `age` and your GitHub SSH keys.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
a encrypt <file|dir>
|
|
||||||
a decrypt <file.age|dir>
|
|
||||||
```
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
- `-v`, `--verbose` – show log output
|
|
||||||
|
|
||||||
Environment variables:
|
|
||||||
|
|
||||||
- `AGE_KEYSFILE` – location of the keys file
|
|
||||||
- `AGE_KEYSSOURCE` – URL to fetch keys if missing
|
|
||||||
- `AGE_LOGFILE` – log file path
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
a encrypt secret.txt
|
|
||||||
a decrypt secret.txt.age
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# ad
|
|
||||||
|
|
||||||
Decrypt a file encrypted with `age` using your GitHub SSH keys.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ad <file.age>
|
|
||||||
```
|
|
||||||
|
|
||||||
Uses `AGE_KEYSFILE` and `AGE_KEYSSOURCE` if keys are missing.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ad secret.txt.age
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# ae
|
|
||||||
|
|
||||||
Encrypt a file with `age` using your GitHub SSH keys.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ae <file>
|
|
||||||
```
|
|
||||||
|
|
||||||
Uses `AGE_KEYSFILE` and `AGE_KEYSSOURCE` if keys are missing.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ae secret.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
# dfm
|
|
||||||
|
|
||||||
Dotfiles manager and installation helper. Provides wrappers for many
|
|
||||||
setup tasks defined in this repository.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
dfm <command> [options]
|
|
||||||
```
|
|
||||||
|
|
||||||
Common commands include:
|
|
||||||
|
|
||||||
- `install` – install tools or run platform specific setup
|
|
||||||
- `brew` – manage Homebrew packages
|
|
||||||
- `docs` – regenerate markdown documentation
|
|
||||||
|
|
||||||
Set `VERBOSE=1` to see debug output.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
dfm install all
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# fzf-tmux
|
|
||||||
|
|
||||||
Wrapper around [`fzf`](https://github.com/junegunn/fzf) that opens the
|
|
||||||
interface inside a tmux pane or popup.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
fzf-tmux [layout options] [--] [fzf options]
|
|
||||||
```
|
|
||||||
|
|
||||||
Layout flags like `-p` or `-d` control popup and split behaviour. Use
|
|
||||||
`--` to pass arguments directly to `fzf`.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
fzf-tmux -p 80%,60% -- --reverse
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# fzf
|
|
||||||
|
|
||||||
Binary of the fuzzy finder [fzf](https://github.com/junegunn/fzf).
|
|
||||||
Use `fzf` as you would normally; this wrapper ships the prebuilt
|
|
||||||
binary in the dotfiles.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
fzf [options]
|
|
||||||
```
|
|
||||||
|
|
||||||
Refer to the upstream `fzf` documentation for all available
|
|
||||||
flags and features.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# git-attributes
|
|
||||||
|
|
||||||
Checks that every tracked file has a matching pattern in `.gitattributes`.
|
|
||||||
Can optionally suggest or write missing rules.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git-attributes [options]
|
|
||||||
```
|
|
||||||
|
|
||||||
Options include:
|
|
||||||
|
|
||||||
- `-v, --verbose` – show progress information
|
|
||||||
- `-e, --exit` – exit with non-zero status if missing rules
|
|
||||||
- `-p, --pattern <glob>` – pattern to check (default: `text: auto`)
|
|
||||||
- `-w, --write` – append suggestions to `.gitattributes`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git-attributes -v --write
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# iterm2_shell_integration.zsh
|
|
||||||
|
|
||||||
Official iTerm2 shell integration script for zsh. Source this file to
|
|
||||||
enable prompt tracking and command notifications in iTerm2.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
source iterm2_shell_integration.zsh
|
|
||||||
```
|
|
||||||
|
|
||||||
No parameters are required. The script modifies your prompt to work
|
|
||||||
with iTerm2 features such as badges and profile switching.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# msgr
|
|
||||||
|
|
||||||
Helper library for printing colorized log messages from shell scripts.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
msgr <type> "message" [extra]
|
|
||||||
```
|
|
||||||
|
|
||||||
Message types include `ok`, `warn`, `err`, `run` and many more. The
|
|
||||||
script is primarily sourced by other scripts.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
msgr ok "Installation complete"
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# php-switcher
|
|
||||||
|
|
||||||
Switch between Homebrew-installed PHP versions or list installed versions.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
php-switcher <version>|--auto [options]
|
|
||||||
```
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
- `--installed` – list versions installed via Homebrew
|
|
||||||
- `--current` – print currently active PHP version
|
|
||||||
- `--auto` – read version from `.php-version` in current directory
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
php-switcher 8.3
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -56,31 +56,22 @@ __pushover_send_message()
|
|||||||
|
|
||||||
response="$(eval "${curl_cmd}")"
|
response="$(eval "${curl_cmd}")"
|
||||||
printf "%s\n" "$response"
|
printf "%s\n" "$response"
|
||||||
|
# TODO: Parse response
|
||||||
# Parse response status. Expect JSON like: {"status":1,"request":"..."}
|
r="${?}"
|
||||||
if echo "$response" | grep -q '"status"[[:space:]]*:[[:space:]]*1'; then
|
if [ "${r}" -ne 0 ]; then
|
||||||
r=0
|
printf "%s: Failed to send message\n" "${0}" >&2
|
||||||
else
|
|
||||||
r=1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$r" -ne 0 ]; then
|
return "${r}"
|
||||||
# Extract possible error message from JSON
|
|
||||||
err=$(echo "$response" | grep -o '"errors".*' | sed 's/"errors"[:,\[]//g' | tr -d '[]"')
|
|
||||||
[ -n "$err" ] && printf "%s: %s\n" "$0" "$err" >&2
|
|
||||||
printf "%s: Failed to send message\n" "$0" >&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
return "$r"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CURL="$(command -v curl)"
|
CURL="$(which curl)"
|
||||||
PUSHOVER_URL="https://api.pushover.net/1/messages.json"
|
PUSHOVER_URL="https://api.pushover.net/1/messages.json"
|
||||||
TOKEN=$PUSHOVER_TOKEN
|
TOKEN=$PUSHOVER_TOKEN
|
||||||
USER=$PUSHOVER_USER
|
USER=$PUSHOVER_USER
|
||||||
CURL_OPTS=""
|
CURL_OPTS=""
|
||||||
devices=""
|
devices="${devices} ${device}"
|
||||||
optstring="c:d:D:e:p:r:t:T:s:u:U:a:h"
|
optstring="c:d:D:e:f:p:r:t:T:s:u:U:a:h"
|
||||||
|
|
||||||
OPTIND=1
|
OPTIND=1
|
||||||
while getopts ${optstring} c; do
|
while getopts ${optstring} c; do
|
||||||
@@ -106,7 +97,7 @@ while getopts ${optstring} c; do
|
|||||||
t)
|
t)
|
||||||
title="${OPTARG}"
|
title="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
T)
|
k)
|
||||||
TOKEN="${OPTARG}"
|
TOKEN="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
s)
|
s)
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# pushover
|
|
||||||
|
|
||||||
Send notifications via the Pushover API.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pushover -T <token> -U <user> [-t title] [-p priority] message
|
|
||||||
```
|
|
||||||
|
|
||||||
Common options:
|
|
||||||
|
|
||||||
- `-c <callback>` – callback URL
|
|
||||||
- `-d <device>` – target device
|
|
||||||
- `-s <sound>` – notification sound name
|
|
||||||
- `-T <token>` – application token (or `PUSHOVER_TOKEN` env)
|
|
||||||
- `-U <user>` – user key (or `PUSHOVER_USER` env)
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pushover -T $TOKEN -U $USER -t "Build" "Finished successfully"
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# t
|
|
||||||
|
|
||||||
Launch or switch to a tmux session based on a directory selected with
|
|
||||||
`fzf`. Inspired by scripts from ThePrimeagen and Jess Archer.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
t
|
|
||||||
```
|
|
||||||
|
|
||||||
Environment variables:
|
|
||||||
|
|
||||||
- `T_ROOT` – base directory to search (default: `~/Code`)
|
|
||||||
- `T_MAX_DEPTH` – recursion depth for directory search
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
T_ROOT=~/projects t
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# x-backup-folder
|
|
||||||
|
|
||||||
Create a compressed archive of a folder with a timestamped name.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-backup-folder <folder> [archive-name]
|
|
||||||
```
|
|
||||||
|
|
||||||
- `folder` – directory to back up
|
|
||||||
- `archive-name` – optional prefix for the generated tar.gz
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-backup-folder ~/Documents Notes
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# x-backup-mysql-with-prefix
|
|
||||||
|
|
||||||
Dump MySQL tables matching a prefix to a timestamped file.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-backup-mysql-with-prefix <prefix> <name> [database]
|
|
||||||
```
|
|
||||||
|
|
||||||
- `prefix` – table prefix to match (e.g. `wp_`)
|
|
||||||
- `name` – file name prefix
|
|
||||||
- `database` – database name (default: `wordpress`)
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-backup-mysql-with-prefix wp_ blog
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# x-change-alacritty-theme
|
|
||||||
|
|
||||||
Adapted from <https://gist.github.com/xqm32/17777d035930d622d0ff7530bfab61fd>
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-change-alacritty-theme <day|night>
|
|
||||||
```
|
|
||||||
|
|
||||||
Switches Alacritty's theme by copying a theme file under
|
|
||||||
`~/.config/alacritty/`.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-change-alacritty-theme night
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-clean-vendordirs
|
|
||||||
|
|
||||||
Remove `vendor` and `node_modules` directories recursively.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-clean-vendordirs [directory]
|
|
||||||
```
|
|
||||||
|
|
||||||
- `directory` – root directory to clean (default: current directory)
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-clean-vendordirs ~/projects
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# x-compare-versions.py
|
|
||||||
|
|
||||||
Compare version strings using Python's packaging library.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
echo "1.2.3 >= 1.0.0" | x-compare-versions.py
|
|
||||||
```
|
|
||||||
|
|
||||||
The script reads comparison expressions from standard input and exits
|
|
||||||
with status 0 if all comparisons are true.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-dc
|
|
||||||
|
|
||||||
Create a directory if it does not exist.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-dc <directory>
|
|
||||||
```
|
|
||||||
|
|
||||||
Set `VERBOSE=1` to see log messages.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-dc ~/tmp/mydir
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# x-dfm-docs-xterm-keybindings
|
|
||||||
|
|
||||||
Generate `docs/tmux-keybindings.md` using tmux's key list.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-dfm-docs-xterm-keybindings
|
|
||||||
```
|
|
||||||
|
|
||||||
No parameters are needed. The script writes the file under `docs/` and
|
|
||||||
overwrites any existing version.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# x-env-list
|
|
||||||
|
|
||||||
Lists environment variables grouped by their prefix. Sensitive values
|
|
||||||
are hidden by default.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-env-list [options]
|
|
||||||
```
|
|
||||||
|
|
||||||
Use `--json` for machine readable output or specify
|
|
||||||
`X_ENV_GROUPING` with a YAML file to override the default groups.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
X_ENV_GROUPING=~/env-groups.yaml x-env-list --json
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# x-foreach
|
|
||||||
|
|
||||||
Run a command in each directory produced by another command.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-foreach "<list-cmd>" "<cmd>"
|
|
||||||
```
|
|
||||||
|
|
||||||
- `list-cmd` – command that outputs directories
|
|
||||||
- `cmd` – command to run inside each directory
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-foreach "ls -d */" "git status"
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-gh-get-latest-release-targz
|
|
||||||
|
|
||||||
Fetch the tarball URL of the latest GitHub release or download it directly.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-gh-get-latest-release-targz <owner/repo> [--get]
|
|
||||||
```
|
|
||||||
|
|
||||||
- `--get` – download and extract the tarball instead of printing the URL
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-gh-get-latest-release-targz ivuorinen/dotfiles --get
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -97,7 +97,7 @@ Examples:
|
|||||||
# Use GitHub Enterprise API
|
# Use GitHub Enterprise API
|
||||||
GITHUB_API_URL="https://github.example.com/api/v3/repos" $BIN ivuorinen/dotfiles
|
GITHUB_API_URL="https://github.example.com/api/v3/repos" $BIN ivuorinen/dotfiles
|
||||||
EOF
|
EOF
|
||||||
exit 0
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check that required dependencies are installed
|
# Check that required dependencies are installed
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
# x-git-largest-files.py
|
|
||||||
|
|
||||||
Lists the largest files in a git repository.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-git-largest-files.py [options]
|
|
||||||
```
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
- `-c NUM` – number of files to show (default: 10)
|
|
||||||
- `--files-exceeding N` – list files larger than N KB
|
|
||||||
- `-p` – sort by on-disk size instead of pack size
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-git-largest-files.py -c 5
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# x-have
|
|
||||||
|
|
||||||
Check if a command exists on the system. Exits with status 0 if found
|
|
||||||
and 1 otherwise.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-have <command>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-have git && echo "git installed"
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-hr
|
|
||||||
|
|
||||||
Print a horizontal rule. Useful for visually separating log output.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-hr [character]
|
|
||||||
```
|
|
||||||
|
|
||||||
If no character is given a red `-` is used.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-hr "="
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-ip
|
|
||||||
|
|
||||||
Fetch your public IP address using `curl`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-ip [curl-options]
|
|
||||||
```
|
|
||||||
|
|
||||||
Any arguments are passed directly to `curl`.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-ip -4
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# x-load-configs
|
|
||||||
|
|
||||||
Source shell configuration files for aliases and exports. Intended to
|
|
||||||
be run after `dfm install` or when switching hosts.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-load-configs
|
|
||||||
```
|
|
||||||
|
|
||||||
Set `VERBOSE=1` to print each file as it is sourced. Use `DEBUG=1` to
|
|
||||||
enable tracing.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
VERBOSE=1 x-load-configs
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# x-localip
|
|
||||||
|
|
||||||
Display local IPv4 and IPv6 addresses with optional interface filtering.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-localip [--ipv4] [--ipv6] [interface]
|
|
||||||
```
|
|
||||||
|
|
||||||
- `--ipv4` – show only IPv4 addresses
|
|
||||||
- `--ipv6` – show only IPv6 addresses
|
|
||||||
- `interface` – limit output to the named interface
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Show all addresses
|
|
||||||
x-localip
|
|
||||||
|
|
||||||
# IPv4 for wlan0
|
|
||||||
x-localip --ipv4 wlan0
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Create a directory and cd into it
|
# Create a directory and cd into it
|
||||||
# Usage: x-mkd <dir>
|
# Usage: mkcd <dir>
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-mkd
|
|
||||||
|
|
||||||
Create a directory and immediately `cd` into it.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-mkd <dir>
|
|
||||||
```
|
|
||||||
|
|
||||||
Set `VERBOSE=1` for status messages.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-mkd project && git init
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# x-multi-ping
|
|
||||||
|
|
||||||
Multi-protocol ping helper supporting IPv4 and IPv6.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-multi-ping [--loop] [--sleep=N] host1 host2...
|
|
||||||
```
|
|
||||||
|
|
||||||
- `--loop` – ping continuously
|
|
||||||
- `--sleep` – seconds to wait between iterations
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-multi-ping --loop --sleep=5 example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# x-multi-ping.pl
|
|
||||||
|
|
||||||
Ping multiple hosts with IPv4/IPv6 support.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-multi-ping.pl [--loop|--forever] [--sleep N] host1 host2 ...
|
|
||||||
```
|
|
||||||
|
|
||||||
`--loop` keeps pinging each host until interrupted. `--sleep` controls
|
|
||||||
the delay between attempts.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-multi-ping.pl --loop --sleep 2 example.com 1.1.1.1
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-open-ports
|
|
||||||
|
|
||||||
List listening ports using `lsof` or `ss`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-open-ports [--json]
|
|
||||||
```
|
|
||||||
|
|
||||||
- `--json` – output as JSON instead of Markdown
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-open-ports --json
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-path-append
|
|
||||||
|
|
||||||
Append directories to the `PATH` variable without duplicates.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-path-append <dir1> [dir2 ...]
|
|
||||||
```
|
|
||||||
|
|
||||||
Set `VERBOSE=1` for verbose logging.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-path-append /usr/local/sbin "$HOME/bin"
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-path-prepend
|
|
||||||
|
|
||||||
Prepend directories to the `PATH` variable without duplicates.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-path-prepend <dir1> [dir2 ...]
|
|
||||||
```
|
|
||||||
|
|
||||||
Set `VERBOSE=1` for verbose logging.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-path-prepend "$HOME/bin" /opt/tools
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-path-remove
|
|
||||||
|
|
||||||
Remove directories from the `PATH` variable.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-path-remove <dir1> [dir2 ...]
|
|
||||||
```
|
|
||||||
|
|
||||||
Set `VERBOSE=1` for verbose logging.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-path-remove /usr/local/bin
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# x-path
|
|
||||||
|
|
||||||
Manage entries in the `PATH` variable through subcommands.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-path <command> <directory1> [directory2 ...]
|
|
||||||
```
|
|
||||||
|
|
||||||
### Commands
|
|
||||||
|
|
||||||
- `append` / `a` – Append directories to `PATH`
|
|
||||||
- `prepend` / `p` – Prepend directories to `PATH`
|
|
||||||
- `remove` – Remove directories from `PATH`
|
|
||||||
- `check` – Validate directories (default: all in `PATH`)
|
|
||||||
|
|
||||||
Set `VERBOSE=1` for progress output.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Prepend /opt/bin to PATH
|
|
||||||
x-path prepend /opt/bin
|
|
||||||
|
|
||||||
# Remove /usr/local/bin from PATH
|
|
||||||
x-path remove /usr/local/bin
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# x-quota-usage.php
|
|
||||||
|
|
||||||
Display filesystem quota usage in a human readable table.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-quota-usage.php
|
|
||||||
```
|
|
||||||
|
|
||||||
Runs the `quota` command and formats the output. Requires PHP with the
|
|
||||||
`shell_exec` function enabled.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-record
|
|
||||||
|
|
||||||
Interactive screen recording wrapper around `giph`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-record <gif|mkv|webm|mp4> <fullscreen|set>
|
|
||||||
```
|
|
||||||
|
|
||||||
The script asks for file type and area when omitted.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-record gif fullscreen
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# x-set-php-aliases
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
source x-set-php-aliases
|
|
||||||
```
|
|
||||||
|
|
||||||
Generates shell aliases (`php80`, `php81` ...) for each Homebrew PHP
|
|
||||||
installation. Caches the list under `$XDG_CACHE_HOME/x-set-php-aliases`.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# x-sha256sum-matcher
|
|
||||||
|
|
||||||
Compare two files by calculating their SHA256 checksums.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-sha256sum-matcher [options] file1 file2
|
|
||||||
```
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
- `-v` – verbose output
|
|
||||||
- `-h, --help` – show help
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-sha256sum-matcher original.iso download.iso
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# x-ssl-expiry-date
|
|
||||||
|
|
||||||
Check the expiry date of an SSL certificate for one or more hosts.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-ssl-expiry-date [-d] [-p PORT] host1 host2 ...
|
|
||||||
```
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
- `-d` – show days left instead of the full date
|
|
||||||
- `-p <port>` – use custom port (default: 443)
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-ssl-expiry-date -d github.com
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# x-term-colors
|
|
||||||
|
|
||||||
Display a table of 24‑bit color codes for testing terminal color
|
|
||||||
support.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-term-colors
|
|
||||||
```
|
|
||||||
|
|
||||||
Pipe the output to `less -R` to view with color highlighting.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
# x-thumbgen
|
|
||||||
|
|
||||||
Generate thumbnails using ImageMagick (magick) with MIME type filtering.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-thumbgen [options] source_directory
|
|
||||||
```
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
- `-o DIR` – output directory (default: same as source)
|
|
||||||
- `-s STR` – suffix for thumbnails
|
|
||||||
- `-h` – show help
|
|
||||||
|
|
||||||
Environment variables like `THUMB_BACKGROUND` control the background
|
|
||||||
color.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
THUMB_BACKGROUND=black x-thumbgen -o ~/thumbs ~/images
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# x-until-error
|
|
||||||
|
|
||||||
Repeatedly execute a command until it returns a non-zero exit status.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-until-error [--sleep SECONDS] command [args...]
|
|
||||||
```
|
|
||||||
|
|
||||||
Use `--sleep` to wait between runs. The command is executed at least
|
|
||||||
once.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-until-error --sleep 2 ping -c1 example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# x-until-success
|
|
||||||
|
|
||||||
Repeat a command until it succeeds (exit status 0). The command is
|
|
||||||
always executed at least once.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-until-success [--sleep SECONDS] command [args...]
|
|
||||||
```
|
|
||||||
|
|
||||||
Use `--sleep` to control the delay between attempts.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-until-success --sleep 5 curl -I https://example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# x-validate-sha256sum.sh
|
|
||||||
|
|
||||||
This script contains a helper for sha256 validating your downloads
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-validate-sha256sum.sh file sha256sum
|
|
||||||
```
|
|
||||||
|
|
||||||
The script computes the SHA256 hash of `file` and compares it to the
|
|
||||||
expected value. It exits non-zero if the sums differ.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# x-welcome-banner
|
|
||||||
|
|
||||||
Print a colorful MOTD with greeting, system info and today's weather.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-welcome-banner
|
|
||||||
```
|
|
||||||
|
|
||||||
Requires optional tools: `neofetch`, `figlet`, `lolcat` and `curl` for extra info.
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# x-when-down
|
|
||||||
|
|
||||||
Wait until a host stops responding to ping, then run a command.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-when-down <host> <command...>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-when-down 1.2.3.4 echo "server down"
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# x-when-up
|
|
||||||
|
|
||||||
Wait for a host to respond to ping before running a command.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-when-up <host> <command...>
|
|
||||||
```
|
|
||||||
|
|
||||||
If the command is `ssh`, the host argument may be omitted.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```bash
|
|
||||||
x-when-up 1.2.3.4 ssh 1.2.3.4
|
|
||||||
```
|
|
||||||
|
|
||||||
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"fix:markdown": "npx markdownlint -df .",
|
"fix:markdown": "npx markdownlint -df .",
|
||||||
"lint:prettier": "npx prettier . --check",
|
"lint:prettier": "npx prettier . --check",
|
||||||
"fix:prettier": "npx prettier . --write",
|
"fix:prettier": "npx prettier . --write",
|
||||||
"test": "bash test-all.sh"
|
"test": "echo \"Error: no test specified\" && exit 0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -29,7 +29,6 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ivuorinen/base-configs": "^2.0.0",
|
"@ivuorinen/base-configs": "^2.0.0",
|
||||||
"@types/node": "^24.0.1",
|
"@types/node": "^24.0.1",
|
||||||
"bats": "^1.12.0",
|
|
||||||
"typescript": "^5.8.3"
|
"typescript": "^5.8.3"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@1.22.22"
|
"packageManager": "yarn@1.22.22"
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
# create-aerospace-keymaps
|
|
||||||
|
|
||||||
Generates `docs/aerospace-keybindings.md` using `aerospace config --json`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/create-aerospace-keymaps.php
|
|
||||||
```
|
|
||||||
|
|
||||||
Requires the `aerospace` CLI tool to be installed.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# create-nvim-keymaps
|
|
||||||
|
|
||||||
Outputs current Neovim key mappings to `docs/nvim-keybindings.md`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/create-nvim-keymaps.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Requires Neovim to be installed.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# create-wezterm-keymaps
|
|
||||||
|
|
||||||
Generates `docs/wezterm-keybindings.md` by invoking `wezterm show-keys`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/create-wezterm-keymaps.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Requires wezterm to be installed.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# install-cargo-packages
|
|
||||||
|
|
||||||
Install Rust packages listed in `config/asdf/cargo-packages`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-cargo-packages.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
The script installs each package with `cargo install` and runs
|
|
||||||
`cargo-install-update` when available to update existing packages.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# install-cheat-purebashbible
|
|
||||||
|
|
||||||
Fetches the Pure Bash Bible repository and installs its cheatsheets for the
|
|
||||||
`cheat` utility.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-cheat-purebashbible.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Requires `git` and `cheat` to be available in PATH.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# install-composer
|
|
||||||
|
|
||||||
Installs the PHP package manager [Composer](https://getcomposer.org/).
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-composer.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
The script downloads the latest Composer PHAR and places it in `$HOME/.local/bin`.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# install-fonts
|
|
||||||
|
|
||||||
Installs Nerd Fonts used by various terminal and editor setups.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-fonts.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Fonts are downloaded to `$HOME/.local/share/fonts` and refreshed automatically.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# install-gh-extensions
|
|
||||||
|
|
||||||
Installs a curated set of GitHub CLI extensions defined in
|
|
||||||
`config/gh/extensions`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-gh-extensions.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
The script installs each extension using the `gh extension install` command.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# install-git-crypt
|
|
||||||
|
|
||||||
Installs `git-crypt` for transparent encryption of files in Git repositories.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-git-crypt.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
After installation you can run `git-crypt init` inside a repository to begin
|
|
||||||
encrypting files.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# install-go-packages
|
|
||||||
|
|
||||||
Installs Go binaries defined in `config/go/packages`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-go-packages.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
The script uses `go install` for each package path listed in the configuration
|
|
||||||
file.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# install-macos-defaults
|
|
||||||
|
|
||||||
Applies a set of macOS defaults for a consistent developer environment.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-macos-defaults.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Requires macOS and the `defaults` command.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# install-npm-packages
|
|
||||||
|
|
||||||
Installs global npm packages listed in `config/npm/packages`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-npm-packages.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Uses `npm install -g` for each package in the configuration file.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# install-ntfy
|
|
||||||
|
|
||||||
Installs the lightweight notification tool [`ntfy`](https://ntfy.sh/).
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-ntfy.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
After running you can send notifications using `ntfy publish`.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# install-pip-packages
|
|
||||||
|
|
||||||
Installs Python packages from `config/pip/packages` using `pip`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-pip-packages.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
The script uses `pip install --user` for each package entry.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# install-xcode-cli-tools
|
|
||||||
|
|
||||||
Installs the Xcode Command Line Tools on macOS using `osascript` prompts.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-xcode-cli-tools.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Requires macOS with administrator privileges.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# install-z
|
|
||||||
|
|
||||||
Installs [z](https://github.com/rupa/z), a directory jumping tool.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/install-z.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Once installed add `. ~/.z` to your shell startup file to enable the command.
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# shared
|
|
||||||
|
|
||||||
Collection of helper functions shared across install scripts.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Source the file in your script:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
source "${DOTFILES}/scripts/shared.sh"
|
|
||||||
```
|
|
||||||
|
|
||||||
Provides messaging helpers and common environment checks.
|
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
[ -z "$SHARED_SCRIPTS_SOURCED" ] && {
|
[ -z "$SHARED_SCRIPTS_SOURCED" ] && {
|
||||||
|
|
||||||
source "${DOTFILES}/config/shared.sh"
|
source "${DOTFILES}/config/shared.sh"
|
||||||
# Warn the user if the shared configuration hasn't been loaded yet
|
|
||||||
msgr warn "(!) shared.sh not sourced"
|
msgr warn "(!) shared.sh not sourced"
|
||||||
|
|
||||||
# Set variable that checks if the shared.sh script has been
|
# Set variable that checks if the shared.sh script has been
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
# update-readme-aliases
|
|
||||||
|
|
||||||
Regenerates the alias table located at `docs/alias.md`.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scripts/update-readme-aliases.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
This script parses `config/alias` and writes the markdown table to the docs.
|
|
||||||
15
test-all.sh
15
test-all.sh
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Run all bats tests
|
|
||||||
|
|
||||||
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
|
|
||||||
git ls-files '*.bats' -z | xargs -0 npx --yes bats
|
|
||||||
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
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/env bats
|
|
||||||
|
|
||||||
setup() {
|
|
||||||
export DOTFILES="$PWD"
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "dfm help shows usage" {
|
|
||||||
run bash local/bin/dfm help
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
[[ "$output" == *"Usage: dfm"* ]]
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/env bats
|
|
||||||
|
|
||||||
@test "x-gh-get-latest-version help" {
|
|
||||||
run bash local/bin/x-gh-get-latest-version --help
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
[[ "$output" == "Usage: x-gh-get-latest-version"* ]]
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bats
|
|
||||||
|
|
||||||
@test "x-localip prints version" {
|
|
||||||
run bash local/bin/x-localip --version
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
[[ "$output" == "x-localip version"* ]]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "x-localip help" {
|
|
||||||
run bash local/bin/x-localip --help
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
[[ "$output" == "Usage:"* ]]
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bats
|
|
||||||
|
|
||||||
@test "x-mkd creates directory" {
|
|
||||||
dir="$BATS_TMPDIR/mkd-test"
|
|
||||||
run env VERBOSE=1 bash local/bin/x-mkd "$dir"
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
[ -d "$dir" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "x-mkd with no args shows usage" {
|
|
||||||
run bash local/bin/x-mkd
|
|
||||||
[ "$status" -eq 1 ]
|
|
||||||
[[ "$output" == "Usage:"* ]]
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env bats
|
|
||||||
|
|
||||||
@test "x-path-append adds directory" {
|
|
||||||
mkdir -p "$BATS_TMPDIR/dir"
|
|
||||||
PATH="/usr/bin"
|
|
||||||
VERBOSE=1 source local/bin/x-path-append "$BATS_TMPDIR/dir"
|
|
||||||
[ "$PATH" = "/usr/bin:$BATS_TMPDIR/dir" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "x-path-prepend adds directory to start" {
|
|
||||||
mkdir -p "$BATS_TMPDIR/dir"
|
|
||||||
PATH="/usr/bin:/bin"
|
|
||||||
VERBOSE=1 source local/bin/x-path-prepend "$BATS_TMPDIR/dir"
|
|
||||||
[ "$PATH" = "$BATS_TMPDIR/dir:/usr/bin:/bin" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "x-path-remove removes directory" {
|
|
||||||
mkdir -p "$BATS_TMPDIR/dir"
|
|
||||||
PATH="$BATS_TMPDIR/dir:/usr/bin"
|
|
||||||
VERBOSE=1 source local/bin/x-path-remove "$BATS_TMPDIR/dir"
|
|
||||||
[ "$PATH" = "/usr/bin" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "x-path-append skips missing directory" {
|
|
||||||
PATH="/usr/bin"
|
|
||||||
VERBOSE=1 source local/bin/x-path-append "$BATS_TMPDIR/no-such"
|
|
||||||
[ "$PATH" = "/usr/bin" ]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user