mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-10 23:51:56 +00:00
Compare commits
1 Commits
renovate/n
...
feat/chezm
| Author | SHA1 | Date | |
|---|---|---|---|
| 8460c2d408 |
53
.chezmoi.yaml.tmpl
Normal file
53
.chezmoi.yaml.tmpl
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{{- $hostname := .chezmoi.hostname -}}
|
||||||
|
{{- $username := .chezmoi.username -}}
|
||||||
|
{{- $osid := .chezmoi.os -}}
|
||||||
|
|
||||||
|
sourceDir: {{ .chezmoi.sourceDir | quote }}
|
||||||
|
|
||||||
|
data:
|
||||||
|
hostname: {{ $hostname | quote }}
|
||||||
|
username: {{ $username | quote }}
|
||||||
|
osid: {{ $osid | quote }}
|
||||||
|
|
||||||
|
# Detect if we're on macOS
|
||||||
|
is_macos: {{ eq $osid "darwin" }}
|
||||||
|
|
||||||
|
# Detect if we're on Linux
|
||||||
|
is_linux: {{ eq $osid "linux" }}
|
||||||
|
|
||||||
|
# Host-specific flags
|
||||||
|
is_air: {{ eq $hostname "air" }}
|
||||||
|
is_lakka: {{ eq $hostname "lakka" }}
|
||||||
|
is_tunkki: {{ eq $hostname "tunkki" }}
|
||||||
|
is_s: {{ eq $hostname "s" }}
|
||||||
|
|
||||||
|
# Merge strategy for dealing with conflicts
|
||||||
|
merge:
|
||||||
|
command: "nvim"
|
||||||
|
args:
|
||||||
|
- "-d"
|
||||||
|
- "{{ "{{" }} .Destination {{ "}}" }}"
|
||||||
|
- "{{ "{{" }} .Source {{ "}}" }}"
|
||||||
|
- "{{ "{{" }} .Target {{ "}}" }}"
|
||||||
|
|
||||||
|
# Template options
|
||||||
|
template:
|
||||||
|
options:
|
||||||
|
- "missingkey=error"
|
||||||
|
|
||||||
|
# Diff options
|
||||||
|
diff:
|
||||||
|
exclude:
|
||||||
|
- "scripts"
|
||||||
|
pager: "delta"
|
||||||
|
|
||||||
|
# Git options
|
||||||
|
git:
|
||||||
|
autoCommit: false
|
||||||
|
autoPush: false
|
||||||
|
|
||||||
|
# Hooks
|
||||||
|
hooks:
|
||||||
|
read-source-state:
|
||||||
|
pre:
|
||||||
|
command: ".local/share/chezmoi/.chezmoihooks/pre-read-source-state.sh"
|
||||||
13
.chezmoihooks/pre-read-source-state.sh
Executable file
13
.chezmoihooks/pre-read-source-state.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Pre-read-source-state hook for chezmoi
|
||||||
|
# This runs before chezmoi reads the source state
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DOTFILES="${CHEZMOI_SOURCE_DIR:-$HOME/.local/share/chezmoi}"
|
||||||
|
|
||||||
|
# Update git submodules if they exist
|
||||||
|
if [ -d "$DOTFILES/.git" ]; then
|
||||||
|
cd "$DOTFILES"
|
||||||
|
git submodule update --init --recursive --quiet || true
|
||||||
|
fi
|
||||||
90
.chezmoiignore
Normal file
90
.chezmoiignore
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
# Chezmoi ignore file
|
||||||
|
# Files and directories that should not be managed by chezmoi
|
||||||
|
|
||||||
|
# Git and version control
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.gitattributes
|
||||||
|
.gitmodules
|
||||||
|
|
||||||
|
# GitHub
|
||||||
|
.github/
|
||||||
|
|
||||||
|
# Documentation
|
||||||
|
README.md
|
||||||
|
*.md
|
||||||
|
docs/
|
||||||
|
AGENTS.md
|
||||||
|
|
||||||
|
# Development tools
|
||||||
|
.vscode/
|
||||||
|
.serena/
|
||||||
|
.claude/
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
tests/
|
||||||
|
test-all.sh
|
||||||
|
|
||||||
|
# Configuration files for the repo itself
|
||||||
|
.editorconfig
|
||||||
|
.editorconfig-checker.json
|
||||||
|
.eslintrc.json
|
||||||
|
.prettierrc.js
|
||||||
|
.prettierignore
|
||||||
|
.markdownlint.json
|
||||||
|
.markdownlintignore
|
||||||
|
.mega-linter.yml
|
||||||
|
.commitlintrc.json
|
||||||
|
.releaserc.json
|
||||||
|
.shellcheckrc
|
||||||
|
.yamlignore
|
||||||
|
.yamllint.yml
|
||||||
|
.browserslistrc
|
||||||
|
.actrc
|
||||||
|
.luarc.json
|
||||||
|
.ignore
|
||||||
|
stylua.toml
|
||||||
|
phpcs.xml
|
||||||
|
|
||||||
|
# Package management
|
||||||
|
package.json
|
||||||
|
yarn.lock
|
||||||
|
|
||||||
|
# Python and Node version files
|
||||||
|
.python-version
|
||||||
|
.nvmrc
|
||||||
|
.go-version
|
||||||
|
|
||||||
|
# Dotbot (old system)
|
||||||
|
install.conf.yaml
|
||||||
|
tools/dotbot/
|
||||||
|
tools/dotbot-*/
|
||||||
|
tools/dotbot-defaults.yaml
|
||||||
|
|
||||||
|
# Installation and build scripts in root
|
||||||
|
install
|
||||||
|
add-submodules.sh
|
||||||
|
|
||||||
|
# Chezmoi-specific directories (not to be managed)
|
||||||
|
.chezmoihooks/
|
||||||
|
|
||||||
|
# Host-specific directories (will be handled via templates)
|
||||||
|
{{- if not .is_air }}
|
||||||
|
hosts/air/
|
||||||
|
{{- end }}
|
||||||
|
{{- if not .is_lakka }}
|
||||||
|
hosts/lakka/
|
||||||
|
{{- end }}
|
||||||
|
{{- if not .is_tunkki }}
|
||||||
|
hosts/tunkki/
|
||||||
|
{{- end }}
|
||||||
|
{{- if not .is_s }}
|
||||||
|
hosts/s/
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
# Secrets (should use separate secrets management)
|
||||||
|
secrets/
|
||||||
|
|
||||||
|
# macOS specific files
|
||||||
|
.DS_Store
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"hooks": {
|
|
||||||
"PreToolUse": [
|
|
||||||
{
|
|
||||||
"matcher": "Edit|Write",
|
|
||||||
"hooks": [
|
|
||||||
{
|
|
||||||
"type": "command",
|
|
||||||
"command": "fp=$(cat | jq -r '.tool_input.file_path // empty') && [ -n \"$fp\" ] && case \"$fp\" in */fzf-tmux|*/yarn.lock|*/.yarn/*) echo \"BLOCKED: $fp is a vendor/lock file — do not edit directly\" >&2; exit 2;; esac; exit 0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"PostToolUse": [
|
|
||||||
{
|
|
||||||
"matcher": "Edit|Write",
|
|
||||||
"hooks": [
|
|
||||||
{
|
|
||||||
"type": "command",
|
|
||||||
"command": "fp=$(cat | jq -r '.tool_input.file_path // empty') && [ -n \"$fp\" ] && [ -f \"$fp\" ] && case \"$fp\" in *.sh|*/bin/*) head -1 \"$fp\" | grep -qE '^#!.*(ba)?sh' && command -v shfmt > /dev/null && shfmt -i 2 -bn -ci -sr -fn -w \"$fp\";; esac; exit 0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
---
|
|
||||||
name: shell-validate
|
|
||||||
description: Validate shell scripts after editing. Apply when writing or modifying any shell script in local/bin/ or scripts/.
|
|
||||||
user-invocable: false
|
|
||||||
allowed-tools: Bash, Read, Grep
|
|
||||||
---
|
|
||||||
|
|
||||||
After editing any shell script in `local/bin/`, `scripts/`, or `config/` (files with a `#!` shebang or `# shellcheck shell=` directive), validate it:
|
|
||||||
|
|
||||||
## 1. Determine the shell
|
|
||||||
|
|
||||||
- `/bin/sh` or `#!/usr/bin/env sh` shebang -> POSIX, use `sh -n`
|
|
||||||
- `/bin/bash` or `#!/usr/bin/env bash` shebang -> Bash, use `bash -n`
|
|
||||||
- `# shellcheck shell=bash` directive (no shebang) -> use `bash -n`
|
|
||||||
- `# shellcheck shell=sh` directive (no shebang) -> use `sh -n`
|
|
||||||
- No shebang and no directive -> default to `bash -n`
|
|
||||||
|
|
||||||
## 2. Syntax check
|
|
||||||
|
|
||||||
Run the appropriate syntax checker:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
bash -n <file> # for bash scripts
|
|
||||||
sh -n <file> # for POSIX sh scripts
|
|
||||||
```
|
|
||||||
|
|
||||||
If syntax check fails, fix the issue before proceeding.
|
|
||||||
|
|
||||||
## 3. ShellCheck
|
|
||||||
|
|
||||||
Run `shellcheck <file>`. The project `.shellcheckrc` already disables SC2039, SC2166, SC2154, SC1091, SC2174, SC2016. Only report and fix warnings that are NOT in that exclude list.
|
|
||||||
|
|
||||||
## Key files to never validate (not shell scripts)
|
|
||||||
|
|
||||||
- `local/bin/fzf-tmux` (vendor file)
|
|
||||||
- `*.md` files
|
|
||||||
- `*.bats` test files (Bats, not plain shell)
|
|
||||||
@@ -8,12 +8,8 @@ indent_style = space
|
|||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
[*.py]
|
|
||||||
indent_size = 4
|
|
||||||
max_line_length = 120
|
|
||||||
|
|
||||||
[*.fish]
|
[*.fish]
|
||||||
max_line_length = 120
|
max_line_length = 80
|
||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
max_line_length = 120
|
max_line_length = 120
|
||||||
@@ -53,6 +49,3 @@ ignore = true
|
|||||||
[plan]
|
[plan]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
max_line_length = off
|
max_line_length = off
|
||||||
|
|
||||||
[base/hammerspoon/hammerspoon.types.lua]
|
|
||||||
max_line_length = off
|
|
||||||
|
|||||||
3
.eslintrc.json
Normal file
3
.eslintrc.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": ["@ivuorinen"]
|
||||||
|
}
|
||||||
6
.github/README.md
vendored
6
.github/README.md
vendored
@@ -37,7 +37,7 @@ see what interesting stuff you've done with it. Sharing is caring.
|
|||||||
### Interesting folders
|
### Interesting folders
|
||||||
|
|
||||||
| Path | Description |
|
| Path | Description |
|
||||||
|---------------------|----------------------------------------------|
|
| ------------------- | -------------------------------------------- |
|
||||||
| `.github` | GitHub Repository configuration files, meta. |
|
| `.github` | GitHub Repository configuration files, meta. |
|
||||||
| `hosts/{hostname}/` | Configs that should apply to that host only. |
|
| `hosts/{hostname}/` | Configs that should apply to that host only. |
|
||||||
| `local/bin` | Helper scripts that I've collected or wrote. |
|
| `local/bin` | Helper scripts that I've collected or wrote. |
|
||||||
@@ -52,7 +52,7 @@ is processed by Dotbot during installation.
|
|||||||
### dotfile folders
|
### dotfile folders
|
||||||
|
|
||||||
| Repo | Destination | Description |
|
| Repo | Destination | Description |
|
||||||
|-----------|-------------|---------------------------------------------|
|
| --------- | ----------- | ------------------------------------------- |
|
||||||
| `base/` | `.*` | `$HOME` level files. |
|
| `base/` | `.*` | `$HOME` level files. |
|
||||||
| `config/` | `.config/` | Configurations for applications. |
|
| `config/` | `.config/` | Configurations for applications. |
|
||||||
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
|
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
|
||||||
@@ -86,7 +86,7 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
|
|||||||
### XDG Variables
|
### XDG Variables
|
||||||
|
|
||||||
| Env | Default | Short description |
|
| Env | Default | Short description |
|
||||||
|--------------------|----------------------|------------------------------------------------|
|
| ------------------ | -------------------- | ---------------------------------------------- |
|
||||||
| `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries |
|
| `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries |
|
||||||
| `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs |
|
| `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs |
|
||||||
| `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files |
|
| `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files |
|
||||||
|
|||||||
8
.github/dependabot.yml
vendored
Normal file
8
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
# Maintain dependencies for GitHub Actions
|
||||||
|
- package-ecosystem: 'github-actions'
|
||||||
|
directory: '/'
|
||||||
|
schedule:
|
||||||
|
interval: 'weekly'
|
||||||
8
.github/tag-changelog-config.js
vendored
8
.github/tag-changelog-config.js
vendored
@@ -16,10 +16,10 @@ module.exports = {
|
|||||||
|
|
||||||
excludeTypes: [],
|
excludeTypes: [],
|
||||||
|
|
||||||
renderTypeSection: (label, commits) => {
|
renderTypeSection: function (label, commits) {
|
||||||
let text = `\n## ${label}\n\n`
|
let text = `\n## ${label}\n\n`
|
||||||
|
|
||||||
commits.forEach((commit) => {
|
commits.forEach(commit => {
|
||||||
const scope = commit.scope ? `**${commit.scope}:** ` : ''
|
const scope = commit.scope ? `**${commit.scope}:** ` : ''
|
||||||
text += `- ${scope}${commit.subject}\n`
|
text += `- ${scope}${commit.subject}\n`
|
||||||
})
|
})
|
||||||
@@ -27,10 +27,10 @@ module.exports = {
|
|||||||
return text
|
return text
|
||||||
},
|
},
|
||||||
|
|
||||||
renderChangelog: (release, changes) => {
|
renderChangelog: function (release, changes) {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
const d = now.toISOString().substring(0, 10)
|
const d = now.toISOString().substring(0, 10)
|
||||||
const header = `# ${release} - ${d}\n`
|
const header = `# ${release} - ${d}\n`
|
||||||
return `${header}${changes}\n\n`
|
return header + changes + '\n\n'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
10
.github/workflows/changelog.yml
vendored
10
.github/workflows/changelog.yml
vendored
@@ -9,18 +9,16 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions: read-all
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
debug-changelog:
|
debug-changelog:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions: write-all
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Create changelog text
|
- name: Create changelog text
|
||||||
id: changelog
|
id: changelog
|
||||||
@@ -29,7 +27,7 @@ jobs:
|
|||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
config_file: .github/tag-changelog-config.js
|
config_file: .github/tag-changelog-config.js
|
||||||
|
|
||||||
- name: "Echo results"
|
- name: 'Echo results'
|
||||||
id: output-changelog
|
id: output-changelog
|
||||||
run: |
|
run: |
|
||||||
echo "${{ steps.changelog.outputs.changes }}"
|
echo "${{ steps.changelog.outputs.changes }}"
|
||||||
|
|||||||
9
.github/workflows/linters.yml
vendored
9
.github/workflows/linters.yml
vendored
@@ -11,8 +11,7 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions: read-all
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Linter:
|
Linter:
|
||||||
@@ -28,12 +27,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Yarn Lock Changes
|
- name: Yarn Lock Changes
|
||||||
uses: Simek/yarn-lock-changes@59f47ee499424d2c2437c5aebf863b5c6d50a5bc # v0.14.1
|
uses: Simek/yarn-lock-changes@61d1a0595070b79c1abdc8e1e5a5f5d98b18918c # v0.12.2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Run PR Lint
|
- name: Run PR Lint
|
||||||
uses: ivuorinen/actions/pr-lint@f371da218e9152e7d29ee39358454e41010c36dc # v2026.02.03
|
uses: ivuorinen/actions/pr-lint@ff0ca4bc920c518b2ce2dc20c5e5a6e95f76dee0 # v2025.11.02
|
||||||
|
|||||||
12
.github/workflows/new-release.yml
vendored
12
.github/workflows/new-release.yml
vendored
@@ -5,28 +5,26 @@ name: Release Daily State
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 21 * * *" # 00:00 at Europe/Helsinki
|
- cron: '0 21 * * *' # 00:00 at Europe/Helsinki
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions: read-all
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
new-daily-release:
|
new-daily-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions: write-all
|
||||||
contents: write
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
created: ${{ steps.daily-version.outputs.created }}
|
created: ${{ steps.daily-version.outputs.created }}
|
||||||
version: ${{ steps.daily-version.outputs.version }}
|
version: ${{ steps.daily-version.outputs.version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- name: Create tag if necessary
|
- name: Create tag if necessary
|
||||||
uses: fregante/daily-version-action@fb1a60b7c4daf1410cd755e360ebec3901e58588 # v2.1.3
|
uses: fregante/daily-version-action@fb1a60b7c4daf1410cd755e360ebec3901e58588 # v2.1.3
|
||||||
@@ -42,7 +40,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
if: steps.daily-version.outputs.created
|
if: steps.daily-version.outputs.created
|
||||||
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
|
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag_name: ${{ steps.daily-version.outputs.version }}
|
tag_name: ${{ steps.daily-version.outputs.version }}
|
||||||
|
|||||||
15
.github/workflows/pre-commit-autoupdate.yml
vendored
15
.github/workflows/pre-commit-autoupdate.yml
vendored
@@ -5,15 +5,14 @@ name: Pre-commit autoupdate
|
|||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
# At 04:00 on Monday and Thursday.
|
# At 04:00 on Monday and Thursday.
|
||||||
- cron: "0 4 * * 1,4"
|
- cron: '0 4 * * 1,4'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions: read-all
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-update:
|
auto-update:
|
||||||
@@ -24,16 +23,16 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
||||||
|
|
||||||
- run: pip install pre-commit && pre-commit autoupdate
|
- run: pip install pre-commit && pre-commit autoupdate
|
||||||
|
|
||||||
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
|
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: update/pre-commit-hooks
|
branch: update/pre-commit-hooks
|
||||||
title: "chore: update pre-commit hooks"
|
title: 'chore: update pre-commit hooks'
|
||||||
commit-message: "chore: update pre-commit hooks"
|
commit-message: 'chore: update pre-commit hooks'
|
||||||
body: Update versions of pre-commit hooks to latest version.
|
body: Update versions of pre-commit hooks to latest version.
|
||||||
|
|||||||
3
.github/workflows/semantic-pr.yml
vendored
3
.github/workflows/semantic-pr.yml
vendored
@@ -14,8 +14,7 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions: read-all
|
||||||
pull-requests: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
semantic-pr:
|
semantic-pr:
|
||||||
|
|||||||
7
.github/workflows/sync-labels.yml
vendored
7
.github/workflows/sync-labels.yml
vendored
@@ -11,7 +11,7 @@ on:
|
|||||||
- .github/workflows/sync-labels.yml
|
- .github/workflows/sync-labels.yml
|
||||||
- .github/labels.yml
|
- .github/labels.yml
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "34 5 * * *"
|
- cron: '34 5 * * *'
|
||||||
workflow_call:
|
workflow_call:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
@@ -19,8 +19,7 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions: read-all
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
SyncLabels:
|
SyncLabels:
|
||||||
@@ -30,4 +29,4 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: ivuorinen/actions/sync-labels@f371da218e9152e7d29ee39358454e41010c36dc # v2026.02.03
|
- uses: ivuorinen/actions/sync-labels@ff0ca4bc920c518b2ce2dc20c5e5a6e95f76dee0 # v2025.11.02
|
||||||
|
|||||||
10
.github/workflows/update-submodules.yml
vendored
10
.github/workflows/update-submodules.yml
vendored
@@ -5,26 +5,24 @@ name: Update submodules
|
|||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
# At 04:00 on Monday and Thursday.
|
# At 04:00 on Monday and Thursday.
|
||||||
- cron: "0 4 * * 1"
|
- cron: '0 4 * * 1'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions: read-all
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-submodules:
|
update-submodules:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions: write-all
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -11,7 +11,6 @@
|
|||||||
.nfs*
|
.nfs*
|
||||||
.scannerwork
|
.scannerwork
|
||||||
.vscode
|
.vscode
|
||||||
.yarn/
|
|
||||||
!config/git/local.d/.gitkeep
|
!config/git/local.d/.gitkeep
|
||||||
!config/nvim/spell/.gitkeep
|
!config/nvim/spell/.gitkeep
|
||||||
!config/zed/settings.json
|
!config/zed/settings.json
|
||||||
@@ -56,6 +55,4 @@ local/man/yabai.1
|
|||||||
local/share/fonts/*
|
local/share/fonts/*
|
||||||
lock
|
lock
|
||||||
node_modules
|
node_modules
|
||||||
__pycache__
|
|
||||||
ssh/local.d/*
|
ssh/local.d/*
|
||||||
config/fish/fish_variables*
|
|
||||||
|
|||||||
32
.gitmodules
vendored
32
.gitmodules
vendored
@@ -4,6 +4,11 @@
|
|||||||
url = https://github.com/anishathalye/dotbot.git
|
url = https://github.com/anishathalye/dotbot.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "dotbot-brew"]
|
||||||
|
path = tools/dotbot-brew
|
||||||
|
url = https://github.com/wren/dotbot-brew.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
[submodule "dotbot-include"]
|
[submodule "dotbot-include"]
|
||||||
path = tools/dotbot-include
|
path = tools/dotbot-include
|
||||||
url = https://gitlab.com/gnfzdz/dotbot-include.git
|
url = https://gitlab.com/gnfzdz/dotbot-include.git
|
||||||
@@ -19,16 +24,41 @@
|
|||||||
url = https://github.com/tmux-plugins/tmux-continuum
|
url = https://github.com/tmux-plugins/tmux-continuum
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "tmux/tmux-sensible"]
|
||||||
|
path = config/tmux/plugins/tmux-sensible
|
||||||
|
url = https://github.com/tmux-plugins/tmux-sensible.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
[submodule "tmux/tmux-sessionist"]
|
[submodule "tmux/tmux-sessionist"]
|
||||||
path = config/tmux/plugins/tmux-sessionist
|
path = config/tmux/plugins/tmux-sessionist
|
||||||
url = https://github.com/tmux-plugins/tmux-sessionist.git
|
url = https://github.com/tmux-plugins/tmux-sessionist.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "tmux/tmux-yank"]
|
||||||
|
path = config/tmux/plugins/tmux-yank
|
||||||
|
url = https://github.com/tmux-plugins/tmux-yank.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "tmux/tmux-window-name"]
|
||||||
|
path = config/tmux/plugins/tmux-window-name
|
||||||
|
url = https://github.com/ivuorinen/tmux-window-name.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "dotbot-pip"]
|
||||||
|
path = tools/dotbot-pip
|
||||||
|
url = https://github.com/sobolevn/dotbot-pip.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
[submodule "tmux/tmux-suspend"]
|
[submodule "tmux/tmux-suspend"]
|
||||||
path = config/tmux/plugins/tmux-suspend
|
path = config/tmux/plugins/tmux-suspend
|
||||||
url = https://github.com/MunifTanjim/tmux-suspend.git
|
url = https://github.com/MunifTanjim/tmux-suspend.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "tmux/tmux-mode-indicator"]
|
||||||
|
path = config/tmux/plugins/tmux-mode-indicator
|
||||||
|
url = https://github.com/MunifTanjim/tmux-mode-indicator.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
[submodule "tmux/tmux-current-pane-hostname"]
|
[submodule "tmux/tmux-current-pane-hostname"]
|
||||||
path = config/tmux/plugins/tmux-current-pane-hostname
|
path = config/tmux/plugins/tmux-current-pane-hostname
|
||||||
url = https://github.com/soyuka/tmux-current-pane-hostname.git
|
url = https://github.com/soyuka/tmux-current-pane-hostname.git
|
||||||
@@ -53,8 +83,6 @@
|
|||||||
[submodule "tmux/tmux-resurrect"]
|
[submodule "tmux/tmux-resurrect"]
|
||||||
path = config/tmux/plugins/tmux-resurrect
|
path = config/tmux/plugins/tmux-resurrect
|
||||||
url = https://github.com/tmux-plugins/tmux-resurrect.git
|
url = https://github.com/tmux-plugins/tmux-resurrect.git
|
||||||
ignore = dirty
|
|
||||||
[submodule "tmux/catppuccin"]
|
[submodule "tmux/catppuccin"]
|
||||||
path = config/tmux/plugins/catppuccin
|
path = config/tmux/plugins/catppuccin
|
||||||
url = https://github.com/catppuccin/tmux.git
|
url = https://github.com/catppuccin/tmux.git
|
||||||
ignore = dirty
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.25.5
|
1.25.3
|
||||||
|
|||||||
1
.ignore
1
.ignore
@@ -6,5 +6,6 @@ config/tmux/plugins/**
|
|||||||
config/vim/plugged/**
|
config/vim/plugged/**
|
||||||
node_modules
|
node_modules
|
||||||
tools/antidote/**
|
tools/antidote/**
|
||||||
|
tools/dotbot-brew/**
|
||||||
tools/dotbot-include/**
|
tools/dotbot-include/**
|
||||||
tools/dotbot/**
|
tools/dotbot/**
|
||||||
|
|||||||
19
.markdownlint.json
Normal file
19
.markdownlint.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"extends": "@ivuorinen/markdownlint-config",
|
||||||
|
"code-block-style": {
|
||||||
|
"style": "fenced"
|
||||||
|
},
|
||||||
|
"code-fence-style": {
|
||||||
|
"style": "backtick"
|
||||||
|
},
|
||||||
|
"heading-style": {
|
||||||
|
"style": "atx"
|
||||||
|
},
|
||||||
|
"no-duplicate-heading": {
|
||||||
|
"siblings_only": true
|
||||||
|
},
|
||||||
|
"required-headings": false,
|
||||||
|
"ul-style": {
|
||||||
|
"style": "dash"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,21 +9,19 @@ VALIDATE_ALL_CODEBASE: true
|
|||||||
FILEIO_REPORTER: false # Generate file.io report
|
FILEIO_REPORTER: false # Generate file.io report
|
||||||
GITHUB_STATUS_REPORTER: true # Generate GitHub status report
|
GITHUB_STATUS_REPORTER: true # Generate GitHub status report
|
||||||
IGNORE_GENERATED_FILES: true # Ignore generated files
|
IGNORE_GENERATED_FILES: true # Ignore generated files
|
||||||
|
JAVASCRIPT_DEFAULT_STYLE: prettier # Default style for JavaScript
|
||||||
PRINT_ALPACA: false # Print Alpaca logo in console
|
PRINT_ALPACA: false # Print Alpaca logo in console
|
||||||
SARIF_REPORTER: true # Generate SARIF report
|
SARIF_REPORTER: true # Generate SARIF report
|
||||||
SHOW_SKIPPED_LINTERS: false # Show skipped linters in MegaLinter log
|
SHOW_SKIPPED_LINTERS: false # Show skipped linters in MegaLinter log
|
||||||
|
TYPESCRIPT_DEFAULT_STYLE: prettier # Default style for TypeScript
|
||||||
DISABLE_LINTERS:
|
DISABLE_LINTERS:
|
||||||
- REPOSITORY_DEVSKIM
|
- REPOSITORY_DEVSKIM
|
||||||
- JAVASCRIPT_ES # using biome
|
- JAVASCRIPT_ES
|
||||||
- JAVASCRIPT_PRETTIER # using biome
|
|
||||||
- TYPESCRIPT_PRETTIER # using biome
|
|
||||||
- JSON_PRETTIER # using biome
|
|
||||||
- PYTHON_BLACK # using ruff
|
|
||||||
- PYTHON_FLAKE8 # using ruff
|
|
||||||
- PYTHON_PYLINT # using ruff
|
|
||||||
- PYTHON_ISORT # using ruff (I rules)
|
|
||||||
YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml
|
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
|
REPOSITORY_GIT_DIFF_DISABLE_ERRORS: true
|
||||||
BASH_SHFMT_ARGUMENTS: -i 2 -bn -ci -sr -fn
|
|
||||||
FILTER_REGEX_EXCLUDE: >
|
FILTER_REGEX_EXCLUDE: >
|
||||||
(node_modules|tools|config/cheat/cheatsheets/community|config/cheat/cheatsheets/tldr|config/fzf|config/zsh|config/tmux/plugins)
|
(node_modules|tools|config/cheat/cheatsheets/community|config/cheat/cheatsheets/tldr|config/fzf|config/zsh|config/tmux/plugins)
|
||||||
|
|
||||||
|
|||||||
@@ -20,35 +20,22 @@ repos:
|
|||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
args: [--fix=auto]
|
args: [--fix=auto]
|
||||||
|
- id: pretty-format-json
|
||||||
|
args: [--autofix, --no-sort-keys]
|
||||||
|
|
||||||
- repo: local
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||||
|
rev: v0.45.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: biome-check
|
- id: markdownlint
|
||||||
name: Biome Check
|
args: [-c, .markdownlint.json, --fix]
|
||||||
entry: yarn biome check --write --files-ignore-unknown=true --no-errors-on-unmatched
|
|
||||||
language: system
|
|
||||||
files: \.(js|ts|jsx|tsx|json|md)$
|
|
||||||
- id: markdown-table-formatter
|
|
||||||
name: Markdown Table Formatter
|
|
||||||
entry: yarn markdown-table-formatter
|
|
||||||
language: system
|
|
||||||
types: [markdown]
|
|
||||||
|
|
||||||
- repo: https://github.com/adrienverge/yamllint
|
- repo: https://github.com/adrienverge/yamllint
|
||||||
rev: v1.38.0
|
rev: v1.37.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: yamllint
|
- id: yamllint
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
- repo: https://github.com/koalaman/shellcheck-precommit
|
||||||
rev: v4.0.0-alpha.8
|
rev: v0.11.0
|
||||||
hooks:
|
|
||||||
- id: prettier
|
|
||||||
types_or: [yaml]
|
|
||||||
additional_dependencies:
|
|
||||||
- prettier@3.8.1
|
|
||||||
|
|
||||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
||||||
rev: v0.11.0.1
|
|
||||||
hooks:
|
hooks:
|
||||||
- id: shellcheck
|
- id: shellcheck
|
||||||
|
|
||||||
@@ -56,28 +43,24 @@ repos:
|
|||||||
rev: v3.12.0-2
|
rev: v3.12.0-2
|
||||||
hooks:
|
hooks:
|
||||||
- id: shfmt
|
- id: shfmt
|
||||||
args: [-i, "2", -bn, -ci, -sr, -fn, -w]
|
|
||||||
|
|
||||||
- repo: https://github.com/rhysd/actionlint
|
- repo: https://github.com/rhysd/actionlint
|
||||||
rev: v1.7.10
|
rev: v1.7.8
|
||||||
hooks:
|
hooks:
|
||||||
- id: actionlint
|
- id: actionlint
|
||||||
|
|
||||||
|
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||||
|
rev: 42.2.0
|
||||||
|
hooks:
|
||||||
|
- id: renovate-config-validator
|
||||||
|
|
||||||
- repo: https://github.com/JohnnyMorganz/StyLua
|
- repo: https://github.com/JohnnyMorganz/StyLua
|
||||||
rev: v2.3.1
|
rev: v2.3.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: stylua # or stylua-system / stylua-github
|
- id: stylua # or stylua-system / stylua-github
|
||||||
exclude: hammerspoon\.types\.lua$
|
|
||||||
|
|
||||||
- repo: https://github.com/hugoh/pre-commit-fish.git
|
- repo: https://github.com/hugoh/pre-commit-fish.git
|
||||||
rev: v1.2
|
rev: v1.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: fish_syntax
|
- id: fish_syntax
|
||||||
- id: fish_indent
|
- id: fish_indent
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
||||||
rev: v0.15.0
|
|
||||||
hooks:
|
|
||||||
- id: ruff-check
|
|
||||||
args: [--fix]
|
|
||||||
- id: ruff-format
|
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
node_modules
|
# vim: ft=gitignore
|
||||||
.yarn
|
.mypy_cache/*
|
||||||
.pnp.*
|
|
||||||
.mypy_cache
|
|
||||||
Brewfile.lock.json
|
Brewfile.lock.json
|
||||||
lazy-lock.json
|
base/plan
|
||||||
config/cheat/cheatsheets/community
|
config/cheat/cheatsheets/community
|
||||||
config/cheat/cheatsheets/tldr
|
config/cheat/cheatsheets/tldr
|
||||||
config/fzf
|
config/fzf/*
|
||||||
config/nvim
|
config/nvim/*
|
||||||
config/op/plugins/used_plugins
|
config/op/plugins/used_plugins/*
|
||||||
config/tmux/plugins
|
config/tmux/plugins/*
|
||||||
config/vim/plugged
|
config/zsh/*
|
||||||
config/zsh
|
lazy-lock.json
|
||||||
local/bin/antigen.zsh
|
local/bin/antigen.zsh
|
||||||
local/bin/asdf
|
local/bin/asdf
|
||||||
tools
|
tools/antidote/*
|
||||||
docs/plans
|
tools/dotbot*
|
||||||
|
|||||||
15
.prettierrc.js
Normal file
15
.prettierrc.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
module.exports = {
|
||||||
|
...require('@ivuorinen/prettier-config'),
|
||||||
|
trailingComma: 'all',
|
||||||
|
// Add custom options below:
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: '*.md',
|
||||||
|
options: {
|
||||||
|
printWidth: 120,
|
||||||
|
proseWrap: 'preserve',
|
||||||
|
tabWidth: 2,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://json.schemastore.org/prettierrc",
|
|
||||||
"printWidth": 200,
|
|
||||||
"tabWidth": 2,
|
|
||||||
"useTabs": false,
|
|
||||||
"endOfLine": "lf",
|
|
||||||
"singleQuote": false,
|
|
||||||
"proseWrap": "preserve"
|
|
||||||
}
|
|
||||||
@@ -1 +1 @@
|
|||||||
3.14.3
|
3.14.0
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ ignore_all_files_in_gitignore: true
|
|||||||
# Was previously called `ignored_dirs`, please update your config if you are using that.
|
# Was previously called `ignored_dirs`, please update your config if you are using that.
|
||||||
# Added (renamed) on 2025-04-07
|
# Added (renamed) on 2025-04-07
|
||||||
ignored_paths:
|
ignored_paths:
|
||||||
- "*.swp"
|
- '*.swp'
|
||||||
- "*.tmp"
|
- '*.tmp'
|
||||||
- "*.tmp.*"
|
- '*.tmp.*'
|
||||||
- ".DS_Store"
|
- '.DS_Store'
|
||||||
- ".git/**"
|
- '.git/**'
|
||||||
- /config/cheat/cheatsheets/community/**
|
- /config/cheat/cheatsheets/community/**
|
||||||
- /config/cheat/cheatsheets/pure-bash-bible/**
|
- /config/cheat/cheatsheets/pure-bash-bible/**
|
||||||
- /config/cheat/cheatsheets/tldr/**
|
- /config/cheat/cheatsheets/tldr/**
|
||||||
@@ -85,6 +85,6 @@ excluded_tools: []
|
|||||||
|
|
||||||
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
||||||
# (contrary to the memories, which are loaded on demand).
|
# (contrary to the memories, which are loaded on demand).
|
||||||
initial_prompt: ""
|
initial_prompt: ''
|
||||||
|
|
||||||
project_name: ".dotfiles"
|
project_name: '.dotfiles'
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"sonarCloudOrganization": "ivuorinen",
|
|
||||||
"projectKey": "ivuorinen_dotfiles",
|
|
||||||
"region": "EU"
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
nodeLinker: node-modules
|
|
||||||
157
CLAUDE.md
157
CLAUDE.md
@@ -1,157 +0,0 @@
|
|||||||
# CLAUDE.md
|
|
||||||
|
|
||||||
This file provides guidance to Claude Code (claude.ai/code)
|
|
||||||
when working with code in this repository.
|
|
||||||
|
|
||||||
## Repository Overview
|
|
||||||
|
|
||||||
Personal dotfiles repository for Ismo Vuorinen.
|
|
||||||
Uses **Dotbot** (not GNU Stow) to symlink configuration files into place.
|
|
||||||
The directory layout follows the XDG Base Directory Specification.
|
|
||||||
|
|
||||||
## Directory Layout and Linking
|
|
||||||
|
|
||||||
| Source | Destination | Notes |
|
|
||||||
|---------------------|-------------------|-------------------------------------------|
|
|
||||||
| `base/*` | `~/.*` | Home-level dotfiles (`.` added by Dotbot) |
|
|
||||||
| `config/*` | `~/.config/` | Application configurations |
|
|
||||||
| `local/bin/*` | `~/.local/bin/` | Helper scripts and utilities |
|
|
||||||
| `local/share/*` | `~/.local/share/` | Data files |
|
|
||||||
| `local/man/**` | `~/.local/man/` | Manual pages |
|
|
||||||
| `ssh/*` | `~/.ssh/` | SSH configuration (mode 0600) |
|
|
||||||
| `hosts/<hostname>/` | Overlays | Host-specific overrides |
|
|
||||||
|
|
||||||
Installation: `./install` runs Dotbot with `install.conf.yaml`,
|
|
||||||
then applies `hosts/<hostname>/install.conf.yaml` if it exists.
|
|
||||||
|
|
||||||
## Commands
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Install dependencies (required before lint/test)
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
# Linting
|
|
||||||
yarn lint # Run biome + prettier + editorconfig-checker
|
|
||||||
yarn lint:biome # Biome only
|
|
||||||
yarn lint:ec # EditorConfig checker only
|
|
||||||
yarn lint:md-table # Markdown table formatting check
|
|
||||||
yarn fix:md-table # Auto-fix markdown tables
|
|
||||||
|
|
||||||
# Formatting
|
|
||||||
yarn fix:biome # Autofix with biome (JS/TS/JSON/MD)
|
|
||||||
yarn fix:prettier # Autofix with prettier (YAML)
|
|
||||||
yarn format # Format with biome
|
|
||||||
yarn format:yaml # Format YAML files with prettier
|
|
||||||
|
|
||||||
# Testing (Bats - Bash Automated Testing System)
|
|
||||||
yarn test # Run all tests in tests/
|
|
||||||
# Run a single test file:
|
|
||||||
./node_modules/.bin/bats tests/dfm.bats
|
|
||||||
|
|
||||||
# Shell linting
|
|
||||||
shellcheck <script> # Lint shell scripts
|
|
||||||
```
|
|
||||||
|
|
||||||
## Pre-commit Hooks
|
|
||||||
|
|
||||||
Configured in `.pre-commit-config.yaml`: shellcheck, shfmt, biome,
|
|
||||||
yamllint, prettier, actionlint, stylua, fish_syntax/fish_indent.
|
|
||||||
Run `pre-commit run --all-files` to check everything.
|
|
||||||
|
|
||||||
## Commit Convention
|
|
||||||
|
|
||||||
Semantic Commit messages: `type(scope): summary`
|
|
||||||
(e.g., `fix(tmux): correct prefix binding`).
|
|
||||||
Enforced by commitlint extending `@ivuorinen/commitlint-config`.
|
|
||||||
|
|
||||||
## Architecture
|
|
||||||
|
|
||||||
### Shell Configuration Chain
|
|
||||||
|
|
||||||
Both `base/bashrc` and `base/zshrc` source `config/shared.sh`,
|
|
||||||
which loads:
|
|
||||||
- `config/exports` — environment variables, XDG dirs, PATH
|
|
||||||
- `config/alias` — shell aliases
|
|
||||||
|
|
||||||
Zsh additionally uses **antidote** (in `tools/antidote/`)
|
|
||||||
for plugin management and **oh-my-posh** for the prompt.
|
|
||||||
|
|
||||||
### msgr — Messaging Helper
|
|
||||||
|
|
||||||
`local/bin/msgr` provides colored output functions (`msgr msg`,
|
|
||||||
`msgr run`, `msgr yay`, `msgr err`, `msgr warn`). Sourced by `dfm`
|
|
||||||
and most scripts in `local/bin/`.
|
|
||||||
|
|
||||||
### dfm — Dotfiles Manager
|
|
||||||
|
|
||||||
`local/bin/dfm` is the main management script. Key commands:
|
|
||||||
- `dfm install all` — install everything in tiered stages
|
|
||||||
- `dfm brew install` / `dfm brew update` — Homebrew management
|
|
||||||
- `dfm apt upkeep` — APT package maintenance (Debian/Ubuntu)
|
|
||||||
- `dfm dotfiles fmt` / `dfm dotfiles shfmt` — format configs/scripts
|
|
||||||
- `dfm helpers <name>` — inspect aliases, colors, env, functions, path
|
|
||||||
- `dfm docs all` — regenerate documentation under `docs/`
|
|
||||||
- `dfm check arch` / `dfm check host` — system info
|
|
||||||
- `dfm scripts` — run scripts from `scripts/` (discovered via `@description` tags)
|
|
||||||
- `dfm tests` — test visualization helpers
|
|
||||||
|
|
||||||
### Submodules
|
|
||||||
|
|
||||||
External dependencies are git submodules (Dotbot, plugins,
|
|
||||||
tmux plugins, cheatsheets, antidote).
|
|
||||||
Managed by `add-submodules.sh`. All set to `ignore = dirty`.
|
|
||||||
Updated automatically via GitHub Actions on a schedule.
|
|
||||||
|
|
||||||
### Host-specific Configs
|
|
||||||
|
|
||||||
Machine-specific overrides live in `hosts/<hostname>/`
|
|
||||||
with their own `base/`, `config/`, and `install.conf.yaml`.
|
|
||||||
These are layered on top of the global config during installation.
|
|
||||||
|
|
||||||
## Code Style
|
|
||||||
|
|
||||||
- **EditorConfig**: 2-space indent, UTF-8, LF line endings.
|
|
||||||
See `.editorconfig` for per-filetype overrides
|
|
||||||
(4-space for PHP/fish, tabs for git config).
|
|
||||||
- **Shell scripts**: Must have a shebang or
|
|
||||||
`# shellcheck shell=bash` directive.
|
|
||||||
Follow shfmt settings in `.editorconfig`
|
|
||||||
(2-space indent, `binary_next_line`,
|
|
||||||
`switch_case_indent`, `space_redirects`, `function_next_line`).
|
|
||||||
- **Lua** (neovim config): Formatted with stylua (`stylua.toml`),
|
|
||||||
90-char line length.
|
|
||||||
- **JSON/JS/TS/Markdown**: Formatted with Biome (`biome.json`),
|
|
||||||
80-char width.
|
|
||||||
- **YAML**: Formatted with Prettier (`.prettierrc.json`),
|
|
||||||
validated with yamllint (`.yamllint.yml`).
|
|
||||||
|
|
||||||
## ShellCheck Disabled Rules
|
|
||||||
|
|
||||||
Defined in `.shellcheckrc`:
|
|
||||||
SC2039 (POSIX `local`), SC2166 (`-o` in test),
|
|
||||||
SC2154 (unassigned variables), SC1091 (source following),
|
|
||||||
SC2174 (mkdir -p -m), SC2016 (single-quote expressions).
|
|
||||||
|
|
||||||
## Gotchas
|
|
||||||
|
|
||||||
- **POSIX scripts**: `x-ssh-audit`, `x-codeql`, `x-until-error`,
|
|
||||||
`x-until-success`, `x-ssl-expiry-date` use `/bin/sh`.
|
|
||||||
Validate with `sh -n`, not `bash -n`.
|
|
||||||
- **Vendor file**: `local/bin/fzf-tmux` is vendored from
|
|
||||||
junegunn/fzf — do not modify.
|
|
||||||
- **Fish config**: `config/fish/` has its own config chain
|
|
||||||
(`config.fish`, `exports.fish`, `alias.fish`) plus 80+ functions.
|
|
||||||
- **Python**: Two scripts (`x-compare-versions.py`,
|
|
||||||
`x-git-largest-files.py`) linted by Ruff (config in `pyproject.toml`).
|
|
||||||
|
|
||||||
## Claude Code Configuration
|
|
||||||
|
|
||||||
- **Hooks** (`.claude/settings.json`):
|
|
||||||
- *PreToolUse*: Blocks edits to `fzf-tmux`, `yarn.lock`, `.yarn/`
|
|
||||||
- *PostToolUse*: Auto-runs `shfmt` on shell scripts after Edit/Write
|
|
||||||
- **Skills** (`.claude/skills/`):
|
|
||||||
- `shell-validate`: Auto-validates shell scripts (syntax + shellcheck)
|
|
||||||
|
|
||||||
## Package Manager
|
|
||||||
|
|
||||||
Yarn (v4.12.0) is the package manager. Do not use npm.
|
|
||||||
@@ -5,8 +5,12 @@ git submodule sync --recursive
|
|||||||
# dotbot and plugins
|
# dotbot and plugins
|
||||||
git submodule add --name dotbot \
|
git submodule add --name dotbot \
|
||||||
-f https://github.com/anishathalye/dotbot.git tools/dotbot
|
-f https://github.com/anishathalye/dotbot.git tools/dotbot
|
||||||
|
git submodule add --name dotbot-brew \
|
||||||
|
-f https://github.com/wren/dotbot-brew.git tools/dotbot-brew
|
||||||
git submodule add --name dotbot-include \
|
git submodule add --name dotbot-include \
|
||||||
-f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include
|
-f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include
|
||||||
|
git submodule add --name dotbot-pip \
|
||||||
|
-f https://github.com/sobolevn/dotbot-pip.git tools/dotbot-pip
|
||||||
|
|
||||||
# other repos
|
# other repos
|
||||||
git submodule add --name cheat-community \
|
git submodule add --name cheat-community \
|
||||||
@@ -20,12 +24,20 @@ git submodule add --name antidote \
|
|||||||
# tmux plugin manager and plugins
|
# tmux plugin manager and plugins
|
||||||
git submodule add --name tmux/tmux-continuum \
|
git submodule add --name tmux/tmux-continuum \
|
||||||
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
|
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
|
||||||
|
git submodule add --name tmux/tmux-mode-indicator \
|
||||||
|
-f https://github.com/MunifTanjim/tmux-mode-indicator.git config/tmux/plugins/tmux-mode-indicator
|
||||||
git submodule add --name tmux/tmux-resurrect \
|
git submodule add --name tmux/tmux-resurrect \
|
||||||
-f https://github.com/tmux-plugins/tmux-resurrect.git config/tmux/plugins/tmux-resurrect
|
-f https://github.com/tmux-plugins/tmux-resurrect.git config/tmux/plugins/tmux-resurrect
|
||||||
|
git submodule add --name tmux/tmux-sensible \
|
||||||
|
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
|
||||||
git submodule add --name tmux/tmux-sessionist \
|
git submodule add --name tmux/tmux-sessionist \
|
||||||
-f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist
|
-f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist
|
||||||
git submodule add --name tmux/tmux-suspend \
|
git submodule add --name tmux/tmux-suspend \
|
||||||
-f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/tmux-suspend
|
-f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/tmux-suspend
|
||||||
|
git submodule add --name tmux/tmux-window-name \
|
||||||
|
-f https://github.com/ivuorinen/tmux-window-name.git config/tmux/plugins/tmux-window-name
|
||||||
|
git submodule add --name tmux/tmux-yank \
|
||||||
|
-f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank
|
||||||
git submodule add --name tmux/tmux-current-pane-hostname \
|
git submodule add --name tmux/tmux-current-pane-hostname \
|
||||||
-f https://github.com/soyuka/tmux-current-pane-hostname.git config/tmux/plugins/tmux-current-pane-hostname
|
-f https://github.com/soyuka/tmux-current-pane-hostname.git config/tmux/plugins/tmux-current-pane-hostname
|
||||||
git submodule add --name tmux/tmux-dark-notify \
|
git submodule add --name tmux/tmux-dark-notify \
|
||||||
@@ -42,70 +54,21 @@ done
|
|||||||
# Mark certain repositories shallow
|
# Mark certain repositories shallow
|
||||||
git config -f .gitmodules submodule.antidote.shallow true
|
git config -f .gitmodules submodule.antidote.shallow true
|
||||||
|
|
||||||
# Log a message using msgr if available, else echo
|
# remove old submodules
|
||||||
_log()
|
folders=(
|
||||||
{
|
"config/tmux/plugins/tpm"
|
||||||
local msg="$1"
|
"config/tmux/plugins/tmux"
|
||||||
if command -v msgr > /dev/null 2>&1; then
|
"config/tmux/plugins/tmux-menus"
|
||||||
msgr run_done "$msg"
|
"tools/dotbot-crontab"
|
||||||
else
|
"tools/dotbot-snap"
|
||||||
echo " [ok] $msg"
|
"config/nvim-kickstart"
|
||||||
fi
|
"local/bin/asdf"
|
||||||
return 0
|
"local/asdf"
|
||||||
}
|
"tools/dotbot-asdf"
|
||||||
|
|
||||||
# Remove a stale git submodule and clean up references
|
|
||||||
remove_old_submodule()
|
|
||||||
{
|
|
||||||
local name="$1" path="$2"
|
|
||||||
|
|
||||||
# Remove working tree
|
|
||||||
if [[ -d "$path" ]]; then
|
|
||||||
rm -rf "$path"
|
|
||||||
_log "Removed $path"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove stale git index entry
|
|
||||||
git rm --cached "$path" 2> /dev/null || true
|
|
||||||
|
|
||||||
# Remove .git/config section keyed by path
|
|
||||||
git config --remove-section "submodule.$path" 2> /dev/null || true
|
|
||||||
|
|
||||||
# Skip name-based cleanup if no submodule name provided
|
|
||||||
[[ -z "$name" ]] && return 0
|
|
||||||
|
|
||||||
# Remove .git/config section keyed by name
|
|
||||||
git config --remove-section "submodule.$name" 2> /dev/null || true
|
|
||||||
|
|
||||||
# Remove .git/modules/<name>/ cached repository
|
|
||||||
if [[ -d ".git/modules/$name" ]]; then
|
|
||||||
rm -rf ".git/modules/$name"
|
|
||||||
_log "Removed .git/modules/$name"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# remove old submodules (name:path pairs)
|
|
||||||
old_submodules=(
|
|
||||||
"tmux/tpm:config/tmux/plugins/tpm"
|
|
||||||
":config/tmux/plugins/tmux"
|
|
||||||
"tmux/tmux-menus:config/tmux/plugins/tmux-menus"
|
|
||||||
"dotbot-crontab:tools/dotbot-crontab"
|
|
||||||
"dotbot-snap:tools/dotbot-snap"
|
|
||||||
"tmux/tmux-window-name:config/tmux/plugins/tmux-window-name"
|
|
||||||
"tmux/tmux-sensible:config/tmux/plugins/tmux-sensible"
|
|
||||||
"tmux/tmux-mode-indicator:config/tmux/plugins/tmux-mode-indicator"
|
|
||||||
"tmux/tmux-yank:config/tmux/plugins/tmux-yank"
|
|
||||||
":config/tmux/plugins/tmux-fzf-url"
|
|
||||||
"nvim-kickstart:config/nvim-kickstart"
|
|
||||||
"asdf:local/bin/asdf"
|
|
||||||
"asdf:local/asdf"
|
|
||||||
"dotbot-asdf:tools/dotbot-asdf"
|
|
||||||
"dotbot-pip:tools/dotbot-pip"
|
|
||||||
"dotbot-brew:tools/dotbot-brew"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for entry in "${old_submodules[@]}"; do
|
for folder in "${folders[@]}"; do
|
||||||
name="${entry%%:*}"
|
[ -d "$folder" ] \
|
||||||
path="${entry#*:}"
|
&& rm -rf "$folder" \
|
||||||
remove_old_submodule "$name" "$path"
|
&& msgr run_done "Removed old submodule $folder"
|
||||||
done
|
done
|
||||||
|
|||||||
10
base/bashrc
10
base/bashrc
@@ -2,17 +2,20 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
export DOTFILES="$HOME/.dotfiles"
|
export DOTFILES="$HOME/.dotfiles"
|
||||||
# Minimal PATH for x-have and utilities; full PATH set in shared.sh/exports
|
|
||||||
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$PATH"
|
||||||
export SHARED_SCRIPTS_SOURCED=0
|
export SHARED_SCRIPTS_SOURCED=0
|
||||||
|
|
||||||
source "$DOTFILES/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
|
||||||
|
if [ -n "${GHOSTTY_RESOURCES_DIR}" ]; then
|
||||||
|
builtin source "${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash"
|
||||||
|
fi
|
||||||
|
|
||||||
# shellcheck source=../config/fzf/fzf.bash
|
# shellcheck source=../config/fzf/fzf.bash
|
||||||
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] &&
|
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] &&
|
||||||
source "${DOTFILES}/config/fzf/fzf.bash"
|
source "${DOTFILES}/config/fzf/fzf.bash"
|
||||||
|
|
||||||
# Import ssh keys in keychain (macOS-specific -A flag, silently fails on Linux)
|
# Import ssh keys in keychain
|
||||||
ssh-add -A 2>/dev/null
|
ssh-add -A 2>/dev/null
|
||||||
|
|
||||||
x-have antidot && {
|
x-have antidot && {
|
||||||
@@ -22,3 +25,6 @@ x-have antidot && {
|
|||||||
PROMPT_DIRTRIM=3
|
PROMPT_DIRTRIM=3
|
||||||
PROMPT_COMMAND='PS1_CMD1=$(git branch --show-current 2>/dev/null)'
|
PROMPT_COMMAND='PS1_CMD1=$(git branch --show-current 2>/dev/null)'
|
||||||
PS1='\[\e[95m\]\u\[\e[0m\]@\[\e[38;5;22;2m\]\h\[\e[0m\] \[\e[38;5;33m\]\w\[\e[0m\] \[\e[92;2m\]${PS1_CMD1}\n\[\e[39m\]➜\[\e[0m\] '
|
PS1='\[\e[95m\]\u\[\e[0m\]@\[\e[38;5;22;2m\]\h\[\e[0m\] \[\e[38;5;33m\]\w\[\e[0m\] \[\e[92;2m\]${PS1_CMD1}\n\[\e[39m\]➜\[\e[0m\] '
|
||||||
|
|
||||||
|
# Added by LM Studio CLI (lms)
|
||||||
|
export PATH="$PATH:$HOME/.lmstudio/bin"
|
||||||
|
|||||||
1
base/envrc
Normal file
1
base/envrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
use node
|
||||||
@@ -2,14 +2,14 @@
|
|||||||
-- These globals can be set and accessed:
|
-- These globals can be set and accessed:
|
||||||
--
|
--
|
||||||
globals = {
|
globals = {
|
||||||
"rawrequire",
|
"rawrequire",
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
-- These globals can only be accessed:
|
-- These globals can only be accessed:
|
||||||
--
|
--
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"hs",
|
"hs",
|
||||||
"ls",
|
"ls",
|
||||||
"spoon",
|
"spoon",
|
||||||
}
|
}
|
||||||
|
|||||||
1010
base/hammerspoon/generate-hammerspoon-types.py
Executable file
1010
base/hammerspoon/generate-hammerspoon-types.py
Executable file
File diff suppressed because it is too large
Load Diff
17863
base/hammerspoon/hammerspoon.types.lua
Normal file
17863
base/hammerspoon/hammerspoon.types.lua
Normal file
File diff suppressed because it is too large
Load Diff
@@ -193,12 +193,11 @@ end)
|
|||||||
|
|
||||||
-- Paste 1Password secret with Meh + P
|
-- Paste 1Password secret with Meh + P
|
||||||
f18:bind({}, 'p', function()
|
f18:bind({}, 'p', function()
|
||||||
local output, status =
|
local output, status = hs.execute('op read "op://Svea/3hzhctmvovbwlgulv7mgy25rf4/login-input"', true)
|
||||||
hs.execute('op read "op://Svea/3hzhctmvovbwlgulv7mgy25rf4/login-input"', true)
|
|
||||||
if status then
|
if status then
|
||||||
hs.eventtap.keyStrokes(output:gsub('%s+$', '')) -- trim trailing whitespace
|
hs.eventtap.keyStrokes(output:gsub('%s+$', '')) -- trim trailing whitespace
|
||||||
else
|
else
|
||||||
hs.alert.show '1Password CLI error'
|
hs.alert.show('1Password CLI error')
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
33
base/zshrc
33
base/zshrc
@@ -7,13 +7,18 @@
|
|||||||
autoload -U promptinit; promptinit
|
autoload -U promptinit; promptinit
|
||||||
|
|
||||||
export DOTFILES="$HOME/.dotfiles"
|
export DOTFILES="$HOME/.dotfiles"
|
||||||
# Minimal PATH for x-have and utilities; full PATH set in shared.sh/exports
|
LOCAL_SHARE="$HOME/.local/share"
|
||||||
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$LOCAL_SHARE/nvim/mason/bin:$LOCAL_SHARE/bob/nvim-bin:$LOCAL_SHARE/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
||||||
export SHARED_SCRIPTS_SOURCED=0
|
export SHARED_SCRIPTS_SOURCED=0
|
||||||
|
|
||||||
source "$DOTFILES/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
|
|
||||||
# zsh completions directory (ZSH_CUSTOM_COMPLETION_PATH set in shared.sh)
|
# zsh completions directory
|
||||||
|
[ -z "$ZSH_COMPLETIONS" ] && export ZSH_COMPLETIONS="$XDG_CONFIG_HOME/zsh/completion"
|
||||||
|
|
||||||
|
# Add zsh completions to FPATH, compinit will be called later
|
||||||
|
FPATH="$ZSH_COMPLETIONS:$FPATH"
|
||||||
|
|
||||||
ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
||||||
|
|
||||||
source "$DOTFILES/config/zsh/antidote.zsh"
|
source "$DOTFILES/config/zsh/antidote.zsh"
|
||||||
@@ -28,13 +33,33 @@ source_fzf_config()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to set up tmux window name plugin if tmux is active
|
||||||
|
setup_tmux_window_name_plugin()
|
||||||
|
{
|
||||||
|
if [[ -n "$TMUX" ]]; then
|
||||||
|
local tmux_window_name_plugin="$TMUX_PLUGINS/tmux-window-name/scripts/rename_session_windows.py"
|
||||||
|
if [[ -f "$tmux_window_name_plugin" ]]; then
|
||||||
|
tmux_window_name()
|
||||||
|
{
|
||||||
|
($tmux_window_name_plugin &)
|
||||||
|
}
|
||||||
|
add-zsh-hook chpwd tmux_window_name
|
||||||
|
tmux_window_name
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
source_fzf_config
|
source_fzf_config
|
||||||
|
setup_tmux_window_name_plugin
|
||||||
x-have antidot && eval "$(antidot init)"
|
x-have antidot && eval "$(antidot init)"
|
||||||
|
|
||||||
autoload -Uz compinit bashcompinit
|
autoload -Uz compinit bashcompinit
|
||||||
compinit -d "$ZSH_COMPDUMP"
|
compinit -d $ZSH_COMPDUMP
|
||||||
bashcompinit
|
bashcompinit
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
export P10K_CONFIG="$DOTFILES/config/zsh/p10k.zsh"
|
export P10K_CONFIG="$DOTFILES/config/zsh/p10k.zsh"
|
||||||
[[ ! -f "$P10K_CONFIG" ]] || source "$P10K_CONFIG"
|
[[ ! -f "$P10K_CONFIG" ]] || source "$P10K_CONFIG"
|
||||||
|
|
||||||
|
# Added by LM Studio CLI (lms)
|
||||||
|
export PATH="$PATH:$HOME/.lmstudio/bin"
|
||||||
|
|||||||
103
biome.json
103
biome.json
@@ -1,103 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
|
|
||||||
"vcs": {
|
|
||||||
"enabled": true,
|
|
||||||
"clientKind": "git",
|
|
||||||
"useIgnoreFile": true,
|
|
||||||
"defaultBranch": "main"
|
|
||||||
},
|
|
||||||
"files": {
|
|
||||||
"ignoreUnknown": true,
|
|
||||||
"includes": [
|
|
||||||
"**",
|
|
||||||
"!!**/.mypy_cache",
|
|
||||||
"!!**/Brewfile.lock.json",
|
|
||||||
"!!**/base/plan",
|
|
||||||
"!!**/config/cheat/cheatsheets/community",
|
|
||||||
"!!**/config/cheat/cheatsheets/tldr",
|
|
||||||
"!!**/config/fzf",
|
|
||||||
"!!**/config/nvim",
|
|
||||||
"!!**/config/op/plugins/used_plugins",
|
|
||||||
"!!**/config/tmux/plugins",
|
|
||||||
"!!**/config/zsh",
|
|
||||||
"!!**/config/vim",
|
|
||||||
"!!**/lazy-lock.json",
|
|
||||||
"!!**/local/bin/antigen.zsh",
|
|
||||||
"!!**/local/bin/asdf",
|
|
||||||
"!!**/tools/antidote",
|
|
||||||
"!!**/tools/dotbot",
|
|
||||||
"!!**/node_modules"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"formatter": {
|
|
||||||
"enabled": true,
|
|
||||||
"formatWithErrors": false,
|
|
||||||
"indentStyle": "space",
|
|
||||||
"indentWidth": 2,
|
|
||||||
"lineEnding": "lf",
|
|
||||||
"lineWidth": 80
|
|
||||||
},
|
|
||||||
"linter": {
|
|
||||||
"enabled": true,
|
|
||||||
"rules": {
|
|
||||||
"recommended": true,
|
|
||||||
"correctness": {
|
|
||||||
"noUnusedVariables": "warn",
|
|
||||||
"noUnusedImports": "warn"
|
|
||||||
},
|
|
||||||
"style": {
|
|
||||||
"useConst": "warn",
|
|
||||||
"useTemplate": "warn"
|
|
||||||
},
|
|
||||||
"suspicious": {
|
|
||||||
"noExplicitAny": "warn",
|
|
||||||
"noConsole": "off"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"javascript": {
|
|
||||||
"formatter": {
|
|
||||||
"enabled": true,
|
|
||||||
"quoteStyle": "single",
|
|
||||||
"jsxQuoteStyle": "double",
|
|
||||||
"trailingCommas": "all",
|
|
||||||
"semicolons": "asNeeded",
|
|
||||||
"arrowParentheses": "always",
|
|
||||||
"bracketSpacing": true,
|
|
||||||
"bracketSameLine": false,
|
|
||||||
"quoteProperties": "asNeeded",
|
|
||||||
"indentStyle": "space",
|
|
||||||
"indentWidth": 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"json": {
|
|
||||||
"parser": {
|
|
||||||
"allowComments": true,
|
|
||||||
"allowTrailingCommas": false
|
|
||||||
},
|
|
||||||
"formatter": {
|
|
||||||
"enabled": true,
|
|
||||||
"indentStyle": "space",
|
|
||||||
"indentWidth": 2,
|
|
||||||
"lineWidth": 80
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"includes": ["*.md", "*.mdx"],
|
|
||||||
"formatter": {
|
|
||||||
"enabled": true,
|
|
||||||
"lineWidth": 120
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"includes": ["package.json"],
|
|
||||||
"json": {
|
|
||||||
"formatter": {
|
|
||||||
"enabled": true,
|
|
||||||
"indentWidth": 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
251
config/aerospace/aerospace.toml
Normal file
251
config/aerospace/aerospace.toml
Normal file
@@ -0,0 +1,251 @@
|
|||||||
|
# Start AeroSpace at login
|
||||||
|
start-at-login = false
|
||||||
|
|
||||||
|
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
|
||||||
|
enable-normalization-flatten-containers = true
|
||||||
|
enable-normalization-opposite-orientation-for-nested-containers = true
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
|
||||||
|
# The 'accordion-padding' specifies the size of accordion padding
|
||||||
|
# You can set 0 to disable the padding feature
|
||||||
|
accordion-padding = 10
|
||||||
|
|
||||||
|
# Possible values: tiles|accordion
|
||||||
|
default-root-container-layout = 'tiles'
|
||||||
|
|
||||||
|
# Possible values: horizontal|vertical|auto
|
||||||
|
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
|
||||||
|
# tall monitor (anything higher than wide) gets vertical orientation
|
||||||
|
default-root-container-orientation = 'auto'
|
||||||
|
|
||||||
|
# Mouse follows focus when focused monitor changes
|
||||||
|
# Drop it from your config, if you don't like this behavior
|
||||||
|
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
|
||||||
|
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
|
||||||
|
# Fallback value (if you omit the key): on-focused-monitor-changed = []
|
||||||
|
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
|
||||||
|
|
||||||
|
# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
|
||||||
|
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
|
||||||
|
# Also see: https://nikitabobko.github.io/AeroSpace/goodness#disable-hide-app
|
||||||
|
automatically-unhide-macos-hidden-apps = true
|
||||||
|
|
||||||
|
# [[on-window-detected]]
|
||||||
|
# if.app-id = 'com.apple.systempreferences'
|
||||||
|
# if.app-name-regex-substring = 'settings'
|
||||||
|
# if.window-title-regex-substring = 'substring'
|
||||||
|
# if.workspace = 'workspace-name'
|
||||||
|
# if.during-aerospace-startup = true
|
||||||
|
# check-further-callbacks = true
|
||||||
|
# run = ['layout floating', 'move-node-to-workspace S'] # The callback itself
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-name-regex-substring = 'settings' # All settings
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.apple.systempreferences' # macOS System Preferences
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.1password.1password' # 1Password
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'org.ferdium.ferdium-app' # Ferdium, has WhatsApp etc.
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.jetbrains.PhpStorm' # PhpStorm
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.apple.finder' # Finder
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.apple.Preview' # Preview
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.apple.mail' # Mail
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.DanPristupov.Fork' # Fork
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.flexibits.fantastical2.mac' # Fantastical
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'org.whispersystems.signal-desktop' # Signal
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.tidal.desktop' # TIDAL
|
||||||
|
run = ['layout floating', 'move-node-to-workspace 2'] # Float and move to workspace 2
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.apple.TV' # Apple TV app
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.setapp.DesktopClient' # Setapp
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.electron.dockerdesktop' # Docker Desktop
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.tinyspeck.slackmacgap' # Slack
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'md.obsidia' # Obsidian
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.todoist.mac.Todoist' # Todoist
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.apple.backup.launcher' # TimeMachine
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.philipyoungg.session-setapp' # Session app (Setapp)
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.microsoft.rdc.macos' # Remote Desktop
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
# Possible values: (qwerty|dvorak)
|
||||||
|
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
||||||
|
[key-mapping]
|
||||||
|
preset = 'qwerty'
|
||||||
|
|
||||||
|
# Gaps between windows (inner-*) and between monitor edges (outer-*).
|
||||||
|
# Possible values:
|
||||||
|
# - Constant: gaps.outer.top = 8
|
||||||
|
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
|
||||||
|
# In this example, 24 is a default value when there is no match.
|
||||||
|
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
|
||||||
|
[gaps]
|
||||||
|
inner.horizontal = 5
|
||||||
|
inner.vertical = 5
|
||||||
|
outer.top = [{ monitor.'^built-in retina display$' = 0 }, 0]
|
||||||
|
outer.right = 0
|
||||||
|
outer.bottom = 0
|
||||||
|
outer.left = 0
|
||||||
|
|
||||||
|
# 'main' binding mode declaration
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
||||||
|
# 'main' binding mode must be always presented
|
||||||
|
# Fallback value (if you omit the key): mode.main.binding = {}
|
||||||
|
[mode.main.binding]
|
||||||
|
|
||||||
|
cmd-h = [] # Disable "hide application"
|
||||||
|
cmd-alt-h = [] # Disable "hide others"
|
||||||
|
|
||||||
|
# All possible keys:
|
||||||
|
# - Letters. a, b, c, ..., z
|
||||||
|
# - Numbers. 0, 1, 2, ..., 9
|
||||||
|
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
|
||||||
|
# - F-keys. f1, f2, ..., f20
|
||||||
|
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
|
||||||
|
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
|
||||||
|
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
|
||||||
|
# keypadMinus, keypadMultiply, keypadPlus
|
||||||
|
# - Arrows. left, down, up, right
|
||||||
|
|
||||||
|
# All possible modifiers: cmd, alt, ctrl, shift
|
||||||
|
|
||||||
|
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
|
||||||
|
# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3)
|
||||||
|
# alt-enter = '''exec-and-forget osascript -e '
|
||||||
|
# tell application "Terminal"
|
||||||
|
# do script
|
||||||
|
# activate
|
||||||
|
# end tell'
|
||||||
|
# '''
|
||||||
|
|
||||||
|
# alt-cmd-shift-f = 'fullscreen'
|
||||||
|
# alt-shift-f = 'layout floating'
|
||||||
|
# alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
|
||||||
|
alt-h = 'focus left'
|
||||||
|
alt-j = 'focus down'
|
||||||
|
alt-k = 'focus up'
|
||||||
|
alt-l = 'focus right'
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
||||||
|
alt-shift-1 = 'workspace 1' # Main
|
||||||
|
alt-shift-2 = 'workspace 2' # Media
|
||||||
|
ctrl-shift-1 = 'move-node-to-workspace 1' # Move node to Main
|
||||||
|
ctrl-shift-2 = 'move-node-to-workspace 2' # Move node to Media
|
||||||
|
|
||||||
|
alt-shift-tab = 'workspace-back-and-forth' # Switch between workspaces
|
||||||
|
ctrl-shift-tab = 'move-workspace-to-monitor --wrap-around prev'
|
||||||
|
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
||||||
|
alt-a = 'mode apps'
|
||||||
|
alt-s = 'mode service'
|
||||||
|
alt-m = 'mode move'
|
||||||
|
|
||||||
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
|
# │ alt-m │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
[mode.move.binding]
|
||||||
|
esc = ['reload-config', 'mode main']
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
||||||
|
1 = ['move-node-to-workspace 1 --focus-follows-window']
|
||||||
|
2 = ['move-node-to-workspace 2 --focus-follows-window']
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#move
|
||||||
|
h = 'move left'
|
||||||
|
j = 'move down'
|
||||||
|
k = 'move up'
|
||||||
|
l = 'move right'
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#join-with
|
||||||
|
shift-h = 'join-with left'
|
||||||
|
shift-j = 'join-with down'
|
||||||
|
shift-k = 'join-with up'
|
||||||
|
shift-l = 'join-with right'
|
||||||
|
# https://nikitabobko.github.io/AeroSpace/commands#resize
|
||||||
|
ctrl-h = 'resize smart -70'
|
||||||
|
ctrl-l = 'resize smart +70'
|
||||||
|
shift-left = 'resize smart +70'
|
||||||
|
shift-right = 'resize smart -70'
|
||||||
|
# https://nikitabobko.github.io/AeroSpace/commands#flatten-workspace-tree
|
||||||
|
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
||||||
|
|
||||||
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
|
# │ alt-a │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
[mode.apps.binding]
|
||||||
|
esc = ['reload-config', 'mode main']
|
||||||
|
b = ['exec-and-forget open -a /Applications/Brave Browser.app', 'mode main'] # Browser
|
||||||
|
c = ['exec-and-forget open -a /Applications/Ferdium.app', 'mode main'] # Chat
|
||||||
|
g = ['exec-and-forget open -a /Applications/Ghostty.app', 'mode main'] # Ghostty
|
||||||
|
o = ['exec-and-forget open -a /Applications/Obsidian.app', 'mode main'] # Obsidian
|
||||||
|
s = ['exec-and-forget open -a /Applications/Slack.app', 'mode main'] # Slack
|
||||||
|
t = ['exec-and-forget open -a /Applications/TIDAL.app', 'mode main'] # Tidal
|
||||||
|
w = ['exec-and-forget open -a /Applications/WezTerm.app', 'mode main'] # WezTerm
|
||||||
|
|
||||||
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
|
# │ alt-s │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
[mode.service.binding]
|
||||||
|
esc = ['reload-config', 'mode main'] # reload config
|
||||||
|
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
||||||
|
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
|
||||||
|
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
|
||||||
|
backspace = ['close-all-windows-but-current', 'mode main']
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
import = [
|
||||||
|
# Default to night if the copied one doesn't exist.
|
||||||
|
"~/.dotfiles/config/alacritty/theme-night.toml",
|
||||||
|
"~/.config/alacritty/theme-active.toml"
|
||||||
|
]
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
TERM = "xterm-256color"
|
TERM = "xterm-256color"
|
||||||
@@ -45,10 +50,3 @@ lines = 75
|
|||||||
[window.padding]
|
[window.padding]
|
||||||
x = 5
|
x = 5
|
||||||
y = 5
|
y = 5
|
||||||
|
|
||||||
[general]
|
|
||||||
import = [
|
|
||||||
# Default to night if the copied one doesn't exist.
|
|
||||||
"~/.dotfiles/config/alacritty/theme-night.toml",
|
|
||||||
"~/.config/alacritty/theme-active.toml"
|
|
||||||
]
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ x-have eza && {
|
|||||||
alias ls="eza -h -s=type --git --icons --group-directories-first"
|
alias ls="eza -h -s=type --git --icons --group-directories-first"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alias vim='vim -u "$XDG_CONFIG_HOME/vim/vimrc"'
|
||||||
|
|
||||||
# Easier navigation: .., ..., ....
|
# Easier navigation: .., ..., ....
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
alias ...="cd ../.."
|
alias ...="cd ../.."
|
||||||
|
|||||||
@@ -93,13 +93,13 @@ expand-main:
|
|||||||
# Note that not all layouts respond to this command.
|
# Note that not all layouts respond to this command.
|
||||||
increase-main:
|
increase-main:
|
||||||
mod: mod1
|
mod: mod1
|
||||||
key: ","
|
key: ','
|
||||||
|
|
||||||
# Decrease the number of windows in the main pane.
|
# Decrease the number of windows in the main pane.
|
||||||
# Note that not all layouts respond to this command.
|
# Note that not all layouts respond to this command.
|
||||||
decrease-main:
|
decrease-main:
|
||||||
mod: mod1
|
mod: mod1
|
||||||
key: "."
|
key: '.'
|
||||||
|
|
||||||
# General purpose command for custom layouts.
|
# General purpose command for custom layouts.
|
||||||
# Functionality is layout-dependent.
|
# Functionality is layout-dependent.
|
||||||
|
|||||||
@@ -6,19 +6,21 @@
|
|||||||
*
|
*
|
||||||
* @param {Object} windows - All windows in the current space.
|
* @param {Object} windows - All windows in the current space.
|
||||||
* @param {Object} screenFrame - The frame of the current screen.
|
* @param {Object} screenFrame - The frame of the current screen.
|
||||||
|
* @param {Object} state - The state of the current space.
|
||||||
|
* @param {Object} extendedFrames - The frames of the windows in the current space.
|
||||||
* @return {Object} - The frames for the windows in the current space.
|
* @return {Object} - The frames for the windows in the current space.
|
||||||
*/
|
*/
|
||||||
function layout() {
|
function layout() {
|
||||||
return {
|
return {
|
||||||
name: 'Almost Maximize',
|
name: 'Almost Maximize',
|
||||||
getFrameAssignments: (windows, screenFrame) => {
|
getFrameAssignments: (windows, screenFrame, state, extendedFrames) => {
|
||||||
const width = screenFrame.width * 0.95
|
const width = screenFrame.width * 0.95
|
||||||
const height = screenFrame.height * 0.95
|
const height = screenFrame.height * 0.95
|
||||||
const x = (screenFrame.width - width) / 2
|
const x = (screenFrame.width - width) / 2
|
||||||
const y = (screenFrame.height - height) / 2
|
const y = (screenFrame.height - height) / 2
|
||||||
const windowFrames = {}
|
const windowFrames = {}
|
||||||
|
|
||||||
windows.forEach((window) => {
|
windows.forEach(window => {
|
||||||
windowFrames[window.id] = {
|
windowFrames[window.id] = {
|
||||||
Y: screenFrame.y + y,
|
Y: screenFrame.y + y,
|
||||||
x: screenFrame.x + x,
|
x: screenFrame.x + x,
|
||||||
@@ -31,5 +33,3 @@ function layout() {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = layout()
|
|
||||||
|
|||||||
15
config/aqua/aqua.yaml
Normal file
15
config/aqua/aqua.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/aqua-yaml.json
|
||||||
|
# aqua - Declarative CLI Version Manager
|
||||||
|
# https://aquaproj.github.io/
|
||||||
|
# checksum:
|
||||||
|
# enabled: true
|
||||||
|
# require_checksum: true
|
||||||
|
# supported_envs:
|
||||||
|
# - all
|
||||||
|
registries:
|
||||||
|
- type: standard
|
||||||
|
ref: v4.346.0 # renovate: depName=aquaproj/aqua-registry
|
||||||
|
packages:
|
||||||
|
- name: cli/cli
|
||||||
|
version: 'v2.69.0'
|
||||||
5
config/asdf/asdfrc
Normal file
5
config/asdf/asdfrc
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# See the docs for explanations: https://asdf-vm.com/manage/configuration.html
|
||||||
|
|
||||||
|
legacy_version_file=yes
|
||||||
|
use_release_candidates=no
|
||||||
|
concurrency=auto
|
||||||
27
config/asdf/cargo-packages
Normal file
27
config/asdf/cargo-packages
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
// A cargo subcommand for checking and applying
|
||||||
|
// updates to installed executables
|
||||||
|
cargo-update
|
||||||
|
// Cargo cache management utility
|
||||||
|
cargo-cache
|
||||||
|
// An incremental parsing system for programming tools
|
||||||
|
tree-sitter-cli
|
||||||
|
// a subprocess caching utility
|
||||||
|
bkt
|
||||||
|
// a structural diff that understands syntax
|
||||||
|
difftastic
|
||||||
|
// A simple, fast and user-friendly alternative to 'find'
|
||||||
|
fd-find
|
||||||
|
// recursively searches directories for a
|
||||||
|
// regex pattern while respecting your gitignore
|
||||||
|
ripgrep
|
||||||
|
// A version manager for neovim
|
||||||
|
bob-nvim
|
||||||
|
// bottom, btm - A cross-platform graphical process/system monitor with
|
||||||
|
// a customizable interface and a multitude of features.
|
||||||
|
bottom
|
||||||
|
// A modern alternative to ls
|
||||||
|
eza
|
||||||
|
// Tmux Sessionizer: A tool for opening git repositories as tmux sessions
|
||||||
|
tmux-sessionizer
|
||||||
|
// zoxide, a smarter cd command
|
||||||
|
zoxide
|
||||||
1
config/asdf/gem-packages
Normal file
1
config/asdf/gem-packages
Normal file
@@ -0,0 +1 @@
|
|||||||
|
bundler
|
||||||
27
config/asdf/golang-packages
Normal file
27
config/asdf/golang-packages
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
// These are golang packages I use,
|
||||||
|
// so they should be available with all versions
|
||||||
|
|
||||||
|
// Git Profile allows you to switch between user profiles in git repos
|
||||||
|
github.com/dotzero/git-profile@latest
|
||||||
|
// An extensible command line tool or library to format yaml files.
|
||||||
|
github.com/google/yamlfmt/cmd/yamlfmt@latest
|
||||||
|
// Parsing HTML at the command line
|
||||||
|
github.com/ericchiang/pup@latest
|
||||||
|
// HTML to Markdown converter
|
||||||
|
github.com/suntong/html2md@latest
|
||||||
|
// cheat allows you to create and view interactive cheatsheets on the cli.
|
||||||
|
github.com/cheat/cheat/cmd/cheat@latest
|
||||||
|
// Render markdown on the CLI, with pizzazz! 💅
|
||||||
|
github.com/charmbracelet/glow@latest
|
||||||
|
// Static checker for GitHub Actions workflow files
|
||||||
|
github.com/rhysd/actionlint/cmd/actionlint@latest
|
||||||
|
// Cleans up your $HOME from those pesky dotfiles
|
||||||
|
github.com/doron-cohen/antidot@latest
|
||||||
|
// FZF is a general-purpose command-line fuzzy finder.
|
||||||
|
github.com/junegunn/fzf@latest
|
||||||
|
// gopls, the Go language server
|
||||||
|
golang.org/x/tools/gopls@latest
|
||||||
|
// A language for writing HTML user interfaces in Go.
|
||||||
|
github.com/a-h/templ/cmd/templ@latest
|
||||||
|
// A terminal session manager
|
||||||
|
github.com/joshmedeski/sesh/v2@latest
|
||||||
7
config/asdf/npm-packages
Normal file
7
config/asdf/npm-packages
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
blade-formatter
|
||||||
|
corepack
|
||||||
|
editorconfig-checker
|
||||||
|
github-release-notes
|
||||||
|
neovim
|
||||||
|
npm
|
||||||
|
stylelint-lsp
|
||||||
20
config/asdf/plugin-versions
Normal file
20
config/asdf/plugin-versions
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
1password-cli https://github.com/NeoHsu/asdf-1password-cli.git f5d5aab
|
||||||
|
age https://github.com/threkk/asdf-age.git 396bdf6
|
||||||
|
asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git b5862c1
|
||||||
|
direnv https://github.com/asdf-community/asdf-direnv.git 6ff3dbe
|
||||||
|
dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53
|
||||||
|
editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5
|
||||||
|
fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0
|
||||||
|
github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7
|
||||||
|
golang https://github.com/asdf-community/asdf-golang.git e2527a3
|
||||||
|
hadolint https://github.com/devlincashman/asdf-hadolint.git c8eb88b
|
||||||
|
kubectl https://github.com/asdf-community/asdf-kubectl.git 2fb3b57
|
||||||
|
pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git 26bfc42
|
||||||
|
ripgrep https://gitlab.com/wt0f/asdf-ripgrep.git e836665
|
||||||
|
rust https://github.com/code-lever/asdf-rust.git 95acf4f
|
||||||
|
shellcheck https://github.com/luizm/asdf-shellcheck.git 66200ff
|
||||||
|
shfmt https://github.com/luizm/asdf-shfmt.git a42c5ff
|
||||||
|
terragrunt https://github.com/ohmer/asdf-terragrunt.git 29f2935
|
||||||
|
tf-summarize https://github.com/adamcrews/asdf-tf-summarize.git 880ad26
|
||||||
|
yamllint https://github.com/ericcornelissen/asdf-yamllint.git e4cfb17
|
||||||
|
yq https://github.com/sudermanjr/asdf-yq.git 772992f
|
||||||
4
config/asdf/python-packages
Normal file
4
config/asdf/python-packages
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
ansible
|
||||||
|
pipenv
|
||||||
|
neovim
|
||||||
|
libtmux
|
||||||
12
config/direnv/direnv.toml
Normal file
12
config/direnv/direnv.toml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[global]
|
||||||
|
disable_stdin = false
|
||||||
|
load_dotenv = true
|
||||||
|
hide_env_diff = false
|
||||||
|
|
||||||
|
[whitelist]
|
||||||
|
prefix = [
|
||||||
|
"~/Code/"
|
||||||
|
]
|
||||||
|
exact = [
|
||||||
|
"~/.dotfiles/.envrc"
|
||||||
|
]
|
||||||
6
config/direnv/lib/use_asdf.sh
Normal file
6
config/direnv/lib/use_asdf.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
### Do not edit. This was autogenerated by 'asdf direnv setup' ###
|
||||||
|
# shellcheck shell=bash
|
||||||
|
use_asdf()
|
||||||
|
{
|
||||||
|
source_env "$(asdf direnv envrc "$@")"
|
||||||
|
}
|
||||||
@@ -4,15 +4,15 @@
|
|||||||
|
|
||||||
# Set XDG directories if not already set
|
# Set XDG directories if not already set
|
||||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
[ -z "${XDG_CONFIG_HOME:-}" ] && export XDG_CONFIG_HOME="$HOME/.config"
|
[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
[ -z "${XDG_DATA_HOME:-}" ] && export XDG_DATA_HOME="$HOME/.local/share"
|
[ -z "$XDG_DATA_HOME" ] && export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
[ -z "${XDG_CACHE_HOME:-}" ] && export XDG_CACHE_HOME="$HOME/.cache"
|
[ -z "$XDG_CACHE_HOME" ] && export XDG_CACHE_HOME="$HOME/.cache"
|
||||||
[ -z "${XDG_STATE_HOME:-}" ] && export XDG_STATE_HOME="$HOME/.local/state"
|
[ -z "$XDG_STATE_HOME" ] && export XDG_STATE_HOME="$HOME/.local/state"
|
||||||
[ -z "${XDG_BIN_HOME:-}" ] && export XDG_BIN_HOME="$HOME/.local/bin"
|
[ -z "$XDG_BIN_HOME" ] && export XDG_BIN_HOME="$HOME/.local/bin"
|
||||||
[ -z "${XDG_RUNTIME_DIR:-}" ] && export XDG_RUNTIME_DIR="$HOME/.local/run"
|
[ -z "$XDG_RUNTIME_DIR" ] && export XDG_RUNTIME_DIR="$HOME/.local/run"
|
||||||
|
|
||||||
# if DOTFILES is not set, set it to the default location
|
# if DOTFILES is not set, set it to the default location
|
||||||
[ -z "${DOTFILES:-}" ] && export DOTFILES="$HOME/.dotfiles"
|
[ -z "$DOTFILES" ] && export DOTFILES="$HOME/.dotfiles"
|
||||||
|
|
||||||
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
||||||
|
|
||||||
@@ -150,7 +150,6 @@ commit()
|
|||||||
git commit -a -m "$commitMessage"
|
git commit -a -m "$commitMessage"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run Laravel scheduler in a loop
|
|
||||||
scheduler()
|
scheduler()
|
||||||
{
|
{
|
||||||
while :; do
|
while :; do
|
||||||
@@ -283,8 +282,7 @@ export LESSHISTFILE="$XDG_STATE_HOME"/less/history
|
|||||||
export MANPAGER="less -X"
|
export MANPAGER="less -X"
|
||||||
|
|
||||||
# Always enable colored `grep` output
|
# Always enable colored `grep` output
|
||||||
# Note: GREP_OPTIONS is deprecated since GNU grep 2.21
|
export GREP_OPTIONS="--color=auto"
|
||||||
# Color is handled via alias in config/alias
|
|
||||||
|
|
||||||
# check the window size after each command and, if necessary,
|
# check the window size after each command and, if necessary,
|
||||||
# update the values of LINES and COLUMNS.
|
# update the values of LINES and COLUMNS.
|
||||||
@@ -350,6 +348,12 @@ export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
|||||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||||
export PATH="$COMPOSER_BIN:$PATH"
|
export PATH="$COMPOSER_BIN:$PATH"
|
||||||
|
|
||||||
|
# direnv, https://direnv.net/
|
||||||
|
# https://direnv.net/docs/hook.html
|
||||||
|
# Set the hook to show the direnv message in a different color
|
||||||
|
# export DIRENV_LOG_FORMAT=$'\033[2mdirenv: %s\033[0m'
|
||||||
|
export DIRENV_LOG_FORMAT=
|
||||||
|
|
||||||
# docker, https://docs.docker.com/engine/reference/commandline/cli/
|
# docker, https://docs.docker.com/engine/reference/commandline/cli/
|
||||||
msg "Setting up Docker configuration"
|
msg "Setting up Docker configuration"
|
||||||
export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
|
export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
|
||||||
@@ -406,6 +410,11 @@ x-have pyenv && eval "$(pyenv init -)"
|
|||||||
msg "Setting up Rust/Cargo configuration"
|
msg "Setting up Rust/Cargo configuration"
|
||||||
export RUST_WITHOUT=rust-docs
|
export RUST_WITHOUT=rust-docs
|
||||||
|
|
||||||
|
# screen
|
||||||
|
# https://www.gnu.org/software/screen/manual/screen.html
|
||||||
|
msg "Setting up screen configuration"
|
||||||
|
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
|
||||||
|
|
||||||
# sonarlint
|
# sonarlint
|
||||||
# https://www.sonarlint.org/
|
# https://www.sonarlint.org/
|
||||||
msg "Setting up Sonarlint configuration"
|
msg "Setting up Sonarlint configuration"
|
||||||
@@ -433,24 +442,23 @@ export ZSH_TMUX_UNICODE=true
|
|||||||
export ZSH_TMUX_AUTOQUIT=false
|
export ZSH_TMUX_AUTOQUIT=false
|
||||||
export ZSH_TMUX_DEFAULT_SESSION_NAME=main
|
export ZSH_TMUX_DEFAULT_SESSION_NAME=main
|
||||||
|
|
||||||
|
# tms, https://github.com/jrmoulton/tmux-sessionizer
|
||||||
|
export TMS_CONFIG_FILE="${XDG_CONFIG_HOME}/tms/config.toml"
|
||||||
|
|
||||||
# wakatime, https://github.com/wakatime/wakatime-cli
|
# wakatime, https://github.com/wakatime/wakatime-cli
|
||||||
msg "Setting up Wakatime configuration"
|
msg "Setting up Wakatime configuration"
|
||||||
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
||||||
x-dc "$WAKATIME_HOME"
|
x-dc "$WAKATIME_HOME"
|
||||||
|
|
||||||
# LM Studio CLI
|
|
||||||
msg "Setting up LM Studio configuration"
|
|
||||||
export PATH="$PATH:$HOME/.lmstudio/bin"
|
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
msg "Setting up miscellaneous configuration"
|
msg "Setting up miscellaneous configuration"
|
||||||
export ZSHZ_DATA="$XDG_STATE_HOME/z"
|
export ZSHZ_DATA="$XDG_STATE_HOME/z"
|
||||||
export CHEAT_USE_FZF=true
|
export CHEAT_USE_FZF=true
|
||||||
export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history"
|
export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history"
|
||||||
|
|
||||||
if [ -f "$XDG_CONFIG_HOME/exports-secret" ]; then source "$XDG_CONFIG_HOME/exports-secret"; fi
|
[ -f "$XDG_CONFIG_HOME/exports-secret" ] && source "$XDG_CONFIG_HOME/exports-secret"
|
||||||
if [ -f "$XDG_CONFIG_HOME/exports-local" ]; then source "$XDG_CONFIG_HOME/exports-local"; fi
|
[ -f "$XDG_CONFIG_HOME/exports-local" ] && source "$XDG_CONFIG_HOME/exports-local"
|
||||||
# shellcheck source=./exports-lakka
|
# shellcheck source=./exports-lakka
|
||||||
if [ -f "$XDG_CONFIG_HOME/exports-$(hostname)" ]; then source "$XDG_CONFIG_HOME/exports-$(hostname)"; fi
|
[ -f "$XDG_CONFIG_HOME/exports-$(hostname)" ] && source "$XDG_CONFIG_HOME/exports-$(hostname)"
|
||||||
# shellcheck source=./exports-lakka-secret
|
# shellcheck source=./exports-lakka-secret
|
||||||
if [ -f "$XDG_CONFIG_HOME/exports-$(hostname)-secret" ]; then source "$XDG_CONFIG_HOME/exports-$(hostname)-secret"; fi
|
[ -f "$XDG_CONFIG_HOME/exports-$(hostname)-secret" ] && source "$XDG_CONFIG_HOME/exports-$(hostname)-secret"
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ fi
|
|||||||
export PATH="$HOME/.local/go/bin:$PATH"
|
export PATH="$HOME/.local/go/bin:$PATH"
|
||||||
|
|
||||||
alias logrotate='/usr/sbin/logrotate -s "$HOME/logs/state"'
|
alias logrotate='/usr/sbin/logrotate -s "$HOME/logs/state"'
|
||||||
|
alias nano='nano -wS -$'
|
||||||
alias gpg=gpg2
|
alias gpg=gpg2
|
||||||
|
|
||||||
ACME_PATH="$HOME/.acme.sh"
|
ACME_PATH="$HOME/.acme.sh"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
# This file is secret and wont be added to the git repo.
|
# This file is secret and wont be added to the git repo.
|
||||||
|
|
||||||
export GITLAB_API_TOKEN=""
|
export GITLAB_API_TOKEN=""
|
||||||
|
|||||||
71
config/fish/completions/app.fish
Normal file
71
config/fish/completions/app.fish
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
# @halostatue/fish-macos/completions/app.fish:v7.0.1
|
||||||
|
|
||||||
|
complete --command app --erase
|
||||||
|
|
||||||
|
complete --command app --arguments bundleid \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Show bundle IDs for macOS apps'
|
||||||
|
|
||||||
|
complete --command app --arguments find \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Find macOS apps by pattern'
|
||||||
|
|
||||||
|
complete --command app --arguments frontmost \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Shows the front-most application'
|
||||||
|
|
||||||
|
complete --command app --arguments icon \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Extracts a MacOS app icon as a png file'
|
||||||
|
|
||||||
|
complete --command app --arguments quit \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Quit macOS apps by pattern'
|
||||||
|
|
||||||
|
for subcommand in bundleid find
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--short-option x --long-option exact --description 'Exact matches only'
|
||||||
|
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--short-option a --long-option all --description 'Show all matches'
|
||||||
|
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--short-option q --long-option quiet --description 'Quiet (show no output)'
|
||||||
|
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--short-option h --long-option help --description 'Help for app '$subcommand
|
||||||
|
end
|
||||||
|
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'bundleid \
|
||||||
|
--short-option s --long-option short --description 'Show only the bundle ID'
|
||||||
|
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'frontmost \
|
||||||
|
--short-option b --long-option bundle-id --description 'Shows the app bundle ID'
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'frontmost \
|
||||||
|
--short-option p --long-option path --description 'Shows the app path'
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'frontmost \
|
||||||
|
--short-option n --long-option name --description 'Shows the app name'
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'frontmost \
|
||||||
|
--short-option P --long-option pid --description 'Shows the PID of the app'
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'frontmost \
|
||||||
|
--short-option a --long-option all --description 'Shows all details'
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'frontmost \
|
||||||
|
--short-option h --long-option help --description 'Help for app 'frontmost
|
||||||
|
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'icon \
|
||||||
|
--short-option x --long-option exact --description 'Exact matches only'
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'icon \
|
||||||
|
--short-option o --long-option output --description 'Extracts to this file or directory' \
|
||||||
|
--force-files
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'icon \
|
||||||
|
--short-option w --long-option width --description 'Uses this pixel width' \
|
||||||
|
--no-files
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'icon \
|
||||||
|
--short-option h --long-option help --description 'Help for app 'icon
|
||||||
|
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'quit \
|
||||||
|
--short-option x --long-option exact --description 'Exact matches only'
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'quit \
|
||||||
|
--short-option r --long-option restart --description 'Restart after quit'
|
||||||
|
complete --command app --condition '__fish_seen_subcommand_from 'quit \
|
||||||
|
--short-option h --long-option help --description 'Help for app 'quit
|
||||||
0
config/fish/completions/docker.fish
Normal file → Executable file
0
config/fish/completions/docker.fish
Normal file → Executable file
70
config/fish/completions/finder.fish
Normal file
70
config/fish/completions/finder.fish
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
# @halostatue/fish-macos/completions/finder.fish:v7.0.1
|
||||||
|
|
||||||
|
complete --command finder --erase
|
||||||
|
|
||||||
|
complete --command finder --arguments track \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Enables Finder PWD tracking'
|
||||||
|
complete --command finder --arguments untrack \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Disables Finder PWD tracking'
|
||||||
|
complete --command finder --arguments pwd \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Prints the path of the Finder window'
|
||||||
|
complete --command finder --arguments cd \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Changes to the path of the Finder window'
|
||||||
|
complete --command finder --arguments pushd \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Pushes to the path of the Finder window'
|
||||||
|
complete --command finder --arguments update \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Updates the Finder to PWD'
|
||||||
|
complete --command finder --arguments list \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Sets Finder to list view with PWD'
|
||||||
|
complete --command finder --arguments icon \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Sets Finder to icon view with PWD'
|
||||||
|
complete --command finder --arguments column \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Sets Finder to column view with PWD'
|
||||||
|
complete --command finder --arguments hidden \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Shows or hides `hidden` files'
|
||||||
|
complete --command finder --arguments desktop-icons \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Shows or hides desktop icons'
|
||||||
|
complete --command finder --arguments clean \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Cleans .DS_Store files'
|
||||||
|
complete --command finder --arguments quarantine \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Works with file quarantine data'
|
||||||
|
complete --command finder --arguments selected \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Print Finder selected files'
|
||||||
|
|
||||||
|
for subcommand in cd clean column desktop-icons hidden icon list pushd pwd quarantine selected track untrack update
|
||||||
|
complete --command finder --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--short-option h --long-option help --description 'Help for finder '$subcommand
|
||||||
|
end
|
||||||
|
|
||||||
|
for subcommand in hidden desktop-icons
|
||||||
|
complete --command finder --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--arguments off --description 'Turns '$subcommand' off'
|
||||||
|
complete --command finder --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--arguments on --description 'Turns '$subcommand' on'
|
||||||
|
complete --command finder --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--arguments toggle --description 'Toggles '$subcommand
|
||||||
|
complete --command finder --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--arguments status --description 'Shows the status of '$subcommand
|
||||||
|
end
|
||||||
|
|
||||||
|
complete --command finder --condition '__fish_seen_subcommand_from 'quarantine \
|
||||||
|
--arguments show --description 'Shows quarantine events'
|
||||||
|
complete --command finder --condition '__fish_seen_subcommand_from 'quarantine \
|
||||||
|
--arguments clear --description 'Clears all quarantine events'
|
||||||
|
complete --command finder --condition '__fish_seen_subcommand_from 'quarantine \
|
||||||
|
--arguments clean --description 'Removes 'quarantine' attributes from files' \
|
||||||
|
--require-parameter --force-files
|
||||||
8
config/fish/completions/fzf_configure_bindings.fish
Normal file
8
config/fish/completions/fzf_configure_bindings.fish
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
complete fzf_configure_bindings --no-files
|
||||||
|
complete fzf_configure_bindings --long help --short h --description "Print help" --condition "not __fish_seen_argument --help -h"
|
||||||
|
complete fzf_configure_bindings --long directory --description "Change the key binding for Search Directory" --condition "not __fish_seen_argument --directory"
|
||||||
|
complete fzf_configure_bindings --long git_log --description "Change the key binding for Search Git Log" --condition "not __fish_seen_argument --git_log"
|
||||||
|
complete fzf_configure_bindings --long git_status --description "Change the key binding for Search Git Status" --condition "not __fish_seen_argument --git_status"
|
||||||
|
complete fzf_configure_bindings --long history --description "Change the key binding for Search History" --condition "not __fish_seen_argument --history"
|
||||||
|
complete fzf_configure_bindings --long processes --description "Change the key binding for Search Processes" --condition "not __fish_seen_argument --processes"
|
||||||
|
complete fzf_configure_bindings --long variables --description "Change the key binding for Search Variables" --condition "not __fish_seen_argument --variables"
|
||||||
1
config/fish/completions/kubectl.fish
Symbolic link
1
config/fish/completions/kubectl.fish
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/kubectl.fish
|
||||||
117
config/fish/completions/mac.fish
Normal file
117
config/fish/completions/mac.fish
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
# @halostatue/fish-macos/completions/mac.fish:v7.0.1
|
||||||
|
|
||||||
|
complete --command mac --erase
|
||||||
|
|
||||||
|
complete --command mac --arguments airdrop \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Changes AirDrop settings'
|
||||||
|
complete --command mac --arguments airport \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Work with AirPort (WiFi) settings'
|
||||||
|
complete --command mac --arguments brightness \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Adjust the screen brightness level'
|
||||||
|
complete --command mac --arguments flushdns \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Flushes DNS'
|
||||||
|
complete --command mac --arguments font-smoothing \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Manages font smoothing settings'
|
||||||
|
complete --command mac --arguments lsclean \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Cleans LaunchServices to remove duplicate Open with... entries'
|
||||||
|
complete --command mac --arguments mail \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Manage various operations of Mail.app'
|
||||||
|
complete --command mac --arguments proxy-icon \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Manage proxy icon appearance delay'
|
||||||
|
complete --command mac --arguments transparency \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Manage UI transparency'
|
||||||
|
complete --command mac --arguments vol \
|
||||||
|
--exclusive --condition __fish_use_subcommand \
|
||||||
|
--description 'Changes Mac volume; accepts 0–100 volume percentage'
|
||||||
|
|
||||||
|
for subcommand in airdrop airport brightness flushdns font-smoothing lsclean mail proxy-icon transparency version vol
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--short-option h --long-option help --description 'Help for mac '$subcommand
|
||||||
|
end
|
||||||
|
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from brightness' \
|
||||||
|
--arguments up --description 'Increases screen brightness'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from brightness' \
|
||||||
|
--arguments down --description 'Decreases screen brightness'
|
||||||
|
|
||||||
|
for subcommand in airdrop proxy-icon transparency
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--arguments on --description 'Enables '$subcommand
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--arguments off --description 'Disables '$subcommand
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--arguments toggle --description 'Toggles '$subcommand
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from '$subcommand \
|
||||||
|
--arguments status --description 'Shows the status of '$subcommand
|
||||||
|
end
|
||||||
|
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'airport \
|
||||||
|
--arguments scan --description 'Shows available networks'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'airport \
|
||||||
|
--arguments ssid --description 'Shows the SSID'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'airport \
|
||||||
|
--arguments password --description 'Gets the current WiFi network password'
|
||||||
|
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'font-smoothing \
|
||||||
|
--arguments on --description 'Enables font smoothing; app IDs can be provided to limit control'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'font-smoothing \
|
||||||
|
--arguments off --description 'Disables font smoothing; app IDs can be provided to limit control'
|
||||||
|
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'mail \
|
||||||
|
--arguments vacuum --description 'Vacuums the Mail.app envelope index'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'mail \
|
||||||
|
--arguments attachments --description 'Sets Mail.app attachment handling' \
|
||||||
|
--require-parameter --no-files
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'attachments \
|
||||||
|
--arguments inline \
|
||||||
|
--description 'Sets Mail.app attachment handling so that they are inline to the message'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'attachments \
|
||||||
|
--arguments icon \
|
||||||
|
--description 'Sets Mail.app attachment handling so that they are icons on the message'
|
||||||
|
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'version \
|
||||||
|
--short-option s --long-option simple --description 'Simple mac version name'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'version \
|
||||||
|
--short-option l --long-option lowercase --description 'Lowercase mac version name'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'version \
|
||||||
|
--short-option f --long-option version --description 'Full version number'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'version \
|
||||||
|
--short-option c --long-option comparable --description 'Simplified comparable version value'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'version \
|
||||||
|
--short-option h --long-option help --description 'Help for mac 'version
|
||||||
|
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments mute --description 'Mutes volume'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments unmute --description 'Unmutes volume'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments show --description 'Shows the current volume'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments 10 --description 'Sets the volume to 10%'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments 20 --description 'Sets the volume to 20%'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments 30 --description 'Sets the volume to 30%'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments 40 --description 'Sets the volume to 40%'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments 50 --description 'Sets the volume to 50%'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments 60 --description 'Sets the volume to 60%'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments 70 --description 'Sets the volume to 70%'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments 80 --description 'Sets the volume to 80%'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments 90 --description 'Sets the volume to 90%'
|
||||||
|
complete --command mac --condition '__fish_seen_subcommand_from 'vol \
|
||||||
|
--arguments 100 --description 'Sets the volume to 100%'
|
||||||
8
config/fish/completions/manp.fish
Normal file
8
config/fish/completions/manp.fish
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# @halostatue/fish-macos/completions/manp.fish:v7.0.1
|
||||||
|
|
||||||
|
complete --command manp --erase
|
||||||
|
complete --command manp --wraps man
|
||||||
|
complete --command manp --exclusive --condition __fish_no_arguments \
|
||||||
|
--short-option h --long-option help --description 'Show help for manp'
|
||||||
|
complete --command manp --exclusive --condition __fish_no_arguments \
|
||||||
|
--long-option clear-cache --description 'Clear the man page PDF cache'
|
||||||
1
config/fish/completions/orbctl.fish
Symbolic link
1
config/fish/completions/orbctl.fish
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/orbctl.fish
|
||||||
@@ -2,21 +2,21 @@
|
|||||||
# Place in ~/.config/fish/completions/phpenv.fish
|
# Place in ~/.config/fish/completions/phpenv.fish
|
||||||
|
|
||||||
# Complete main commands
|
# Complete main commands
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "install" -d "Install a PHP version"
|
complete -c phpenv -f -n __fish_use_subcommand -a install -d "Install a PHP version"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "uninstall" -d "Uninstall a PHP version"
|
complete -c phpenv -f -n __fish_use_subcommand -a uninstall -d "Uninstall a PHP version"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "use" -d "Use PHP version for current shell"
|
complete -c phpenv -f -n __fish_use_subcommand -a use -d "Use PHP version for current shell"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "local" -d "Set PHP version for current project"
|
complete -c phpenv -f -n __fish_use_subcommand -a local -d "Set PHP version for current project"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "global" -d "Set global PHP version"
|
complete -c phpenv -f -n __fish_use_subcommand -a global -d "Set global PHP version"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "list" -d "List installed PHP versions"
|
complete -c phpenv -f -n __fish_use_subcommand -a list -d "List installed PHP versions"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "ls" -d "List installed PHP versions"
|
complete -c phpenv -f -n __fish_use_subcommand -a ls -d "List installed PHP versions"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "current" -d "Show current PHP version"
|
complete -c phpenv -f -n __fish_use_subcommand -a current -d "Show current PHP version"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "which" -d "Show path to PHP binary"
|
complete -c phpenv -f -n __fish_use_subcommand -a which -d "Show path to PHP binary"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "versions" -d "Show all available versions"
|
complete -c phpenv -f -n __fish_use_subcommand -a versions -d "Show all available versions"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "doctor" -d "Check phpenv installation"
|
complete -c phpenv -f -n __fish_use_subcommand -a doctor -d "Check phpenv installation"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "config" -d "Manage configuration"
|
complete -c phpenv -f -n __fish_use_subcommand -a config -d "Manage configuration"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "extensions" -d "Manage PHP extensions"
|
complete -c phpenv -f -n __fish_use_subcommand -a extensions -d "Manage PHP extensions"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "ext" -d "Manage PHP extensions"
|
complete -c phpenv -f -n __fish_use_subcommand -a ext -d "Manage PHP extensions"
|
||||||
complete -c phpenv -f -n "__fish_use_subcommand" -a "help" -d "Show help"
|
complete -c phpenv -f -n __fish_use_subcommand -a help -d "Show help"
|
||||||
|
|
||||||
# Helper functions for completions
|
# Helper functions for completions
|
||||||
function __phpenv_complete_installed_versions
|
function __phpenv_complete_installed_versions
|
||||||
@@ -26,13 +26,13 @@ end
|
|||||||
function __phpenv_complete_available_versions
|
function __phpenv_complete_available_versions
|
||||||
# Try to get dynamic versions first
|
# Try to get dynamic versions first
|
||||||
if command -q curl -a command -q jq; and functions -q __phpenv_parse_version_field
|
if command -q curl -a command -q jq; and functions -q __phpenv_parse_version_field
|
||||||
echo "latest"
|
echo latest
|
||||||
echo "nightly"
|
echo nightly
|
||||||
echo "5.x"
|
echo "5.x"
|
||||||
echo "7.x"
|
echo "7.x"
|
||||||
echo "8.x"
|
echo "8.x"
|
||||||
__phpenv_parse_version_field "latest" "8.4"
|
__phpenv_parse_version_field latest "8.4"
|
||||||
__phpenv_parse_version_field "nightly" "8.5"
|
__phpenv_parse_version_field nightly "8.5"
|
||||||
__phpenv_parse_version_field "5.x" "5.6"
|
__phpenv_parse_version_field "5.x" "5.6"
|
||||||
__phpenv_parse_version_field "7.x" "7.4"
|
__phpenv_parse_version_field "7.x" "7.4"
|
||||||
__phpenv_parse_version_field "8.x" "8.4"
|
__phpenv_parse_version_field "8.x" "8.4"
|
||||||
@@ -64,18 +64,18 @@ complete -c phpenv -f -n "__fish_seen_subcommand_from uninstall use local global
|
|||||||
-a "(__phpenv_complete_installed_versions)" -d "Installed PHP version"
|
-a "(__phpenv_complete_installed_versions)" -d "Installed PHP version"
|
||||||
|
|
||||||
# Add system option for use command
|
# Add system option for use command
|
||||||
complete -c phpenv -f -n "__fish_seen_subcommand_from use" -a "system" -d "Use system PHP"
|
complete -c phpenv -f -n "__fish_seen_subcommand_from use" -a system -d "Use system PHP"
|
||||||
|
|
||||||
# Complete binaries for which command
|
# Complete binaries for which command
|
||||||
complete -c phpenv -f -n "__fish_seen_subcommand_from which" -a "(__phpenv_complete_binaries)" -d "PHP binary"
|
complete -c phpenv -f -n "__fish_seen_subcommand_from which" -a "(__phpenv_complete_binaries)" -d "PHP binary"
|
||||||
|
|
||||||
# Complete config subcommands
|
# Complete config subcommands
|
||||||
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from get set list" \
|
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from get set list" \
|
||||||
-a "get" -d "Get configuration value"
|
-a get -d "Get configuration value"
|
||||||
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from get set list" \
|
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from get set list" \
|
||||||
-a "set" -d "Set configuration value"
|
-a set -d "Set configuration value"
|
||||||
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from get set list" \
|
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from get set list" \
|
||||||
-a "list" -d "List all configuration"
|
-a list -d "List all configuration"
|
||||||
|
|
||||||
# Complete config keys
|
# Complete config keys
|
||||||
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and __fish_seen_subcommand_from get set" \
|
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and __fish_seen_subcommand_from get set" \
|
||||||
@@ -91,27 +91,27 @@ complete -c phpenv -f \
|
|||||||
complete -c phpenv -f \
|
complete -c phpenv -f \
|
||||||
-n "__fish_seen_subcommand_from extensions ext" \
|
-n "__fish_seen_subcommand_from extensions ext" \
|
||||||
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
||||||
-a "install" -d "Install PHP extension"
|
-a install -d "Install PHP extension"
|
||||||
complete -c phpenv -f \
|
complete -c phpenv -f \
|
||||||
-n "__fish_seen_subcommand_from extensions ext" \
|
-n "__fish_seen_subcommand_from extensions ext" \
|
||||||
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
||||||
-a "uninstall" -d "Uninstall PHP extension"
|
-a uninstall -d "Uninstall PHP extension"
|
||||||
complete -c phpenv -f \
|
complete -c phpenv -f \
|
||||||
-n "__fish_seen_subcommand_from extensions ext" \
|
-n "__fish_seen_subcommand_from extensions ext" \
|
||||||
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
||||||
-a "remove" -d "Remove PHP extension"
|
-a remove -d "Remove PHP extension"
|
||||||
complete -c phpenv -f \
|
complete -c phpenv -f \
|
||||||
-n "__fish_seen_subcommand_from extensions ext" \
|
-n "__fish_seen_subcommand_from extensions ext" \
|
||||||
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
||||||
-a "list" -d "List installed extensions"
|
-a list -d "List installed extensions"
|
||||||
complete -c phpenv -f \
|
complete -c phpenv -f \
|
||||||
-n "__fish_seen_subcommand_from extensions ext" \
|
-n "__fish_seen_subcommand_from extensions ext" \
|
||||||
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
||||||
-a "ls" -d "List installed extensions"
|
-a ls -d "List installed extensions"
|
||||||
complete -c phpenv -f \
|
complete -c phpenv -f \
|
||||||
-n "__fish_seen_subcommand_from extensions ext" \
|
-n "__fish_seen_subcommand_from extensions ext" \
|
||||||
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
|
||||||
-a "available" -d "Show available extensions"
|
-a available -d "Show available extensions"
|
||||||
|
|
||||||
# Complete extension names
|
# Complete extension names
|
||||||
complete -c phpenv -f \
|
complete -c phpenv -f \
|
||||||
|
|||||||
4
config/fish/completions/ql.fish
Normal file
4
config/fish/completions/ql.fish
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# @halostatue/fish-macos/completions/ql.fish:v7.0.1
|
||||||
|
|
||||||
|
complete --erase --command ql
|
||||||
|
complete --command ql --wraps qlmanage
|
||||||
24
config/fish/conf.d/everforest-dark-hard.fish
Normal file
24
config/fish/conf.d/everforest-dark-hard.fish
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Everforest color scheme for fish shell
|
||||||
|
# Generated from template - do not edit manually
|
||||||
|
|
||||||
|
# Set fish colors
|
||||||
|
set -U fish_color_normal #d3c6aa
|
||||||
|
set -U fish_color_command #7fbbb3
|
||||||
|
set -U fish_color_keyword #d699b6
|
||||||
|
set -U fish_color_quote #dbbc7f
|
||||||
|
set -U fish_color_redirection #83c092
|
||||||
|
set -U fish_color_end #e69875
|
||||||
|
set -U fish_color_error #e67e80
|
||||||
|
set -U fish_color_param #d3c6aa
|
||||||
|
set -U fish_color_comment #7a8478
|
||||||
|
set -U fish_color_selection --background=#323c41
|
||||||
|
set -U fish_color_search_match --background=#323c41
|
||||||
|
set -U fish_color_operator #a7c080
|
||||||
|
set -U fish_color_escape #d699b6
|
||||||
|
set -U fish_color_autosuggestion #859289
|
||||||
|
|
||||||
|
# Set fish pager colors
|
||||||
|
set -U fish_pager_color_progress #9da9a0
|
||||||
|
set -U fish_pager_color_prefix #7fbbb3
|
||||||
|
set -U fish_pager_color_completion #d3c6aa
|
||||||
|
set -U fish_pager_color_description #859289
|
||||||
24
config/fish/conf.d/everforest-dark-medium.fish
Normal file
24
config/fish/conf.d/everforest-dark-medium.fish
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Everforest color scheme for fish shell
|
||||||
|
# Generated from template - do not edit manually
|
||||||
|
|
||||||
|
# Set fish colors
|
||||||
|
set -U fish_color_normal #d3c6aa
|
||||||
|
set -U fish_color_command #7fbbb3
|
||||||
|
set -U fish_color_keyword #d699b6
|
||||||
|
set -U fish_color_quote #dbbc7f
|
||||||
|
set -U fish_color_redirection #83c092
|
||||||
|
set -U fish_color_end #e69875
|
||||||
|
set -U fish_color_error #e67e80
|
||||||
|
set -U fish_color_param #d3c6aa
|
||||||
|
set -U fish_color_comment #7a8478
|
||||||
|
set -U fish_color_selection --background=#374247
|
||||||
|
set -U fish_color_search_match --background=#374247
|
||||||
|
set -U fish_color_operator #a7c080
|
||||||
|
set -U fish_color_escape #d699b6
|
||||||
|
set -U fish_color_autosuggestion #859289
|
||||||
|
|
||||||
|
# Set fish pager colors
|
||||||
|
set -U fish_pager_color_progress #9da9a0
|
||||||
|
set -U fish_pager_color_prefix #7fbbb3
|
||||||
|
set -U fish_pager_color_completion #d3c6aa
|
||||||
|
set -U fish_pager_color_description #859289
|
||||||
24
config/fish/conf.d/everforest-dark-soft.fish
Normal file
24
config/fish/conf.d/everforest-dark-soft.fish
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Everforest color scheme for fish shell
|
||||||
|
# Generated from template - do not edit manually
|
||||||
|
|
||||||
|
# Set fish colors
|
||||||
|
set -U fish_color_normal #d3c6aa
|
||||||
|
set -U fish_color_command #7fbbb3
|
||||||
|
set -U fish_color_keyword #d699b6
|
||||||
|
set -U fish_color_quote #dbbc7f
|
||||||
|
set -U fish_color_redirection #83c092
|
||||||
|
set -U fish_color_end #e69875
|
||||||
|
set -U fish_color_error #e67e80
|
||||||
|
set -U fish_color_param #d3c6aa
|
||||||
|
set -U fish_color_comment #7a8478
|
||||||
|
set -U fish_color_selection --background=#3a464c
|
||||||
|
set -U fish_color_search_match --background=#3a464c
|
||||||
|
set -U fish_color_operator #a7c080
|
||||||
|
set -U fish_color_escape #d699b6
|
||||||
|
set -U fish_color_autosuggestion #859289
|
||||||
|
|
||||||
|
# Set fish pager colors
|
||||||
|
set -U fish_pager_color_progress #9da9a0
|
||||||
|
set -U fish_pager_color_prefix #7fbbb3
|
||||||
|
set -U fish_pager_color_completion #d3c6aa
|
||||||
|
set -U fish_pager_color_description #859289
|
||||||
24
config/fish/conf.d/everforest-light-hard.fish
Normal file
24
config/fish/conf.d/everforest-light-hard.fish
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Everforest color scheme for fish shell
|
||||||
|
# Generated from template - do not edit manually
|
||||||
|
|
||||||
|
# Set fish colors
|
||||||
|
set -U fish_color_normal #5c6a72
|
||||||
|
set -U fish_color_command #7fbbb3
|
||||||
|
set -U fish_color_keyword #d699b6
|
||||||
|
set -U fish_color_quote #dbbc7f
|
||||||
|
set -U fish_color_redirection #83c092
|
||||||
|
set -U fish_color_end #e69875
|
||||||
|
set -U fish_color_error #e67e80
|
||||||
|
set -U fish_color_param #5c6a72
|
||||||
|
set -U fish_color_comment #a6b0a0
|
||||||
|
set -U fish_color_selection --background=#f4f0d9
|
||||||
|
set -U fish_color_search_match --background=#f4f0d9
|
||||||
|
set -U fish_color_operator #a7c080
|
||||||
|
set -U fish_color_escape #d699b6
|
||||||
|
set -U fish_color_autosuggestion #b3c0b0
|
||||||
|
|
||||||
|
# Set fish pager colors
|
||||||
|
set -U fish_pager_color_progress #c0cdb8
|
||||||
|
set -U fish_pager_color_prefix #7fbbb3
|
||||||
|
set -U fish_pager_color_completion #5c6a72
|
||||||
|
set -U fish_pager_color_description #b3c0b0
|
||||||
24
config/fish/conf.d/everforest-light-medium.fish
Normal file
24
config/fish/conf.d/everforest-light-medium.fish
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Everforest color scheme for fish shell
|
||||||
|
# Generated from template - do not edit manually
|
||||||
|
|
||||||
|
# Set fish colors
|
||||||
|
set -U fish_color_normal #5c6a72
|
||||||
|
set -U fish_color_command #7fbbb3
|
||||||
|
set -U fish_color_keyword #d699b6
|
||||||
|
set -U fish_color_quote #dbbc7f
|
||||||
|
set -U fish_color_redirection #83c092
|
||||||
|
set -U fish_color_end #e69875
|
||||||
|
set -U fish_color_error #e67e80
|
||||||
|
set -U fish_color_param #5c6a72
|
||||||
|
set -U fish_color_comment #a6b0a0
|
||||||
|
set -U fish_color_selection --background=#ede6cf
|
||||||
|
set -U fish_color_search_match --background=#ede6cf
|
||||||
|
set -U fish_color_operator #a7c080
|
||||||
|
set -U fish_color_escape #d699b6
|
||||||
|
set -U fish_color_autosuggestion #b3c0b0
|
||||||
|
|
||||||
|
# Set fish pager colors
|
||||||
|
set -U fish_pager_color_progress #c0cdb8
|
||||||
|
set -U fish_pager_color_prefix #7fbbb3
|
||||||
|
set -U fish_pager_color_completion #5c6a72
|
||||||
|
set -U fish_pager_color_description #b3c0b0
|
||||||
24
config/fish/conf.d/everforest-light-soft.fish
Normal file
24
config/fish/conf.d/everforest-light-soft.fish
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Everforest color scheme for fish shell
|
||||||
|
# Generated from template - do not edit manually
|
||||||
|
|
||||||
|
# Set fish colors
|
||||||
|
set -U fish_color_normal #5c6a72
|
||||||
|
set -U fish_color_command #7fbbb3
|
||||||
|
set -U fish_color_keyword #d699b6
|
||||||
|
set -U fish_color_quote #dbbc7f
|
||||||
|
set -U fish_color_redirection #83c092
|
||||||
|
set -U fish_color_end #e69875
|
||||||
|
set -U fish_color_error #e67e80
|
||||||
|
set -U fish_color_param #5c6a72
|
||||||
|
set -U fish_color_comment #a6b0a0
|
||||||
|
set -U fish_color_selection --background=#e9e1cc
|
||||||
|
set -U fish_color_search_match --background=#e9e1cc
|
||||||
|
set -U fish_color_operator #a7c080
|
||||||
|
set -U fish_color_escape #d699b6
|
||||||
|
set -U fish_color_autosuggestion #b3c0b0
|
||||||
|
|
||||||
|
# Set fish pager colors
|
||||||
|
set -U fish_pager_color_progress #c0cdb8
|
||||||
|
set -U fish_pager_color_prefix #7fbbb3
|
||||||
|
set -U fish_pager_color_completion #5c6a72
|
||||||
|
set -U fish_pager_color_description #b3c0b0
|
||||||
7
config/fish/conf.d/fish-ssh-agent.fish
Normal file
7
config/fish/conf.d/fish-ssh-agent.fish
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
if test -z "$SSH_ENV"
|
||||||
|
set -xg SSH_ENV $HOME/.ssh/environment
|
||||||
|
end
|
||||||
|
|
||||||
|
if not __ssh_agent_is_started
|
||||||
|
__ssh_agent_start
|
||||||
|
end
|
||||||
27
config/fish/conf.d/fzf.fish
Normal file
27
config/fish/conf.d/fzf.fish
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# fzf.fish is only meant to be used in interactive mode. If not in interactive mode and not in CI, skip the config to speed up shell startup
|
||||||
|
if not status is-interactive && test "$CI" != true
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
|
# Because of scoping rules, to capture the shell variables exactly as they are, we must read
|
||||||
|
# them before even executing _fzf_search_variables. We use psub to store the
|
||||||
|
# variables' info in temporary files and pass in the filenames as arguments.
|
||||||
|
# This variable is global so that it can be referenced by fzf_configure_bindings and in tests
|
||||||
|
set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)'
|
||||||
|
|
||||||
|
# Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings
|
||||||
|
fzf_configure_bindings
|
||||||
|
|
||||||
|
# Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased
|
||||||
|
function _fzf_uninstall --on-event fzf_uninstall
|
||||||
|
_fzf_uninstall_bindings
|
||||||
|
|
||||||
|
set --erase _fzf_search_vars_command
|
||||||
|
functions --erase _fzf_uninstall _fzf_migration_message _fzf_uninstall_bindings fzf_configure_bindings
|
||||||
|
complete --erase fzf_configure_bindings
|
||||||
|
|
||||||
|
set_color cyan
|
||||||
|
echo "fzf.fish uninstalled."
|
||||||
|
echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings."
|
||||||
|
set_color normal
|
||||||
|
end
|
||||||
62
config/fish/conf.d/halostatue_fish_brew.fish
Normal file
62
config/fish/conf.d/halostatue_fish_brew.fish
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# @halostatue/fish-brew/conf.d/halostatue_fish_brew.fish:v3.2.1
|
||||||
|
|
||||||
|
# Find Homebrew via a known prefix. If the `__homebrew_prefix` universal
|
||||||
|
# variable is set, that will be set as the first test prefix.
|
||||||
|
if not command --query brew
|
||||||
|
set --local prefixes $HOME/.brew $HOME/.linuxbrew /opt/homebrew /usr/local
|
||||||
|
set --query --universal __homebrew_prefix
|
||||||
|
and set --prepend prefixes $__homebrew_prefix
|
||||||
|
|
||||||
|
for prefix in $prefixes
|
||||||
|
test -x $prefix/bin/brew
|
||||||
|
or continue
|
||||||
|
|
||||||
|
set --prepend PATH $prefix/bin
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if command --query brew
|
||||||
|
set --query --universal __brew_prefix
|
||||||
|
and set --erase --universal __brew_prefix
|
||||||
|
|
||||||
|
set --local __brew_prefix (brew --prefix)
|
||||||
|
|
||||||
|
if ! contains -- {$__brew_prefix}/bin $fish_user_paths
|
||||||
|
fish_add_path --append --move --path \
|
||||||
|
{$__brew_prefix}/bin \
|
||||||
|
/usr/local/bin \
|
||||||
|
/usr/bin \
|
||||||
|
/bin \
|
||||||
|
{$__brew_prefix}/sbin \
|
||||||
|
/usr/local/sbin \
|
||||||
|
/usr/sbin \
|
||||||
|
/sbin
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -s $HOME/.config/brew/config.fish
|
||||||
|
if status is-interactive
|
||||||
|
set --local deprecated 0
|
||||||
|
|
||||||
|
if set --query $__halostatue_fish_brew_config_deprecated
|
||||||
|
set deprecated $__halostatue_fish_brew_config_deprecated
|
||||||
|
end
|
||||||
|
|
||||||
|
if test $deprecated -le 0
|
||||||
|
echo >&2 "Sourcing ~/.config/brew/config.fish is deprecated."
|
||||||
|
echo >&2 "See https://docs.brew.sh/Manpage#environment for a better alternative."
|
||||||
|
|
||||||
|
set --universal $__halostatue_fish_brew_config_deprecated 10
|
||||||
|
else
|
||||||
|
set --universal $__halostatue_fish_brew_config_deprecated (math $deprecated - 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
source $HOME/.config/brew/config.fish
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _halostatue_fish_brew_uninstall -e halostatue_fish_brew_uninstall
|
||||||
|
set --universal --erase __brew_prefix __halostatue_fish_brew_config_deprecated
|
||||||
|
functions --erase has_cask has_keg (status function)
|
||||||
|
end
|
||||||
14
config/fish/conf.d/halostatue_fish_macos.fish
Normal file
14
config/fish/conf.d/halostatue_fish_macos.fish
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# @halostatue/fish-macos/conf.d/halostatue_fish_macos.fish:v7.0.1
|
||||||
|
|
||||||
|
function _halostatue_fish_macos_uninstall -e halostatue_fish_macos_uninstall
|
||||||
|
set --function functions app finder has_app mac manp note ql remind
|
||||||
|
|
||||||
|
for cmd in $functions
|
||||||
|
complete --erase --command $cmd
|
||||||
|
end
|
||||||
|
|
||||||
|
set --append functions (status function) \
|
||||||
|
(functions --all | string match --entire --regex '^__macos_app_|^__macos_finder_|^__macos_mac_')
|
||||||
|
|
||||||
|
functions --erase $functions
|
||||||
|
end
|
||||||
@@ -3,13 +3,6 @@
|
|||||||
|
|
||||||
# Set default configuration using session variables for most settings
|
# Set default configuration using session variables for most settings
|
||||||
# Only PHPENV_GLOBAL_VERSION needs to persist across shells
|
# Only PHPENV_GLOBAL_VERSION needs to persist across shells
|
||||||
|
|
||||||
# Provider override (empty = auto-detect)
|
|
||||||
# Valid values: homebrew, apt
|
|
||||||
if not set -q PHPENV_PROVIDER
|
|
||||||
set -g PHPENV_PROVIDER ""
|
|
||||||
end
|
|
||||||
|
|
||||||
if not set -q PHPENV_AUTO_INSTALL
|
if not set -q PHPENV_AUTO_INSTALL
|
||||||
set -g PHPENV_AUTO_INSTALL false
|
set -g PHPENV_AUTO_INSTALL false
|
||||||
end
|
end
|
||||||
@@ -23,7 +16,7 @@ if not set -q PHPENV_AUTO_SWITCH
|
|||||||
end
|
end
|
||||||
|
|
||||||
if not set -q PHPENV_DEFAULT_EXTENSIONS
|
if not set -q PHPENV_DEFAULT_EXTENSIONS
|
||||||
set -g PHPENV_DEFAULT_EXTENSIONS "opcache"
|
set -g PHPENV_DEFAULT_EXTENSIONS opcache
|
||||||
end
|
end
|
||||||
|
|
||||||
# Initialize PATH on shell startup if global version is set (less aggressive)
|
# Initialize PATH on shell startup if global version is set (less aggressive)
|
||||||
|
|||||||
25
config/fish/conf.d/puffer_fish_key_bindings.fish
Normal file
25
config/fish/conf.d/puffer_fish_key_bindings.fish
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
status is-interactive || exit
|
||||||
|
|
||||||
|
function _puffer_fish_key_bindings --on-variable fish_key_bindings
|
||||||
|
set -l modes
|
||||||
|
if test "$fish_key_bindings" = fish_default_key_bindings
|
||||||
|
set modes default insert
|
||||||
|
else
|
||||||
|
set modes insert default
|
||||||
|
end
|
||||||
|
|
||||||
|
bind --mode $modes[1] . _puffer_fish_expand_dots
|
||||||
|
bind --mode $modes[1] ! _puffer_fish_expand_bang
|
||||||
|
bind --mode $modes[1] '$' _puffer_fish_expand_lastarg
|
||||||
|
bind --mode $modes[2] --erase . ! '$'
|
||||||
|
end
|
||||||
|
|
||||||
|
_puffer_fish_key_bindings
|
||||||
|
|
||||||
|
set -l uninstall_event puffer_fish_key_bindings_uninstall
|
||||||
|
|
||||||
|
function _$uninstall_event --on-event $uninstall_event
|
||||||
|
bind -e .
|
||||||
|
bind -e !
|
||||||
|
bind -e '$'
|
||||||
|
end
|
||||||
52
config/fish/conf.d/sponge.fish
Normal file
52
config/fish/conf.d/sponge.fish
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Sponge version
|
||||||
|
set --global sponge_version 1.1.0
|
||||||
|
|
||||||
|
# Allow to repeat previous command by default
|
||||||
|
if not set --query --universal sponge_delay
|
||||||
|
set --universal sponge_delay 2
|
||||||
|
end
|
||||||
|
|
||||||
|
# Purge entries both after `sponge_delay` entries and on exit by default
|
||||||
|
if not set --query --universal sponge_purge_only_on_exit
|
||||||
|
set --universal sponge_purge_only_on_exit false
|
||||||
|
end
|
||||||
|
|
||||||
|
# Add default filters
|
||||||
|
if not set --query --universal sponge_filters
|
||||||
|
set --universal sponge_filters sponge_filter_failed sponge_filter_matched
|
||||||
|
end
|
||||||
|
|
||||||
|
# Don't filter out commands that already have been in the history by default
|
||||||
|
if not set --query --universal sponge_allow_previously_successful
|
||||||
|
set --universal sponge_allow_previously_successful true
|
||||||
|
end
|
||||||
|
|
||||||
|
# Consider `0` the only successful exit code by default
|
||||||
|
if not set --query --universal sponge_successful_exit_codes
|
||||||
|
set --universal sponge_successful_exit_codes 0
|
||||||
|
end
|
||||||
|
|
||||||
|
# No active regex patterns by default
|
||||||
|
if not set --query --universal sponge_regex_patterns
|
||||||
|
set --universal sponge_regex_patterns
|
||||||
|
end
|
||||||
|
|
||||||
|
# Attach event handlers
|
||||||
|
functions --query \
|
||||||
|
_sponge_on_prompt \
|
||||||
|
_sponge_on_preexec \
|
||||||
|
_sponge_on_postexec \
|
||||||
|
_sponge_on_exit
|
||||||
|
|
||||||
|
# Initialize empty state for the first run
|
||||||
|
function _sponge_install --on-event sponge_install
|
||||||
|
set --global _sponge_current_command ''
|
||||||
|
set --global _sponge_current_command_exit_code 0
|
||||||
|
set --global _sponge_current_command_previously_in_history false
|
||||||
|
end
|
||||||
|
|
||||||
|
# Clean up variables
|
||||||
|
function _sponge_uninstall --on-event sponge_uninstall
|
||||||
|
_sponge_clear_state
|
||||||
|
set --erase sponge_version
|
||||||
|
end
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
# │ fish/config.fish │
|
# │ fish/config.fish │
|
||||||
# ╰──────────────────────────────────────────────────────────╯
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
fish_config theme choose "Catppuccin Mocha"
|
|
||||||
|
|
||||||
test -e "$HOME/.config/fish/alias.fish" &&
|
test -e "$HOME/.config/fish/alias.fish" &&
|
||||||
source "$HOME/.config/fish/alias.fish"
|
source "$HOME/.config/fish/alias.fish"
|
||||||
|
|
||||||
@@ -28,11 +26,11 @@ if status is-interactive
|
|||||||
# type -q fnm; and fnm env --use-on-cd --shell fish | source
|
# type -q fnm; and fnm env --use-on-cd --shell fish | source
|
||||||
type -q load_nvm; and load_nvm >/dev/stderr
|
type -q load_nvm; and load_nvm >/dev/stderr
|
||||||
|
|
||||||
# Initialize other tools if available
|
# Intialize other tools if available
|
||||||
type -q zoxide; and zoxide init fish | source
|
type -q zoxide; and zoxide init fish | source
|
||||||
|
|
||||||
# Start tmux if not already running and not in SSH
|
# Start tmux if not already running and not in SSH
|
||||||
#open-tmux # defined in functions/open-tmux.fish
|
open-tmux # defined in functions/open-tmux.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
# Added by LM Studio CLI (lms)
|
# Added by LM Studio CLI (lms)
|
||||||
@@ -42,7 +40,7 @@ set -gx PATH $PATH $HOME/.lmstudio/bin
|
|||||||
# vim: ft=fish ts=4 sw=4 et:
|
# vim: ft=fish ts=4 sw=4 et:
|
||||||
|
|
||||||
# opencode
|
# opencode
|
||||||
fish_add_path $HOME/.opencode/bin
|
fish_add_path /Users/ivuorinen/.opencode/bin
|
||||||
|
|
||||||
# Added by OrbStack: command-line tools and integration
|
# Added by OrbStack: command-line tools and integration
|
||||||
# This won't be added again if you remove it.
|
# This won't be added again if you remove it.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
# XDG Base Directory Specification
|
# XDG Base Directory Specification
|
||||||
set -q XDG_CONFIG_HOME; or set -x XDG_CONFIG_HOME "$HOME/.config"
|
set -q XDG_CONFIG_HOME; or set -x XDG_CONFIG_HOME "$HOME/.config"
|
||||||
set -q XDG_DATA_HOME; or set -x XDG_DATA_HOME "$HOME/.local/share"
|
set -q XDG_DATA_HOME; or set -x XDG_DATA_HOME "$HOME/.local/share"
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
jorgebucaran/fisher
|
jorgebucaran/fisher
|
||||||
jethrokuan/z
|
|
||||||
ivuorinen/phpenv.fish
|
|
||||||
ilancosman/tide@v6
|
ilancosman/tide@v6
|
||||||
catppuccin/fish
|
jethrokuan/z
|
||||||
|
halostatue/fish-macos@v7
|
||||||
|
danhper/fish-ssh-agent
|
||||||
|
halostatue/fish-brew@v3
|
||||||
|
edc/bass
|
||||||
|
meaningful-ooo/sponge
|
||||||
|
nickeb96/puffer-fish
|
||||||
|
jgusta/paths
|
||||||
|
patrickf1/fzf.fish
|
||||||
|
ivuorinen/phpenv.fish
|
||||||
|
|||||||
@@ -7,67 +7,65 @@ To be used with a companion fish function like this:
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import traceback
|
||||||
|
|
||||||
BASH = "bash"
|
|
||||||
|
BASH = 'bash'
|
||||||
|
|
||||||
FISH_READONLY = [
|
FISH_READONLY = [
|
||||||
"PWD",
|
'PWD', 'SHLVL', 'history', 'pipestatus', 'status', 'version',
|
||||||
"SHLVL",
|
'FISH_VERSION', 'fish_pid', 'hostname', '_', 'fish_private_mode'
|
||||||
"history",
|
|
||||||
"pipestatus",
|
|
||||||
"status",
|
|
||||||
"version",
|
|
||||||
"FISH_VERSION",
|
|
||||||
"fish_pid",
|
|
||||||
"hostname",
|
|
||||||
"_",
|
|
||||||
"fish_private_mode",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
IGNORED = ["PS1", "XPC_SERVICE_NAME"]
|
IGNORED = [
|
||||||
|
'PS1', 'XPC_SERVICE_NAME'
|
||||||
|
]
|
||||||
|
|
||||||
def ignored(name):
|
def ignored(name):
|
||||||
if name == "PWD": # this is read only, but has special handling
|
if name == 'PWD': # this is read only, but has special handling
|
||||||
return False
|
return False
|
||||||
# ignore other read only variables
|
# ignore other read only variables
|
||||||
if name in FISH_READONLY:
|
if name in FISH_READONLY:
|
||||||
return True
|
return True
|
||||||
if name in IGNORED or name.startswith("BASH_FUNC"):
|
if name in IGNORED or name.startswith("BASH_FUNC"):
|
||||||
return True
|
return True
|
||||||
return name.startswith("%")
|
if name.startswith('%'):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def escape(string):
|
def escape(string):
|
||||||
# use json.dumps to reliably escape quotes and backslashes
|
# use json.dumps to reliably escape quotes and backslashes
|
||||||
return json.dumps(string).replace(r"$", r"\$")
|
return json.dumps(string).replace(r'$', r'\$')
|
||||||
|
|
||||||
|
|
||||||
def escape_identifier(word):
|
def escape_identifier(word):
|
||||||
return escape(word.replace("?", "\\?"))
|
return escape(word.replace('?', '\\?'))
|
||||||
|
|
||||||
|
|
||||||
def comment(string):
|
def comment(string):
|
||||||
return "\n".join(["# " + line for line in string.split("\n")])
|
return '\n'.join(['# ' + line for line in string.split('\n')])
|
||||||
|
|
||||||
|
|
||||||
def gen_script():
|
def gen_script():
|
||||||
# Use the following instead of /usr/bin/env to read environment so we can
|
# Use the following instead of /usr/bin/env to read environment so we can
|
||||||
# deal with multi-line environment variables (and other odd cases).
|
# deal with multi-line environment variables (and other odd cases).
|
||||||
env_reader = f"{sys.executable} -c 'import os,json; print(json.dumps({{k:v for k,v in os.environ.items()}}))'"
|
env_reader = "%s -c 'import os,json; print(json.dumps({k:v for k,v in os.environ.items()}))'" % (sys.executable)
|
||||||
args = [BASH, "-c", env_reader]
|
args = [BASH, '-c', env_reader]
|
||||||
output = subprocess.check_output(args, universal_newlines=True)
|
output = subprocess.check_output(args, universal_newlines=True)
|
||||||
old_env = output.strip()
|
old_env = output.strip()
|
||||||
|
|
||||||
pipe_r, pipe_w = os.pipe()
|
pipe_r, pipe_w = os.pipe()
|
||||||
os.set_inheritable(pipe_w, True)
|
if sys.version_info >= (3, 4):
|
||||||
command = f"eval $1 && ({env_reader}; alias) >&{pipe_w}"
|
os.set_inheritable(pipe_w, True)
|
||||||
args = [BASH, "-c", command, "bass", " ".join(sys.argv[1:])]
|
command = 'eval $1 && ({}; alias) >&{}'.format(
|
||||||
|
env_reader,
|
||||||
|
pipe_w
|
||||||
|
)
|
||||||
|
args = [BASH, '-c', command, 'bass', ' '.join(sys.argv[1:])]
|
||||||
p = subprocess.Popen(args, universal_newlines=True, close_fds=False)
|
p = subprocess.Popen(args, universal_newlines=True, close_fds=False)
|
||||||
os.close(pipe_w)
|
os.close(pipe_w)
|
||||||
with os.fdopen(pipe_r) as f:
|
with os.fdopen(pipe_r) as f:
|
||||||
@@ -75,7 +73,9 @@ def gen_script():
|
|||||||
alias_str = f.read()
|
alias_str = f.read()
|
||||||
if p.wait() != 0:
|
if p.wait() != 0:
|
||||||
raise subprocess.CalledProcessError(
|
raise subprocess.CalledProcessError(
|
||||||
returncode=p.returncode, cmd=" ".join(sys.argv[1:]), output=new_env + alias_str
|
returncode=p.returncode,
|
||||||
|
cmd=' '.join(sys.argv[1:]),
|
||||||
|
output=new_env + alias_str
|
||||||
)
|
)
|
||||||
new_env = new_env.strip()
|
new_env = new_env.strip()
|
||||||
|
|
||||||
@@ -89,41 +89,41 @@ def gen_script():
|
|||||||
continue
|
continue
|
||||||
v1 = old_env.get(k)
|
v1 = old_env.get(k)
|
||||||
if not v1:
|
if not v1:
|
||||||
script_lines.append(comment(f"adding {k}={v}"))
|
script_lines.append(comment('adding %s=%s' % (k, v)))
|
||||||
elif v1 != v:
|
elif v1 != v:
|
||||||
script_lines.append(comment(f"updating {k}={v1} -> {v}"))
|
script_lines.append(comment('updating %s=%s -> %s' % (k, v1, v)))
|
||||||
# process special variables
|
# process special variables
|
||||||
if k == "PWD":
|
if k == 'PWD':
|
||||||
script_lines.append(f"cd {escape(v)}")
|
script_lines.append('cd %s' % escape(v))
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
if k == "PATH": # noqa: SIM108
|
if k == 'PATH':
|
||||||
value = " ".join([escape(directory) for directory in v.split(":")])
|
value = ' '.join([escape(directory)
|
||||||
|
for directory in v.split(':')])
|
||||||
else:
|
else:
|
||||||
value = escape(v)
|
value = escape(v)
|
||||||
script_lines.append(f"set -g -x {k} {value}")
|
script_lines.append('set -g -x %s %s' % (k, value))
|
||||||
|
|
||||||
for var in set(old_env.keys()) - set(new_env.keys()):
|
for var in set(old_env.keys()) - set(new_env.keys()):
|
||||||
script_lines.append(comment(f"removing {var}"))
|
script_lines.append(comment('removing %s' % var))
|
||||||
script_lines.append(f"set -e {var}")
|
script_lines.append('set -e %s' % var)
|
||||||
|
|
||||||
script = "\n".join(script_lines)
|
script = '\n'.join(script_lines)
|
||||||
|
|
||||||
alias_lines = []
|
alias_lines = []
|
||||||
for line in alias_str.splitlines():
|
for line in alias_str.splitlines():
|
||||||
_, rest = line.split(None, 1)
|
_, rest = line.split(None, 1)
|
||||||
k, v = rest.split("=", 1)
|
k, v = rest.split("=", 1)
|
||||||
alias_lines.append("alias " + escape_identifier(k) + "=" + v)
|
alias_lines.append("alias " + escape_identifier(k) + "=" + v)
|
||||||
alias = "\n".join(alias_lines)
|
alias = '\n'.join(alias_lines)
|
||||||
|
|
||||||
return script + "\n" + alias
|
return script + '\n' + alias
|
||||||
|
|
||||||
|
script_file = os.fdopen(3, 'w')
|
||||||
script_file = os.fdopen(3, "w")
|
|
||||||
|
|
||||||
if not sys.argv[1:]:
|
if not sys.argv[1:]:
|
||||||
print("__bass_usage", file=script_file, end="")
|
print('__bass_usage', file=script_file, end='')
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -131,8 +131,8 @@ try:
|
|||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
sys.exit(e.returncode)
|
sys.exit(e.returncode)
|
||||||
except Exception:
|
except Exception:
|
||||||
print("Bass internal error!", file=sys.stderr)
|
print('Bass internal error!', file=sys.stderr)
|
||||||
raise # traceback will output to stderr
|
raise # traceback will output to stderr
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
os.kill(os.getpid(), signal.SIGINT)
|
os.kill(os.getpid(), signal.SIGINT)
|
||||||
|
|||||||
53
config/fish/functions/__macos_app_bundleid.fish
Normal file
53
config/fish/functions/__macos_app_bundleid.fish
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_app_bundleid.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_app_bundleid
|
||||||
|
argparse --name 'app bundleid' x/exact a/all h/help q/quiet s/short -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: app bundleid [options] pattern...
|
||||||
|
|
||||||
|
Shows the bundle identifier for each of the applications found for the
|
||||||
|
pattern (see `app find` for how applications are found).
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-x, --exact Perform exact matches only
|
||||||
|
-a, --all Show all matches
|
||||||
|
-q, --quiet Suppress error output
|
||||||
|
-s, --short Prints out the bundle IDs only
|
||||||
|
-h, --help Show this help
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
> app bundleid 1password
|
||||||
|
/Applications/1Password for Safari.app: com.1password.safari
|
||||||
|
/Applications/1Password.app: com.1password.1password
|
||||||
|
|
||||||
|
> app bundleid -x 1password
|
||||||
|
/Applications/1Password.app: com.1password.1password'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if test (count $argv) -eq 0
|
||||||
|
echo >&2 'app bundleid: Not enough arguments.'
|
||||||
|
__macos_app_bundleid --help >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set --function apps (__macos_app_find $_flag_exact $_flag_all $argv)
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
for app in $apps
|
||||||
|
set --local bundle_id (mdls -name kMDItemCFBundleIdentifier -r $app)
|
||||||
|
|
||||||
|
if test -z $bundle_id
|
||||||
|
set --query _flag_quiet
|
||||||
|
or echo >&2 'Error getting bundle ID for "'$app'"'
|
||||||
|
else
|
||||||
|
if set --query _flag_short
|
||||||
|
echo $bundle_id
|
||||||
|
else
|
||||||
|
echo $app: $bundle_id
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
85
config/fish/functions/__macos_app_find.fish
Normal file
85
config/fish/functions/__macos_app_find.fish
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_app_find.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_app_find
|
||||||
|
argparse --name 'app find' x/exact a/all q/quiet h/help -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: app find [options] pattern...
|
||||||
|
|
||||||
|
Shows installed apps by the provided pattern or patterns. Searches for
|
||||||
|
apps in /Applications, /Applications/Setapp, /Applications/Utilities,
|
||||||
|
~/Applications, /Appliciations/Xcode.app/Contents/Applications,
|
||||||
|
/Developer/Applications, and /System/Applications.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-x, --exact Perform exact matches only
|
||||||
|
-a, --all Show all matches
|
||||||
|
-q, --quiet Do not print matches
|
||||||
|
-h, --help Show this help
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
> app find --all 1password
|
||||||
|
/Applications/1Password for Safari.app
|
||||||
|
/Applications/1Password.app
|
||||||
|
|
||||||
|
> app find --exact 1password
|
||||||
|
/Applications/1Password.app'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if test (count $argv) -eq 0
|
||||||
|
echo >&2 'app find: Not enough arguments.'
|
||||||
|
__macos_app_find --help >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set --function a Applications
|
||||||
|
set --function paths \
|
||||||
|
/$a \
|
||||||
|
~/$a \
|
||||||
|
/$a/Setapp \
|
||||||
|
/$a/Utilities \
|
||||||
|
/$a/Xcode.app/Contents/$a \
|
||||||
|
/Developer/Applications \
|
||||||
|
/System/Applications
|
||||||
|
|
||||||
|
set --function found 0
|
||||||
|
|
||||||
|
for pattern in $argv
|
||||||
|
set pattern (string replace '\.app/?$' '' $pattern)
|
||||||
|
set --local apps {$paths}/*.app {$paths}/*.localized/*.app
|
||||||
|
for candidate in $apps
|
||||||
|
set --local found_item 0
|
||||||
|
|
||||||
|
if set --query _flag_exact
|
||||||
|
if string match --ignore-case --entire --quiet /$pattern.app $candidate
|
||||||
|
set found_item 1
|
||||||
|
end
|
||||||
|
else if string match --ignore-case --entire --quiet $pattern $candidate
|
||||||
|
set found_item 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if test $found_item -eq 1
|
||||||
|
set --query _flag_quiet
|
||||||
|
or echo $candidate
|
||||||
|
|
||||||
|
set found (math $found + $found_item)
|
||||||
|
|
||||||
|
set --query _flag_quiet
|
||||||
|
and return 0
|
||||||
|
|
||||||
|
set --query _flag_all
|
||||||
|
or return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
test $found -gt 0
|
||||||
|
and return 0
|
||||||
|
|
||||||
|
set --query _flag_quiet
|
||||||
|
or echo >&2 'No applications found.'
|
||||||
|
return 1
|
||||||
|
end
|
||||||
110
config/fish/functions/__macos_app_frontmost.fish
Normal file
110
config/fish/functions/__macos_app_frontmost.fish
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_app_frontmost.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_app_frontmost::info
|
||||||
|
set --function value (lsappinfo info -only $argv[2] $argv[1] | string split =)[2]
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
string replace --all '"' '' $value
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function __macos_app_frontmost
|
||||||
|
argparse --name 'app frontmost' \
|
||||||
|
h/help b/bundle-id p/path n/name P/pid a/all \
|
||||||
|
-- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: app frontmost [options]
|
||||||
|
|
||||||
|
Retrieves details about the front-most application.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-b, --bundle-id Shows the app bundle ID
|
||||||
|
-p, --path Shows the app path
|
||||||
|
-n, --name Shows the app name
|
||||||
|
-P, --pid Shows the PID of the app
|
||||||
|
-a, --all Shows all details
|
||||||
|
-h, --help Show this help
|
||||||
|
|
||||||
|
Example:
|
||||||
|
> app frontmost
|
||||||
|
iTerm2'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
set --function front (lsappinfo front)
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
set --function items 0
|
||||||
|
|
||||||
|
if set --query _flag_all
|
||||||
|
set items 4
|
||||||
|
else
|
||||||
|
set --query _flag_bundle_id _flag_path _flag_name _flag_pid
|
||||||
|
set --local missing $status
|
||||||
|
|
||||||
|
switch $missing
|
||||||
|
case 0
|
||||||
|
set _flag_all 1
|
||||||
|
set items 4
|
||||||
|
case 4
|
||||||
|
set _flag_name 1
|
||||||
|
set items 1
|
||||||
|
case '*'
|
||||||
|
set items (math 4 - $missing)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query _flag_name || set --query _flag_all
|
||||||
|
set --function name (__macos_app_frontmost::info $front name)
|
||||||
|
or return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query _flag_bundle_id || set --query _flag_all
|
||||||
|
set --function bundle_id (__macos_app_frontmost::info $front bundleID)
|
||||||
|
or return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query _flag_path || set --query _flag_all
|
||||||
|
set --function bundle_path (__macos_app_frontmost::info $front bundlepath)
|
||||||
|
or return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query _flag_pid || set --query _flag_all
|
||||||
|
set --function pid (__macos_app_frontmost::info $front pid)
|
||||||
|
or return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query _flag_all
|
||||||
|
printf "%s: %s %s (%s)\n" $name $bundle_id $bundle_path $pid
|
||||||
|
else
|
||||||
|
if set --query _flag_name
|
||||||
|
printf "%s" $name
|
||||||
|
test $items -gt 1 && printf ": "
|
||||||
|
set items (math $items - 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query _flag_bundle_id
|
||||||
|
printf "%s" $bundle_id
|
||||||
|
test $items -gt 1 && printf " "
|
||||||
|
set items (math $items - 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query _flag_path
|
||||||
|
printf "%s" $bundle_path
|
||||||
|
test $items -gt 1 && printf " "
|
||||||
|
set items (math $items - 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query _flag_pid
|
||||||
|
if test $items -gt 1
|
||||||
|
printf "(%s)" $pid
|
||||||
|
else
|
||||||
|
printf "%s" $pid
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
printf "\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
94
config/fish/functions/__macos_app_icon.fish
Normal file
94
config/fish/functions/__macos_app_icon.fish
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_app_icon.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_app_icon
|
||||||
|
argparse --name 'app quit' x/exact h/help 'o/output=' 'w/width=' -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: app icon [options] pattern...
|
||||||
|
|
||||||
|
Extracts macOS app icons as PNG (see `app find` for how applications
|
||||||
|
are found).
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-x, --exact Perform exact matches only
|
||||||
|
-oOUTPUT Output to the file or directory specified
|
||||||
|
--output OUTPUT Output to the file or directory specified
|
||||||
|
-wWIDTH Outputs to a maximum of WIDTH pixels
|
||||||
|
--width WIDTH Outputs to a maximum of WIDTH pixels
|
||||||
|
-h, --help Show this help'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if test (count $argv) -eq 0
|
||||||
|
echo >&2 'app icon: Not enough arguments.'
|
||||||
|
__macos_app_icon --help >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if set --query _flag_exact
|
||||||
|
set --function apps (__macos_app_find --exact $argv)
|
||||||
|
or return 1
|
||||||
|
else
|
||||||
|
set --function apps (__macos_app_find --all $argv)
|
||||||
|
or return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set --function app_count (count $apps)
|
||||||
|
|
||||||
|
set --function output_path $PWD
|
||||||
|
if not test -z $_flag_output
|
||||||
|
if test -e $_flag_output
|
||||||
|
if test -f $_flag_output
|
||||||
|
if test $app_count -gt 1
|
||||||
|
echo >&2 'app icon: More than one application found, but only one output file specified.'
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set output_path (dirname $_flag_output)
|
||||||
|
set output_file (basename $_flag_output)
|
||||||
|
else if test -d $_flag_output
|
||||||
|
set output_path $_flag_output
|
||||||
|
else
|
||||||
|
echo >&2 'app icon: Output to a non-file or directory specified.'
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
else
|
||||||
|
set output_path $_flag_output
|
||||||
|
mkdir -p $output_path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for app in $apps
|
||||||
|
set --local icon $app/Contents/Resources/(
|
||||||
|
defaults read $app/Contents/Info CFBundleIconFile |
|
||||||
|
string replace --regex '\.icns$' ''
|
||||||
|
).icns
|
||||||
|
|
||||||
|
set --local name (basename $app .app)_icon.png
|
||||||
|
set --local tmp $TMPDIR/$name
|
||||||
|
set --local max_width (sips -g pixelWidth $icon | tail -1 | awk '{ print $2; }')
|
||||||
|
|
||||||
|
set --local outfile
|
||||||
|
set --local width
|
||||||
|
|
||||||
|
if test -z $output_file
|
||||||
|
set outfile $output_path/$name
|
||||||
|
else
|
||||||
|
set outfile $output_path/$output_file
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -z $_flag_width
|
||||||
|
set width $max_width
|
||||||
|
else if test $_flag_width -gt $max_width
|
||||||
|
set width $max_width
|
||||||
|
else
|
||||||
|
set width $_flag_width
|
||||||
|
end
|
||||||
|
|
||||||
|
sips -s format png --resampleHeightWidthMax $width $icon --out $outfile >/dev/null 2>&1
|
||||||
|
|
||||||
|
echo Wrote $app icon to $outfile.
|
||||||
|
end
|
||||||
|
end
|
||||||
42
config/fish/functions/__macos_app_quit.fish
Normal file
42
config/fish/functions/__macos_app_quit.fish
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_app_quit.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_app_quit
|
||||||
|
argparse --name 'app quit' x/exact r/restart h/help -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: app quit [options] pattern...
|
||||||
|
|
||||||
|
Quits apps identified by the provided pattern or patterns (see
|
||||||
|
`app find` for how applications are found).
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-x, --exact Quits only applications with exact matches
|
||||||
|
-r, --restart Restarts the application that was quit
|
||||||
|
-h, --help Show this help'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if test (count $argv) -eq 0
|
||||||
|
echo >&2 'app bundleid: Not enough arguments.'
|
||||||
|
__macos_app_quit --help >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query _flag_exact
|
||||||
|
set --function apps (__macos_app_find --exact $argv)
|
||||||
|
or return 1
|
||||||
|
else
|
||||||
|
set --function apps (__macos_app_find --all $argv)
|
||||||
|
or return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
for app in $apps
|
||||||
|
printf 'quit app "%s"' $app | osascript >/dev/null
|
||||||
|
|
||||||
|
if set --query _flag_restart
|
||||||
|
sleep 2
|
||||||
|
open -a $app
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
18
config/fish/functions/__macos_finder_cd.fish
Normal file
18
config/fish/functions/__macos_finder_cd.fish
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_finder_cd.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_finder_cd
|
||||||
|
argparse --name 'finder cd' h/help -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: finder cd [options] [window#]
|
||||||
|
|
||||||
|
Changes the current path to the path of the Finder window.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
cd (__macos_finder_pwd::get $argv[1])
|
||||||
|
end
|
||||||
30
config/fish/functions/__macos_finder_clean.fish
Normal file
30
config/fish/functions/__macos_finder_clean.fish
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_finder_clean.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_finder_clean
|
||||||
|
argparse --name 'finder clean' h/help -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: finder clean [options] [path...]
|
||||||
|
|
||||||
|
Removes .DS_Store files from the paths provided, or the current path if
|
||||||
|
one is not provided.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query argv[1]
|
||||||
|
set --function paths $argv
|
||||||
|
else
|
||||||
|
set --function paths .
|
||||||
|
end
|
||||||
|
|
||||||
|
for path in $paths
|
||||||
|
test -d $path
|
||||||
|
or continue
|
||||||
|
|
||||||
|
find $path -type f -name '*.DS_Store' -ls -delete
|
||||||
|
end
|
||||||
|
end
|
||||||
18
config/fish/functions/__macos_finder_column.fish
Normal file
18
config/fish/functions/__macos_finder_column.fish
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_finder_column.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_finder_column
|
||||||
|
argparse --name 'finder column' h/help -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: finder column [options] [window#]
|
||||||
|
|
||||||
|
Updates the Finder window to PWD using column view.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
__macos_finder_pwd::update --column $argv
|
||||||
|
end
|
||||||
44
config/fish/functions/__macos_finder_desktop_icons.fish
Normal file
44
config/fish/functions/__macos_finder_desktop_icons.fish
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_finder_desktop_icons.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_finder_desktop_icons
|
||||||
|
argparse --name 'finder desktop-icons' h/help -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: finder desktop-icons [options] STATE
|
||||||
|
|
||||||
|
Shows or hides the desktop icons. If not specified, shows the current state.
|
||||||
|
|
||||||
|
States:
|
||||||
|
off Hides the desktop icons
|
||||||
|
on Shows the desktop icons
|
||||||
|
[status] Shows desktop icon visibility
|
||||||
|
toggle Toggles desktop icon visibility
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
set --function action (string lower -- $argv[1])
|
||||||
|
set --function key CreateDesktop
|
||||||
|
|
||||||
|
switch $action
|
||||||
|
case off
|
||||||
|
__macos_finder_defaults::set $key false
|
||||||
|
case on
|
||||||
|
__macos_finder_defaults::set $key true
|
||||||
|
case toggle
|
||||||
|
if test (__macos_mac_defaults_query com.apple.Finder $key 1) -eq 1
|
||||||
|
__macos_finder_defaults::set $key false
|
||||||
|
else
|
||||||
|
__macos_finder_defaults::set $key true
|
||||||
|
end
|
||||||
|
case status ''
|
||||||
|
if test (__macos_mac_defaults_query com.apple.Finder $key 1) -eq 1
|
||||||
|
echo 'Desktop icons are hidden.'
|
||||||
|
else
|
||||||
|
echo 'Desktop icons are visible.'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
45
config/fish/functions/__macos_finder_hidden.fish
Normal file
45
config/fish/functions/__macos_finder_hidden.fish
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_finder_hidden.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_finder_hidden
|
||||||
|
argparse --name 'finder hidden' h/help -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: finder hidden [options] STATE
|
||||||
|
|
||||||
|
Shows or hides files that are normally hidden from the Finder. If not
|
||||||
|
specified, shows the current state.
|
||||||
|
|
||||||
|
States:
|
||||||
|
off Hides files that are normally hidden from the Finder
|
||||||
|
on Shows files that are normally hidden from the Finder
|
||||||
|
[status] Shows the status of the hidden files setting
|
||||||
|
toggle Toggles the hidden files setting
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
set --function action (string lower -- $argv[1])
|
||||||
|
set --function key AppleShowAllFiles
|
||||||
|
|
||||||
|
switch $action
|
||||||
|
case off
|
||||||
|
__macos_finder_defaults::set $key false
|
||||||
|
case on
|
||||||
|
__macos_finder_defaults::set $key true
|
||||||
|
case toggle
|
||||||
|
if test (__macos_mac_defaults_query com.apple.Finder $key 0) -eq 1
|
||||||
|
__macos_finder_defaults::set $key false
|
||||||
|
else
|
||||||
|
__macos_finder_defaults::set $key true
|
||||||
|
end
|
||||||
|
case status ''
|
||||||
|
if test (__macos_mac_defaults_query com.apple.Finder $key 0) -eq 1
|
||||||
|
echo 'Hidden files are visible in finder.'
|
||||||
|
else
|
||||||
|
echo 'Hidden files are hidden in finder.'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
18
config/fish/functions/__macos_finder_icon.fish
Normal file
18
config/fish/functions/__macos_finder_icon.fish
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_finder_icon.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_finder_icon
|
||||||
|
argparse --name 'finder icon' h/help -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: finder icon [options] [window#]
|
||||||
|
|
||||||
|
Updates the Finder window to PWD using icon view.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
__macos_finder_pwd::update --icon $argv
|
||||||
|
end
|
||||||
18
config/fish/functions/__macos_finder_list.fish
Normal file
18
config/fish/functions/__macos_finder_list.fish
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_finder_list.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_finder_list
|
||||||
|
argparse --name 'finder list' h/help -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: finder list [options] [window#]
|
||||||
|
|
||||||
|
Updates the Finder window to PWD using list view.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
__macos_finder_pwd::update --list $argv
|
||||||
|
end
|
||||||
18
config/fish/functions/__macos_finder_pushd.fish
Normal file
18
config/fish/functions/__macos_finder_pushd.fish
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# @halostatue/fish-macos/functions/__macos_finder_pushd.fish:v7.0.1
|
||||||
|
|
||||||
|
function __macos_finder_pushd
|
||||||
|
argparse --name 'finder pushd' h/help -- $argv
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
if set --query _flag_help
|
||||||
|
echo 'Usage: finder pushd [options] [window#]
|
||||||
|
|
||||||
|
Changes the current path to the path of the Finder window with pushd.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show this help'
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
pushd (__macos_finder_pwd::get $argv[1])
|
||||||
|
end
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user