mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-05 08:48:56 +00:00
Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5630200d95 | ||
| 961efec364 | |||
| 4b0e38ffd2 | |||
|
|
c6ba0e4036 | ||
|
|
7b1ed2f596 | ||
|
|
82d48c8989 | ||
|
|
48f61fa917 | ||
|
|
abc3408609 | ||
|
|
8bef11095e | ||
| 7d427d29bb | |||
|
|
fd71a1ad32 | ||
|
|
277d47098f | ||
|
|
d35014ed2e | ||
|
|
8e7af8ddc7 | ||
| 099e6672c8 | |||
| e578e52aff | |||
|
|
0b5f80cb03 | ||
|
|
72f42835ff | ||
|
|
a949f0d4cf | ||
|
|
8b1e4462b3 | ||
|
|
055cf7ef2e | ||
|
|
8c2b3fb475 | ||
| 3fa1efe88d | |||
| 9cc81c4cbf | |||
| bba76843db | |||
| 9018d1a038 | |||
|
|
a8595e2e07 | ||
|
|
beb89e9490 | ||
|
|
cb381fe57d | ||
|
|
7be770a2af | ||
|
|
d16ce9ad0f | ||
| ab67f6be5a | |||
| efadbb4248 | |||
| ded4bf3bb3 | |||
|
|
62eb417935 | ||
| d22f9ece7d | |||
| 79be2d41bc | |||
|
|
743ebb0e9f | ||
|
|
8fcab21a67 | ||
|
|
43a714513f | ||
|
|
044298af74 | ||
|
|
6604f7a2ca | ||
|
|
065eb2f9c0 |
@@ -9,7 +9,7 @@ insert_final_newline = true
|
|||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
[*.fish]
|
[*.fish]
|
||||||
max_line_length = 80
|
max_line_length = 120
|
||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
max_line_length = 120
|
max_line_length = 120
|
||||||
@@ -49,3 +49,6 @@ 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
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["@ivuorinen"]
|
|
||||||
}
|
|
||||||
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
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: function (label, commits) {
|
renderTypeSection: (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: function (release, changes) {
|
renderChangelog: (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`
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
2
.github/workflows/changelog.yml
vendored
2
.github/workflows/changelog.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
permissions: write-all
|
permissions: write-all
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
|
||||||
- name: Create changelog text
|
- name: Create changelog text
|
||||||
id: changelog
|
id: changelog
|
||||||
|
|||||||
4
.github/workflows/linters.yml
vendored
4
.github/workflows/linters.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
|
||||||
- name: Yarn Lock Changes
|
- name: Yarn Lock Changes
|
||||||
uses: Simek/yarn-lock-changes@61d1a0595070b79c1abdc8e1e5a5f5d98b18918c # v0.12.2
|
uses: Simek/yarn-lock-changes@61d1a0595070b79c1abdc8e1e5a5f5d98b18918c # v0.12.2
|
||||||
@@ -35,4 +35,4 @@ jobs:
|
|||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Run PR Lint
|
- name: Run PR Lint
|
||||||
uses: ivuorinen/actions/pr-lint@ff0ca4bc920c518b2ce2dc20c5e5a6e95f76dee0 # v2025.11.02
|
uses: ivuorinen/actions/pr-lint@f6ed49a6dda8b718d3cdfca095dd155c2543f359 # v2025.12.16
|
||||||
|
|||||||
4
.github/workflows/new-release.yml
vendored
4
.github/workflows/new-release.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
version: ${{ steps.daily-version.outputs.version }}
|
version: ${{ steps.daily-version.outputs.version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
|
||||||
- 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
|
||||||
@@ -40,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@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
|
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag_name: ${{ steps.daily-version.outputs.version }}
|
tag_name: ${{ steps.daily-version.outputs.version }}
|
||||||
|
|||||||
6
.github/workflows/pre-commit-autoupdate.yml
vendored
6
.github/workflows/pre-commit-autoupdate.yml
vendored
@@ -23,13 +23,13 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
|
||||||
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
||||||
|
|
||||||
- run: pip install pre-commit && pre-commit autoupdate
|
- run: pip install pre-commit && pre-commit autoupdate
|
||||||
|
|
||||||
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
- uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: update/pre-commit-hooks
|
branch: update/pre-commit-hooks
|
||||||
|
|||||||
2
.github/workflows/sync-labels.yml
vendored
2
.github/workflows/sync-labels.yml
vendored
@@ -29,4 +29,4 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: ivuorinen/actions/sync-labels@ff0ca4bc920c518b2ce2dc20c5e5a6e95f76dee0 # v2025.11.02
|
- uses: ivuorinen/actions/sync-labels@f6ed49a6dda8b718d3cdfca095dd155c2543f359 # v2025.12.16
|
||||||
|
|||||||
2
.github/workflows/update-submodules.yml
vendored
2
.github/workflows/update-submodules.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|||||||
44
.gitignore
vendored
44
.gitignore
vendored
@@ -11,47 +11,49 @@
|
|||||||
.nfs*
|
.nfs*
|
||||||
.scannerwork
|
.scannerwork
|
||||||
.vscode
|
.vscode
|
||||||
|
.yarn/
|
||||||
|
!config/git/local.d/.gitkeep
|
||||||
|
!config/nvim/spell/.gitkeep
|
||||||
|
!config/zed/settings.json
|
||||||
|
!ssh/local.d/.gitkeep
|
||||||
|
**/exports-secret.fish
|
||||||
|
**/exports.secret.fish
|
||||||
|
*.tmp.*
|
||||||
Brewfile.lock.json
|
Brewfile.lock.json
|
||||||
antidote_plugins.zsh
|
antidote_plugins.zsh
|
||||||
config/alacritty/theme-active.toml
|
config/alacritty/theme-active.toml
|
||||||
config/cheat/cheatsheets/pure-bash-bible/*
|
config/cheat/cheatsheets/pure-bash-bible/*
|
||||||
config/cheat/cheatsheets/tldr/*
|
config/cheat/cheatsheets/tldr/*
|
||||||
|
config/fish/completions/asdf.fish
|
||||||
|
config/fish/fish_variables
|
||||||
|
config/fish/fish_variables.*
|
||||||
|
config/gh/hosts.yml
|
||||||
config/git/credentials
|
config/git/credentials
|
||||||
|
config/git/local.d/*
|
||||||
config/gnupg/S.*
|
config/gnupg/S.*
|
||||||
config/gnupg/private-keys-v1.d
|
config/gnupg/private-keys-v1.d
|
||||||
config/gnupg/s
|
config/gnupg/s
|
||||||
config/iterm2/AppSupport
|
config/iterm2/AppSupport
|
||||||
|
config/karabiner/automatic_backups
|
||||||
config/npm/npmrc
|
config/npm/npmrc
|
||||||
config/nvim/lazy-lock.json
|
config/nvim/lazy-lock.json
|
||||||
config/nvim/spell/*
|
config/nvim/spell/*
|
||||||
!config/nvim/spell/.gitkeep
|
config/op/plugins/gh.json
|
||||||
config/git/local.d/*
|
config/op/plugins/used_items/gh.json
|
||||||
!config/git/local.d/.gitkeep
|
config/vim/.netrwhist
|
||||||
|
config/vim/extra/*
|
||||||
config/vim/fzf
|
config/vim/fzf
|
||||||
config/vim/plugged/*
|
config/vim/plugged/*
|
||||||
config/zed/*
|
config/zed/*
|
||||||
!config/zed/settings.json
|
config/zed/settings.json
|
||||||
config/zsh/.zcompdump
|
config/zsh/.zcompdump
|
||||||
|
dependency-check-report.html
|
||||||
iTermServer-*
|
iTermServer-*
|
||||||
lazy-lock.json
|
lazy-lock.json
|
||||||
local/share/fonts/*
|
|
||||||
local/bin/asdf/plugins/*
|
local/bin/asdf/plugins/*
|
||||||
|
local/bin/yabai
|
||||||
|
local/man/yabai.1
|
||||||
|
local/share/fonts/*
|
||||||
lock
|
lock
|
||||||
node_modules
|
node_modules
|
||||||
ssh/local.d/*
|
ssh/local.d/*
|
||||||
!ssh/local.d/.gitkeep
|
|
||||||
config/fish/fish_variables
|
|
||||||
**/exports.secret.fish
|
|
||||||
**/exports-secret.fish
|
|
||||||
config/fish/completions/asdf.fish
|
|
||||||
config/vim/.netrwhist
|
|
||||||
config/vim/extra/*
|
|
||||||
config/gh/hosts.yml
|
|
||||||
dependency-check-report.html
|
|
||||||
local/bin/yabai
|
|
||||||
local/man/yabai.1
|
|
||||||
config/op/plugins/used_items/gh.json
|
|
||||||
config/zed/settings.json
|
|
||||||
*.tmp.*
|
|
||||||
config/op/plugins/gh.json
|
|
||||||
config/fish/fish_variables.*
|
|
||||||
|
|||||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -83,3 +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
|
||||||
|
[submodule "tmux/catppuccin"]
|
||||||
|
path = config/tmux/plugins/catppuccin
|
||||||
|
url = https://github.com/catppuccin/tmux.git
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.25.3
|
1.25.5
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -16,12 +16,9 @@ SHOW_SKIPPED_LINTERS: false # Show skipped linters in MegaLinter log
|
|||||||
TYPESCRIPT_DEFAULT_STYLE: prettier # Default style for TypeScript
|
TYPESCRIPT_DEFAULT_STYLE: prettier # Default style for TypeScript
|
||||||
DISABLE_LINTERS:
|
DISABLE_LINTERS:
|
||||||
- REPOSITORY_DEVSKIM
|
- REPOSITORY_DEVSKIM
|
||||||
- JAVASCRIPT_ES
|
- JAVASCRIPT_ES # using biome
|
||||||
|
- JAVASCRIPT_PRETTIER # using biome
|
||||||
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
|
||||||
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,22 +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: https://github.com/igorshubovych/markdownlint-cli
|
- repo: local
|
||||||
rev: v0.45.0
|
|
||||||
hooks:
|
hooks:
|
||||||
- id: markdownlint
|
- id: biome-check
|
||||||
args: [-c, .markdownlint.json, --fix]
|
name: Biome Check
|
||||||
|
entry: yarn biome check --write --files-ignore-unknown=true --no-errors-on-unmatched
|
||||||
|
language: system
|
||||||
|
files: \.(js|ts|jsx|tsx|json|md)$
|
||||||
|
|
||||||
- repo: https://github.com/adrienverge/yamllint
|
- repo: https://github.com/adrienverge/yamllint
|
||||||
rev: v1.37.1
|
rev: v1.37.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: yamllint
|
- id: yamllint
|
||||||
|
|
||||||
- repo: https://github.com/koalaman/shellcheck-precommit
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||||
rev: v0.11.0
|
rev: v0.11.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: shellcheck
|
- id: shellcheck
|
||||||
|
|
||||||
@@ -45,19 +45,15 @@ repos:
|
|||||||
- id: shfmt
|
- id: shfmt
|
||||||
|
|
||||||
- repo: https://github.com/rhysd/actionlint
|
- repo: https://github.com/rhysd/actionlint
|
||||||
rev: v1.7.8
|
rev: v1.7.9
|
||||||
hooks:
|
hooks:
|
||||||
- id: actionlint
|
- id: actionlint
|
||||||
|
|
||||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
|
||||||
rev: 41.168.5
|
|
||||||
hooks:
|
|
||||||
- id: renovate-config-validator
|
|
||||||
|
|
||||||
- repo: https://github.com/JohnnyMorganz/StyLua
|
- repo: https://github.com/JohnnyMorganz/StyLua
|
||||||
rev: v2.3.0
|
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
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
# vim: ft=gitignore
|
|
||||||
.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/*
|
|
||||||
lazy-lock.json
|
|
||||||
local/bin/antigen.zsh
|
|
||||||
local/bin/asdf
|
|
||||||
tools/antidote/*
|
|
||||||
tools/dotbot*
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
...require('@ivuorinen/prettier-config'),
|
|
||||||
trailingComma: 'all',
|
|
||||||
// Add custom options below:
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
files: '*.md',
|
|
||||||
options: {
|
|
||||||
printWidth: 120,
|
|
||||||
proseWrap: 'preserve',
|
|
||||||
tabWidth: 2,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
@@ -1 +1 @@
|
|||||||
3.14.0
|
3.14.2
|
||||||
|
|||||||
5
.sonarlint/connectedMode.json
Normal file
5
.sonarlint/connectedMode.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"sonarCloudOrganization": "ivuorinen",
|
||||||
|
"projectKey": "ivuorinen_dotfiles",
|
||||||
|
"region": "EU"
|
||||||
|
}
|
||||||
1
.yarnrc.yml
Normal file
1
.yarnrc.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
nodeLinker: node-modules
|
||||||
@@ -42,6 +42,8 @@ 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 \
|
||||||
-f https://github.com/ivuorinen/tmux-dark-notify.git config/tmux/plugins/tmux-dark-notify
|
-f https://github.com/ivuorinen/tmux-dark-notify.git config/tmux/plugins/tmux-dark-notify
|
||||||
|
git submodule add --name tmux/catppuccin \
|
||||||
|
-f https://github.com/catppuccin/tmux.git config/tmux/plugins/catppuccin
|
||||||
|
|
||||||
# Takes submodules and sets them to ignore all changes
|
# Takes submodules and sets them to ignore all changes
|
||||||
for MODULE in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'); do
|
for MODULE in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'); do
|
||||||
|
|||||||
15
base/hammerspoon/.luacheckrc
Normal file
15
base/hammerspoon/.luacheckrc
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
--
|
||||||
|
-- These globals can be set and accessed:
|
||||||
|
--
|
||||||
|
globals = {
|
||||||
|
"rawrequire",
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
-- These globals can only be accessed:
|
||||||
|
--
|
||||||
|
read_globals = {
|
||||||
|
"hs",
|
||||||
|
"ls",
|
||||||
|
"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
205
base/hammerspoon/init.lua
Normal file
205
base/hammerspoon/init.lua
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
-- ╭─────────────────────────────────────────────────────────╮
|
||||||
|
-- │ Hammerspoon config file │
|
||||||
|
-- ╰─────────────────────────────────────────────────────────╯
|
||||||
|
-- init.lua — Pure Hammerspoon window controls
|
||||||
|
-- Converted from skhdrc logic; expanded with per‑display grids,
|
||||||
|
-- app rules with groups, wrap‑around focus, cross‑display moves,
|
||||||
|
-- and overlay/notification toggles.
|
||||||
|
-- Author: Ismo Vuorinen (ivuorinen)
|
||||||
|
|
||||||
|
--------------------------------------------------
|
||||||
|
-- Caps Lock as Meh key (Shift+Control+Alt)
|
||||||
|
--------------------------------------------------
|
||||||
|
-- Prerequisites:
|
||||||
|
-- 1. Go to System Settings → Keyboard → Keyboard Shortcuts → Modifier Keys
|
||||||
|
-- 2. Set Caps Lock to "No Action" (you mentioned you already did this)
|
||||||
|
-- 3. Install Karabiner-Elements: brew install --cask karabiner-elements
|
||||||
|
-- 4. Open Karabiner-Elements, go to "Simple Modifications"
|
||||||
|
-- 5. Add: caps_lock → f18
|
||||||
|
--
|
||||||
|
-- Then you can use F18 as your Meh key in Hammerspoon:
|
||||||
|
local f18 = hs.hotkey.modal.new()
|
||||||
|
|
||||||
|
-- Capture F18 key press/release
|
||||||
|
hs.hotkey.bind({}, 'F18', function()
|
||||||
|
f18:enter()
|
||||||
|
end, function()
|
||||||
|
f18:exit()
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Meh (F18/Caps Lock) key bindings for window management
|
||||||
|
-- These provide quick access to common window operations
|
||||||
|
|
||||||
|
-- Helper function to get focused window
|
||||||
|
local function W()
|
||||||
|
return hs.window.focusedWindow()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Window positioning: thirds (U/I/O)
|
||||||
|
f18:bind({}, 'u', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
w:moveToUnit({ x = 0, y = 0, w = 1 / 3, h = 1 }, 0)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
f18:bind({}, 'i', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
w:moveToUnit({ x = 1 / 3, y = 0, w = 1 / 3, h = 1 }, 0)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
f18:bind({}, 'o', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
w:moveToUnit({ x = 2 / 3, y = 0, w = 1 / 3, h = 1 }, 0)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Window positioning: half width, full height (Y)
|
||||||
|
f18:bind({}, 'y', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
w:moveToUnit({ x = 0, y = 0, w = 0.5, h = 1 }, 0)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Cycle through all windows (H/L)
|
||||||
|
-- We need to maintain state to properly cycle through all windows
|
||||||
|
local windowCycleIndex = 1
|
||||||
|
local windowCycleList = {}
|
||||||
|
local lastCycleTime = 0
|
||||||
|
|
||||||
|
local function getWindowCycleList()
|
||||||
|
local currentTime = hs.timer.secondsSinceEpoch()
|
||||||
|
-- Reset if more than 2 seconds have passed since last cycle
|
||||||
|
if currentTime - lastCycleTime > 2 then
|
||||||
|
windowCycleIndex = 1
|
||||||
|
windowCycleList = hs.window.orderedWindows()
|
||||||
|
end
|
||||||
|
lastCycleTime = currentTime
|
||||||
|
return windowCycleList
|
||||||
|
end
|
||||||
|
|
||||||
|
f18:bind({}, 'h', function()
|
||||||
|
local windows = getWindowCycleList()
|
||||||
|
if #windows <= 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Cycle backward
|
||||||
|
windowCycleIndex = windowCycleIndex - 1
|
||||||
|
if windowCycleIndex < 1 then
|
||||||
|
windowCycleIndex = #windows
|
||||||
|
end
|
||||||
|
|
||||||
|
windows[windowCycleIndex]:focus()
|
||||||
|
end)
|
||||||
|
|
||||||
|
f18:bind({}, 'l', function()
|
||||||
|
local windows = getWindowCycleList()
|
||||||
|
if #windows <= 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Cycle forward
|
||||||
|
windowCycleIndex = windowCycleIndex + 1
|
||||||
|
if windowCycleIndex > #windows then
|
||||||
|
windowCycleIndex = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
windows[windowCycleIndex]:focus()
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Window sizing: maximize (Up/J) and center (Down)
|
||||||
|
f18:bind({}, 'up', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
w:maximize(0)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
f18:bind({}, 'j', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
w:maximize(0)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
f18:bind({}, 'down', function()
|
||||||
|
local w = W()
|
||||||
|
if not w then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local f = w:frame()
|
||||||
|
local sf = w:screen():frame()
|
||||||
|
if f.w < sf.w * 0.95 then
|
||||||
|
w:maximize(0)
|
||||||
|
else
|
||||||
|
local ww, hh = math.floor(sf.w * 0.5), math.floor(sf.h * 0.9)
|
||||||
|
local xx = sf.x + math.floor((sf.w - ww) / 2)
|
||||||
|
local yy = sf.y + math.floor((sf.h - hh) / 2)
|
||||||
|
w:setFrame({ x = xx, y = yy, w = ww, h = hh }, 0)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
f18:bind({}, 'k', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
local sf = w:screen():frame()
|
||||||
|
local ww, hh = math.floor(sf.w * 0.9), math.floor(sf.h * 0.9)
|
||||||
|
local xx = sf.x + math.floor((sf.w - ww) / 2)
|
||||||
|
local yy = sf.y + math.floor((sf.h - hh) / 2)
|
||||||
|
w:setFrame({ x = xx, y = yy, w = ww, h = hh }, 0)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Move to next/previous screen (. and ,)
|
||||||
|
f18:bind({}, '.', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
local s = w:screen()
|
||||||
|
local ns = s:toEast() or s:toWest()
|
||||||
|
if ns then
|
||||||
|
w:moveToScreen(ns, true, true, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
f18:bind({}, ',', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
local s = w:screen()
|
||||||
|
local ps = s:toWest() or s:toEast()
|
||||||
|
if ps then
|
||||||
|
w:moveToScreen(ps, true, true, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Window positioning: halves (Left/Right arrows)
|
||||||
|
f18:bind({}, 'left', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
w:moveToUnit(hs.layout.left50, 0)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
f18:bind({}, 'right', function()
|
||||||
|
local w = W()
|
||||||
|
if w then
|
||||||
|
w:moveToUnit(hs.layout.right50, 0)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Paste from clipboard with Meh + V
|
||||||
|
f18:bind({}, 'v', function()
|
||||||
|
hs.eventtap.keyStrokes(hs.pasteboard.getContents())
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Paste 1Password secret with Meh + P
|
||||||
|
f18:bind({}, 'p', function()
|
||||||
|
local output, status =
|
||||||
|
hs.execute('op read "op://Svea/3hzhctmvovbwlgulv7mgy25rf4/login-input"', true)
|
||||||
|
if status then
|
||||||
|
hs.eventtap.keyStrokes(output:gsub('%s+$', '')) -- trim trailing whitespace
|
||||||
|
else
|
||||||
|
hs.alert.show '1Password CLI error'
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- require 'generate_emmylua'
|
||||||
103
biome.json
Normal file
103
biome.json
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/2.3.1/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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -6,21 +6,19 @@
|
|||||||
*
|
*
|
||||||
* @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, state, extendedFrames) => {
|
getFrameAssignments: (windows, screenFrame) => {
|
||||||
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,
|
||||||
@@ -33,3 +31,5 @@ function layout() {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module.exports = layout()
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
#!/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=""
|
||||||
|
|||||||
0
config/fish/completions/docker.fish
Executable file → Normal file
0
config/fish/completions/docker.fish
Executable file → Normal file
@@ -26,7 +26,7 @@ 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
|
||||||
|
|
||||||
# Intialize other tools if available
|
# Initialize 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
|
||||||
@@ -40,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 /Users/ivuorinen/.opencode/bin
|
fish_add_path $HOME/.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,5 +1,3 @@
|
|||||||
#!/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"
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ Options:
|
|||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if set --query _flag_exact
|
if set --query _flag_exact
|
||||||
set --function apps (__macos_app_find --exact $argv)
|
set --function apps (__macos_app_find --exact $argv)
|
||||||
or return 1
|
or return 1
|
||||||
|
|||||||
@@ -139,7 +139,6 @@ Options:
|
|||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
__macos_mac_touchid_sudo::check_supported
|
__macos_mac_touchid_sudo::check_supported
|
||||||
or return
|
or return
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,25 @@
|
|||||||
function __ssh_agent_is_started -d "check if ssh agent is already started"
|
function __ssh_agent_is_started -d "check if ssh agent is already started"
|
||||||
if test -n "$SSH_CONNECTION"
|
if test -n "$SSH_CONNECTION"
|
||||||
# This is an SSH session
|
# This is an SSH session
|
||||||
ssh-add -l > /dev/null 2>&1
|
ssh-add -l >/dev/null 2>&1
|
||||||
if test $status -eq 0 -o $status -eq 1
|
if test $status -eq 0 -o $status -eq 1
|
||||||
# An SSH agent was forwarded
|
# An SSH agent was forwarded
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if begin; test -f "$SSH_ENV"; and test -z "$SSH_AGENT_PID"; end
|
if begin
|
||||||
source $SSH_ENV > /dev/null
|
test -f "$SSH_ENV"; and test -z "$SSH_AGENT_PID"
|
||||||
end
|
end
|
||||||
|
source $SSH_ENV >/dev/null
|
||||||
|
end
|
||||||
|
|
||||||
if test -z "$SSH_AGENT_PID"
|
if test -z "$SSH_AGENT_PID"
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
ssh-add -l > /dev/null 2>&1
|
ssh-add -l >/dev/null 2>&1
|
||||||
if test $status -eq 2
|
if test $status -eq 2
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
function __ssh_agent_start -d "start a new ssh agent"
|
function __ssh_agent_start -d "start a new ssh agent"
|
||||||
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
|
ssh-agent -c | sed 's/^echo/#echo/' >$SSH_ENV
|
||||||
chmod 600 $SSH_ENV
|
chmod 600 $SSH_ENV
|
||||||
source $SSH_ENV > /dev/null
|
source $SSH_ENV >/dev/null
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,10 +3,8 @@ function _fzf_extract_var_info --argument-names variable_name set_show_output --
|
|||||||
# Extract only the lines about the variable, all of which begin with either
|
# Extract only the lines about the variable, all of which begin with either
|
||||||
# $variable_name: ...or... $variable_name[
|
# $variable_name: ...or... $variable_name[
|
||||||
string match --regex "^\\\$$variable_name(?::|\[).*" <$set_show_output |
|
string match --regex "^\\\$$variable_name(?::|\[).*" <$set_show_output |
|
||||||
|
|
||||||
# Strip the variable name prefix, including ": " for scope info lines
|
# Strip the variable name prefix, including ": " for scope info lines
|
||||||
string replace --regex "^\\\$$variable_name(?:: )?" '' |
|
string replace --regex "^\\\$$variable_name(?:: )?" '' |
|
||||||
|
|
||||||
# Distill the lines of values, replacing...
|
# Distill the lines of values, replacing...
|
||||||
# [1]: |value|
|
# [1]: |value|
|
||||||
# ...with...
|
# ...with...
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ function _fzf_search_directory --description "Search the current directory. Repl
|
|||||||
set -f file_paths_selected ($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments)
|
set -f file_paths_selected ($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if test $status -eq 0
|
if test $status -eq 0
|
||||||
commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ')
|
commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ')
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
function _puffer_fish_expand_bang
|
function _puffer_fish_expand_bang
|
||||||
switch (commandline -t)
|
switch (commandline -t)
|
||||||
case '!'
|
case '!'
|
||||||
commandline -t $history[1]
|
commandline -t $history[1]
|
||||||
case '*'
|
case '*'
|
||||||
commandline -i '!'
|
commandline -i '!'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
function _puffer_fish_expand_lastarg
|
function _puffer_fish_expand_lastarg
|
||||||
switch (commandline -t)
|
switch (commandline -t)
|
||||||
case '!'
|
case '!'
|
||||||
commandline -t ""
|
commandline -t ""
|
||||||
commandline -f history-token-search-backward
|
commandline -f history-token-search-backward
|
||||||
case '*'
|
case '*'
|
||||||
commandline -i '$'
|
commandline -i '$'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
function _sponge_clear_state
|
function _sponge_clear_state
|
||||||
set --erase --global _sponge_current_command
|
set --erase --global _sponge_current_command
|
||||||
set --erase --global _sponge_current_command_exit_code
|
set --erase --global _sponge_current_command_exit_code
|
||||||
set --erase --global _sponge_current_command_previously_in_history
|
set --erase --global _sponge_current_command_previously_in_history
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
function _sponge_on_exit --on-event fish_exit
|
function _sponge_on_exit --on-event fish_exit
|
||||||
sponge_delay=0 _sponge_remove_from_history
|
sponge_delay=0 _sponge_remove_from_history
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
function _sponge_on_postexec --on-event fish_postexec
|
function _sponge_on_postexec --on-event fish_postexec
|
||||||
set --global _sponge_current_command_exit_code $status
|
set --global _sponge_current_command_exit_code $status
|
||||||
|
|
||||||
# Remove command from the queue if it's been added previously
|
# Remove command from the queue if it's been added previously
|
||||||
if set --local index (contains --index -- $_sponge_current_command $_sponge_queue)
|
if set --local index (contains --index -- $_sponge_current_command $_sponge_queue)
|
||||||
set --erase _sponge_queue[$index]
|
set --erase _sponge_queue[$index]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Ignore empty commands
|
# Ignore empty commands
|
||||||
if test -n $_sponge_current_command
|
if test -n $_sponge_current_command
|
||||||
set --local command ''
|
set --local command ''
|
||||||
# Run filters
|
# Run filters
|
||||||
for filter in $sponge_filters
|
for filter in $sponge_filters
|
||||||
if $filter \
|
if $filter \
|
||||||
$_sponge_current_command \
|
$_sponge_current_command \
|
||||||
$_sponge_current_command_exit_code \
|
$_sponge_current_command_exit_code \
|
||||||
$_sponge_current_command_previously_in_history
|
$_sponge_current_command_previously_in_history
|
||||||
set command $_sponge_current_command
|
set command $_sponge_current_command
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
set --prepend --global _sponge_queue $command
|
||||||
end
|
end
|
||||||
set --prepend --global _sponge_queue $command
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
function _sponge_on_preexec --on-event fish_preexec \
|
function _sponge_on_preexec --on-event fish_preexec \
|
||||||
--argument-names command
|
--argument-names command
|
||||||
_sponge_clear_state
|
_sponge_clear_state
|
||||||
|
|
||||||
set --global _sponge_current_command $command
|
set --global _sponge_current_command $command
|
||||||
|
|
||||||
builtin history search --case-sensitive --exact --max=1 --null $command \
|
builtin history search --case-sensitive --exact --max=1 --null $command \
|
||||||
| read --local --null found_entries
|
| read --local --null found_entries
|
||||||
|
|
||||||
# If a command is in the history and in the queue, ignore it, like if it wasn’t in the history
|
# If a command is in the history and in the queue, ignore it, like if it wasn’t in the history
|
||||||
if test (count $found_entries) -ne 0; and not contains $command $_sponge_queue
|
if test (count $found_entries) -ne 0; and not contains $command $_sponge_queue
|
||||||
set --global _sponge_current_command_previously_in_history true
|
set --global _sponge_current_command_previously_in_history true
|
||||||
else
|
else
|
||||||
set --global _sponge_current_command_previously_in_history false
|
set --global _sponge_current_command_previously_in_history false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
function _sponge_on_prompt --on-event fish_prompt
|
function _sponge_on_prompt --on-event fish_prompt
|
||||||
if test $sponge_purge_only_on_exit = false
|
if test $sponge_purge_only_on_exit = false
|
||||||
_sponge_remove_from_history
|
_sponge_remove_from_history
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
function _sponge_remove_from_history
|
function _sponge_remove_from_history
|
||||||
|
|
||||||
while test (count $_sponge_queue) -gt $sponge_delay
|
while test (count $_sponge_queue) -gt $sponge_delay
|
||||||
builtin history delete --case-sensitive --exact -- $_sponge_queue[-1]
|
builtin history delete --case-sensitive --exact -- $_sponge_queue[-1]
|
||||||
set --erase _sponge_queue[-1]
|
set --erase _sponge_queue[-1]
|
||||||
end
|
end
|
||||||
|
|
||||||
builtin history save
|
builtin history save
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
function bass
|
function bass
|
||||||
set -l bash_args $argv
|
set -l bash_args $argv
|
||||||
set -l bass_debug
|
set -l bass_debug
|
||||||
if test "$bash_args[1]_" = '-d_'
|
if test "$bash_args[1]_" = -d_
|
||||||
set bass_debug true
|
set bass_debug true
|
||||||
set -e bash_args[1]
|
set -e bash_args[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
set -l script_file (mktemp)
|
set -l script_file (mktemp)
|
||||||
if command -v python3 >/dev/null 2>&1
|
if command -v python3 >/dev/null 2>&1
|
||||||
command python3 -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file
|
command python3 -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file
|
||||||
else
|
else
|
||||||
command python -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file
|
command python -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file
|
||||||
end
|
end
|
||||||
set -l bass_status $status
|
set -l bass_status $status
|
||||||
if test $bass_status -ne 0
|
if test $bass_status -ne 0
|
||||||
return $bass_status
|
return $bass_status
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -n "$bass_debug"
|
if test -n "$bass_debug"
|
||||||
cat $script_file
|
cat $script_file
|
||||||
end
|
end
|
||||||
source $script_file
|
source $script_file
|
||||||
command rm $script_file
|
command rm $script_file
|
||||||
end
|
end
|
||||||
|
|
||||||
function __bass_usage
|
function __bass_usage
|
||||||
echo "Usage: bass [-d] <bash-command>"
|
echo "Usage: bass [-d] <bash-command>"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
function load_nvm --on-variable="PWD"
|
function load_nvm --on-variable="PWD"
|
||||||
set -l default_node_version (nvm version default)
|
set -l default_node_version (nvm version default)
|
||||||
set -l node_version (nvm version)
|
set -l node_version (nvm version)
|
||||||
set -l nvmrc_path (nvm_find_nvmrc)
|
set -l nvmrc_path (nvm_find_nvmrc)
|
||||||
if test -n "$nvmrc_path"
|
if test -n "$nvmrc_path"
|
||||||
set -l nvmrc_node_version (nvm version (cat $nvmrc_path))
|
set -l nvmrc_node_version (nvm version (cat $nvmrc_path))
|
||||||
if test "$nvmrc_node_version" = "N/A"
|
if test "$nvmrc_node_version" = N/A
|
||||||
nvm install (cat $nvmrc_path)
|
nvm install (cat $nvmrc_path)
|
||||||
else if test "$nvmrc_node_version" != "$node_version"
|
else if test "$nvmrc_node_version" != "$node_version"
|
||||||
nvm use $nvmrc_node_version
|
nvm use $nvmrc_node_version
|
||||||
|
end
|
||||||
|
else if test "$node_version" != "$default_node_version"
|
||||||
|
echo "Reverting to default Node version"
|
||||||
|
nvm use default
|
||||||
end
|
end
|
||||||
else if test "$node_version" != "$default_node_version"
|
|
||||||
echo "Reverting to default Node version"
|
|
||||||
nvm use default
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
function nvm_find_nvmrc
|
function nvm_find_nvmrc
|
||||||
bass source $NVM_DIR/nvm.sh --no-use ';' nvm_find_nvmrc
|
bass source $NVM_DIR/nvm.sh --no-use ';' nvm_find_nvmrc
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ function paths --description "Reveal the executable matches in shell paths or fi
|
|||||||
# check
|
# check
|
||||||
set -l built (type --type $input 12&>/dev/null)
|
set -l built (type --type $input 12&>/dev/null)
|
||||||
if test -n "$built"
|
if test -n "$built"
|
||||||
and test "$built" = 'builtin'
|
and test "$built" = builtin
|
||||||
set $foundStatus 0
|
set $foundStatus 0
|
||||||
if not set -q _flag_c
|
if not set -q _flag_c
|
||||||
echo -e -n "builtin\n"
|
echo -e -n "builtin\n"
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
function sponge_filter_failed \
|
function sponge_filter_failed \
|
||||||
--argument-names command exit_code previously_in_history
|
--argument-names command exit_code previously_in_history
|
||||||
|
|
||||||
if test $previously_in_history = true -a $sponge_allow_previously_successful = true
|
if test $previously_in_history = true -a $sponge_allow_previously_successful = true
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
if contains $exit_code $sponge_successful_exit_codes
|
if contains $exit_code $sponge_successful_exit_codes
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
function sponge_filter_matched \
|
function sponge_filter_matched \
|
||||||
--argument-names command
|
--argument-names command
|
||||||
|
|
||||||
for pattern in $sponge_regex_patterns
|
for pattern in $sponge_regex_patterns
|
||||||
if string match --regex --quiet $pattern -- $command
|
if string match --regex --quiet $pattern -- $command
|
||||||
return
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|||||||
30
config/fish/themes/Catppuccin Latte.theme
Normal file
30
config/fish/themes/Catppuccin Latte.theme
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# name: 'Catppuccin Latte'
|
||||||
|
# url: 'https://github.com/catppuccin/fish'
|
||||||
|
# preferred_background: eff1f5
|
||||||
|
|
||||||
|
fish_color_normal 4c4f69
|
||||||
|
fish_color_command 1e66f5
|
||||||
|
fish_color_param dd7878
|
||||||
|
fish_color_keyword d20f39
|
||||||
|
fish_color_quote 40a02b
|
||||||
|
fish_color_redirection ea76cb
|
||||||
|
fish_color_end fe640b
|
||||||
|
fish_color_comment 8c8fa1
|
||||||
|
fish_color_error d20f39
|
||||||
|
fish_color_gray 9ca0b0
|
||||||
|
fish_color_selection --background=ccd0da
|
||||||
|
fish_color_search_match --background=ccd0da
|
||||||
|
fish_color_option 40a02b
|
||||||
|
fish_color_operator ea76cb
|
||||||
|
fish_color_escape e64553
|
||||||
|
fish_color_autosuggestion 9ca0b0
|
||||||
|
fish_color_cancel d20f39
|
||||||
|
fish_color_cwd df8e1d
|
||||||
|
fish_color_user 179299
|
||||||
|
fish_color_host 1e66f5
|
||||||
|
fish_color_host_remote 40a02b
|
||||||
|
fish_color_status d20f39
|
||||||
|
fish_pager_color_progress 9ca0b0
|
||||||
|
fish_pager_color_prefix ea76cb
|
||||||
|
fish_pager_color_completion 4c4f69
|
||||||
|
fish_pager_color_description 9ca0b0
|
||||||
30
config/fish/themes/Catppuccin Mocha.theme
Normal file
30
config/fish/themes/Catppuccin Mocha.theme
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# name: 'Catppuccin Mocha'
|
||||||
|
# url: 'https://github.com/catppuccin/fish'
|
||||||
|
# preferred_background: 1e1e2e
|
||||||
|
|
||||||
|
fish_color_normal cdd6f4
|
||||||
|
fish_color_command 89b4fa
|
||||||
|
fish_color_param f2cdcd
|
||||||
|
fish_color_keyword f38ba8
|
||||||
|
fish_color_quote a6e3a1
|
||||||
|
fish_color_redirection f5c2e7
|
||||||
|
fish_color_end fab387
|
||||||
|
fish_color_comment 7f849c
|
||||||
|
fish_color_error f38ba8
|
||||||
|
fish_color_gray 6c7086
|
||||||
|
fish_color_selection --background=313244
|
||||||
|
fish_color_search_match --background=313244
|
||||||
|
fish_color_option a6e3a1
|
||||||
|
fish_color_operator f5c2e7
|
||||||
|
fish_color_escape eba0ac
|
||||||
|
fish_color_autosuggestion 6c7086
|
||||||
|
fish_color_cancel f38ba8
|
||||||
|
fish_color_cwd f9e2af
|
||||||
|
fish_color_user 94e2d5
|
||||||
|
fish_color_host 89b4fa
|
||||||
|
fish_color_host_remote a6e3a1
|
||||||
|
fish_color_status f38ba8
|
||||||
|
fish_pager_color_progress 6c7086
|
||||||
|
fish_pager_color_prefix f5c2e7
|
||||||
|
fish_pager_color_completion cdd6f4
|
||||||
|
fish_pager_color_description 6c7086
|
||||||
1
config/fzf/completion.bash
Executable file → Normal file
1
config/fzf/completion.bash
Executable file → Normal file
@@ -1,3 +1,4 @@
|
|||||||
|
# shellcheck disable=all
|
||||||
# ____ ____
|
# ____ ____
|
||||||
# / __/___ / __/
|
# / __/___ / __/
|
||||||
# / /_/_ / / /_
|
# / /_/_ / / /_
|
||||||
|
|||||||
1
config/fzf/completion.zsh
Executable file → Normal file
1
config/fzf/completion.zsh
Executable file → Normal file
@@ -1,3 +1,4 @@
|
|||||||
|
# shellcheck disable=all
|
||||||
# ____ ____
|
# ____ ____
|
||||||
# / __/___ / __/
|
# / __/___ / __/
|
||||||
# / /_/_ / / /_
|
# / /_/_ / / /_
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# shellcheck shell=bash
|
||||||
# Everforest theme for fzf
|
# Everforest theme for fzf
|
||||||
# Generated from template - do not edit manually
|
# Generated from template - do not edit manually
|
||||||
|
|
||||||
|
|||||||
0
config/fzf/fzf.bash
Executable file → Normal file
0
config/fzf/fzf.bash
Executable file → Normal file
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env zsh
|
||||||
|
# shellcheck disable=SC1071
|
||||||
# Setup fzf
|
# Setup fzf
|
||||||
# ---------
|
# ---------
|
||||||
|
|
||||||
|
|||||||
9
config/fzf/key-bindings.bash
Executable file → Normal file
9
config/fzf/key-bindings.bash
Executable file → Normal file
@@ -20,8 +20,8 @@ __fzf_select__() {
|
|||||||
-o -type d -print \
|
-o -type d -print \
|
||||||
-o -type l -print 2> /dev/null | cut -b3-"}"
|
-o -type l -print 2> /dev/null | cut -b3-"}"
|
||||||
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-} -m"
|
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-} -m"
|
||||||
eval "$cmd" |
|
# shellcheck disable=SC2091 # Intentionally execute output of __fzfcmd
|
||||||
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) "$@" |
|
eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) "$@" |
|
||||||
while read -r item; do
|
while read -r item; do
|
||||||
printf '%q ' "$item" # escape special chars
|
printf '%q ' "$item" # escape special chars
|
||||||
done
|
done
|
||||||
@@ -35,7 +35,8 @@ if [[ $- =~ i ]]; then
|
|||||||
}
|
}
|
||||||
|
|
||||||
fzf-file-widget() {
|
fzf-file-widget() {
|
||||||
local selected="$(__fzf_select__ "$@")"
|
local selected
|
||||||
|
selected="$(__fzf_select__ "$@")"
|
||||||
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}"
|
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}"
|
||||||
READLINE_POINT=$((READLINE_POINT + ${#selected}))
|
READLINE_POINT=$((READLINE_POINT + ${#selected}))
|
||||||
}
|
}
|
||||||
@@ -45,6 +46,7 @@ if [[ $- =~ i ]]; then
|
|||||||
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
||||||
-o -type d -print 2> /dev/null | cut -b3-"}"
|
-o -type d -print 2> /dev/null | cut -b3-"}"
|
||||||
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-} +m"
|
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-} +m"
|
||||||
|
# shellcheck disable=SC2091 # Intentionally execute output of __fzfcmd
|
||||||
dir=$(
|
dir=$(
|
||||||
set +o pipefail
|
set +o pipefail
|
||||||
eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd)
|
eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd)
|
||||||
@@ -55,6 +57,7 @@ if [[ $- =~ i ]]; then
|
|||||||
local output opts script
|
local output opts script
|
||||||
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort ${FZF_CTRL_R_OPTS-} +m --read0"
|
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort ${FZF_CTRL_R_OPTS-} +m --read0"
|
||||||
script='BEGIN { getc; $/ = "\n\t"; $HISTCOUNT = $ENV{last_hist} + 1 } s/^[ *]//; print $HISTCOUNT - $. . "\t$_" if !$seen{$_}++'
|
script='BEGIN { getc; $/ = "\n\t"; $HISTCOUNT = $ENV{last_hist} + 1 } s/^[ *]//; print $HISTCOUNT - $. . "\t$_" if !$seen{$_}++'
|
||||||
|
# shellcheck disable=SC2091 # Intentionally execute output of __fzfcmd
|
||||||
output=$(
|
output=$(
|
||||||
set +o pipefail
|
set +o pipefail
|
||||||
builtin fc -lnr -2147483648 |
|
builtin fc -lnr -2147483648 |
|
||||||
|
|||||||
263
config/fzf/key-bindings.fish
Executable file → Normal file
263
config/fzf/key-bindings.fish
Executable file → Normal file
@@ -15,158 +15,161 @@
|
|||||||
# ------------
|
# ------------
|
||||||
function fzf_key_bindings
|
function fzf_key_bindings
|
||||||
|
|
||||||
# Store current token in $dir as root for the 'find' command
|
# Store current token in $dir as root for the 'find' command
|
||||||
function fzf-file-widget -d "List files and folders"
|
function fzf-file-widget -d "List files and folders"
|
||||||
set -l commandline (__fzf_parse_commandline)
|
set -l commandline (__fzf_parse_commandline)
|
||||||
set -l dir $commandline[1]
|
set -l dir $commandline[1]
|
||||||
set -l fzf_query $commandline[2]
|
set -l fzf_query $commandline[2]
|
||||||
set -l prefix $commandline[3]
|
set -l prefix $commandline[3]
|
||||||
|
|
||||||
# "-path \$dir'*/\\.*'" matches hidden files/folders inside $dir but not
|
# "-path \$dir'*/\\.*'" matches hidden files/folders inside $dir but not
|
||||||
# $dir itself, even if hidden.
|
# $dir itself, even if hidden.
|
||||||
test -n "$FZF_CTRL_T_COMMAND"; or set -l FZF_CTRL_T_COMMAND "
|
test -n "$FZF_CTRL_T_COMMAND"; or set -l FZF_CTRL_T_COMMAND "
|
||||||
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
||||||
-o -type f -print \
|
-o -type f -print \
|
||||||
-o -type d -print \
|
-o -type d -print \
|
||||||
-o -type l -print 2> /dev/null | sed 's@^\./@@'"
|
-o -type l -print 2> /dev/null | sed 's@^\./@@'"
|
||||||
|
|
||||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||||
begin
|
begin
|
||||||
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS"
|
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS"
|
||||||
eval "$FZF_CTRL_T_COMMAND | "(__fzfcmd)' -m --query "'$fzf_query'"' | while read -l r; set result $result $r; end
|
eval "$FZF_CTRL_T_COMMAND | "(__fzfcmd)' -m --query "'$fzf_query'"' | while read -l r
|
||||||
|
set result $result $r
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if [ -z "$result" ]
|
||||||
|
commandline -f repaint
|
||||||
|
return
|
||||||
|
else
|
||||||
|
# Remove last token from commandline.
|
||||||
|
commandline -t ""
|
||||||
|
end
|
||||||
|
for i in $result
|
||||||
|
commandline -it -- $prefix
|
||||||
|
commandline -it -- (string escape $i)
|
||||||
|
commandline -it -- ' '
|
||||||
|
end
|
||||||
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
if [ -z "$result" ]
|
|
||||||
commandline -f repaint
|
function fzf-history-widget -d "Show command history"
|
||||||
return
|
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||||
else
|
begin
|
||||||
# Remove last token from commandline.
|
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --scheme=history --bind=ctrl-r:toggle-sort,ctrl-z:ignore $FZF_CTRL_R_OPTS +m"
|
||||||
commandline -t ""
|
|
||||||
|
set -l FISH_MAJOR (echo $version | cut -f1 -d.)
|
||||||
|
set -l FISH_MINOR (echo $version | cut -f2 -d.)
|
||||||
|
|
||||||
|
# history's -z flag is needed for multi-line support.
|
||||||
|
# history's -z flag was added in fish 2.4.0, so don't use it for versions
|
||||||
|
# before 2.4.0.
|
||||||
|
if [ "$FISH_MAJOR" -gt 2 -o \( "$FISH_MAJOR" -eq 2 -a "$FISH_MINOR" -ge 4 \) ]
|
||||||
|
|
||||||
|
history -z | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | read -lz result
|
||||||
|
and commandline -- $result
|
||||||
|
else
|
||||||
|
history | eval (__fzfcmd) -q '(commandline)' | read -l result
|
||||||
|
and commandline -- $result
|
||||||
|
end
|
||||||
|
end
|
||||||
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
for i in $result
|
|
||||||
commandline -it -- $prefix
|
|
||||||
commandline -it -- (string escape $i)
|
|
||||||
commandline -it -- ' '
|
|
||||||
end
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
|
||||||
|
|
||||||
function fzf-history-widget -d "Show command history"
|
function fzf-cd-widget -d "Change directory"
|
||||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
set -l commandline (__fzf_parse_commandline)
|
||||||
begin
|
set -l dir $commandline[1]
|
||||||
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --scheme=history --bind=ctrl-r:toggle-sort,ctrl-z:ignore $FZF_CTRL_R_OPTS +m"
|
set -l fzf_query $commandline[2]
|
||||||
|
set -l prefix $commandline[3]
|
||||||
|
|
||||||
set -l FISH_MAJOR (echo $version | cut -f1 -d.)
|
test -n "$FZF_ALT_C_COMMAND"; or set -l FZF_ALT_C_COMMAND "
|
||||||
set -l FISH_MINOR (echo $version | cut -f2 -d.)
|
|
||||||
|
|
||||||
# history's -z flag is needed for multi-line support.
|
|
||||||
# history's -z flag was added in fish 2.4.0, so don't use it for versions
|
|
||||||
# before 2.4.0.
|
|
||||||
if [ "$FISH_MAJOR" -gt 2 -o \( "$FISH_MAJOR" -eq 2 -a "$FISH_MINOR" -ge 4 \) ];
|
|
||||||
history -z | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | read -lz result
|
|
||||||
and commandline -- $result
|
|
||||||
else
|
|
||||||
history | eval (__fzfcmd) -q '(commandline)' | read -l result
|
|
||||||
and commandline -- $result
|
|
||||||
end
|
|
||||||
end
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
|
||||||
|
|
||||||
function fzf-cd-widget -d "Change directory"
|
|
||||||
set -l commandline (__fzf_parse_commandline)
|
|
||||||
set -l dir $commandline[1]
|
|
||||||
set -l fzf_query $commandline[2]
|
|
||||||
set -l prefix $commandline[3]
|
|
||||||
|
|
||||||
test -n "$FZF_ALT_C_COMMAND"; or set -l FZF_ALT_C_COMMAND "
|
|
||||||
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
||||||
-o -type d -print 2> /dev/null | sed 's@^\./@@'"
|
-o -type d -print 2> /dev/null | sed 's@^\./@@'"
|
||||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||||
begin
|
begin
|
||||||
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS"
|
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS"
|
||||||
eval "$FZF_ALT_C_COMMAND | "(__fzfcmd)' +m --query "'$fzf_query'"' | read -l result
|
eval "$FZF_ALT_C_COMMAND | "(__fzfcmd)' +m --query "'$fzf_query'"' | read -l result
|
||||||
|
|
||||||
if [ -n "$result" ]
|
if [ -n "$result" ]
|
||||||
cd -- $result
|
cd -- $result
|
||||||
|
|
||||||
# Remove last token from commandline.
|
# Remove last token from commandline.
|
||||||
commandline -t ""
|
commandline -t ""
|
||||||
commandline -it -- $prefix
|
commandline -it -- $prefix
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
|
|
||||||
commandline -f repaint
|
function __fzfcmd
|
||||||
end
|
test -n "$FZF_TMUX"; or set FZF_TMUX 0
|
||||||
|
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
||||||
function __fzfcmd
|
if [ -n "$FZF_TMUX_OPTS" ]
|
||||||
test -n "$FZF_TMUX"; or set FZF_TMUX 0
|
echo "fzf-tmux $FZF_TMUX_OPTS -- "
|
||||||
test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%
|
else if [ $FZF_TMUX -eq 1 ]
|
||||||
if [ -n "$FZF_TMUX_OPTS" ]
|
echo "fzf-tmux -d$FZF_TMUX_HEIGHT -- "
|
||||||
echo "fzf-tmux $FZF_TMUX_OPTS -- "
|
else
|
||||||
else if [ $FZF_TMUX -eq 1 ]
|
echo fzf
|
||||||
echo "fzf-tmux -d$FZF_TMUX_HEIGHT -- "
|
end
|
||||||
else
|
|
||||||
echo "fzf"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
bind \ct fzf-file-widget
|
|
||||||
bind \cr fzf-history-widget
|
|
||||||
bind \ec fzf-cd-widget
|
|
||||||
|
|
||||||
if bind -M insert > /dev/null 2>&1
|
|
||||||
bind -M insert \ct fzf-file-widget
|
|
||||||
bind -M insert \cr fzf-history-widget
|
|
||||||
bind -M insert \ec fzf-cd-widget
|
|
||||||
end
|
|
||||||
|
|
||||||
function __fzf_parse_commandline -d 'Parse the current command line token and return split of existing filepath, fzf query, and optional -option= prefix'
|
|
||||||
set -l commandline (commandline -t)
|
|
||||||
|
|
||||||
# strip -option= from token if present
|
|
||||||
set -l prefix (string match -r -- '^-[^\s=]+=' $commandline)
|
|
||||||
set commandline (string replace -- "$prefix" '' $commandline)
|
|
||||||
|
|
||||||
# eval is used to do shell expansion on paths
|
|
||||||
eval set commandline $commandline
|
|
||||||
|
|
||||||
if [ -z $commandline ]
|
|
||||||
# Default to current directory with no --query
|
|
||||||
set dir '.'
|
|
||||||
set fzf_query ''
|
|
||||||
else
|
|
||||||
set dir (__fzf_get_dir $commandline)
|
|
||||||
|
|
||||||
if [ "$dir" = "." -a (string sub -l 1 -- $commandline) != '.' ]
|
|
||||||
# if $dir is "." but commandline is not a relative path, this means no file path found
|
|
||||||
set fzf_query $commandline
|
|
||||||
else
|
|
||||||
# Also remove trailing slash after dir, to "split" input properly
|
|
||||||
set fzf_query (string replace -r "^$dir/?" -- '' "$commandline")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
echo $dir
|
bind \ct fzf-file-widget
|
||||||
echo $fzf_query
|
bind \cr fzf-history-widget
|
||||||
echo $prefix
|
bind \ec fzf-cd-widget
|
||||||
end
|
|
||||||
|
|
||||||
function __fzf_get_dir -d 'Find the longest existing filepath from input string'
|
if bind -M insert >/dev/null 2>&1
|
||||||
set dir $argv
|
bind -M insert \ct fzf-file-widget
|
||||||
|
bind -M insert \cr fzf-history-widget
|
||||||
# Strip all trailing slashes. Ignore if $dir is root dir (/)
|
bind -M insert \ec fzf-cd-widget
|
||||||
if [ (string length -- $dir) -gt 1 ]
|
|
||||||
set dir (string replace -r '/*$' -- '' $dir)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Iteratively check if dir exists and strip tail end of path
|
function __fzf_parse_commandline -d 'Parse the current command line token and return split of existing filepath, fzf query, and optional -option= prefix'
|
||||||
while [ ! -d "$dir" ]
|
set -l commandline (commandline -t)
|
||||||
# If path is absolute, this can keep going until ends up at /
|
|
||||||
# If path is relative, this can keep going until entire input is consumed, dirname returns "."
|
# strip -option= from token if present
|
||||||
set dir (dirname -- "$dir")
|
set -l prefix (string match -r -- '^-[^\s=]+=' $commandline)
|
||||||
|
set commandline (string replace -- "$prefix" '' $commandline)
|
||||||
|
|
||||||
|
# eval is used to do shell expansion on paths
|
||||||
|
eval set commandline $commandline
|
||||||
|
|
||||||
|
if [ -z $commandline ]
|
||||||
|
# Default to current directory with no --query
|
||||||
|
set dir '.'
|
||||||
|
set fzf_query ''
|
||||||
|
else
|
||||||
|
set dir (__fzf_get_dir $commandline)
|
||||||
|
|
||||||
|
if [ "$dir" = "." -a (string sub -l 1 -- $commandline) != '.' ]
|
||||||
|
# if $dir is "." but commandline is not a relative path, this means no file path found
|
||||||
|
set fzf_query $commandline
|
||||||
|
else
|
||||||
|
# Also remove trailing slash after dir, to "split" input properly
|
||||||
|
set fzf_query (string replace -r "^$dir/?" -- '' "$commandline")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
echo $dir
|
||||||
|
echo $fzf_query
|
||||||
|
echo $prefix
|
||||||
end
|
end
|
||||||
|
|
||||||
echo $dir
|
function __fzf_get_dir -d 'Find the longest existing filepath from input string'
|
||||||
end
|
set dir $argv
|
||||||
|
|
||||||
|
# Strip all trailing slashes. Ignore if $dir is root dir (/)
|
||||||
|
if [ (string length -- $dir) -gt 1 ]
|
||||||
|
set dir (string replace -r '/*$' -- '' $dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Iteratively check if dir exists and strip tail end of path
|
||||||
|
while [ ! -d "$dir" ]
|
||||||
|
# If path is absolute, this can keep going until ends up at /
|
||||||
|
# If path is relative, this can keep going until entire input is consumed, dirname returns "."
|
||||||
|
set dir (dirname -- "$dir")
|
||||||
|
end
|
||||||
|
|
||||||
|
echo $dir
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
1
config/fzf/key-bindings.zsh
Executable file → Normal file
1
config/fzf/key-bindings.zsh
Executable file → Normal file
@@ -1,3 +1,4 @@
|
|||||||
|
# shellcheck disable=all
|
||||||
# ____ ____
|
# ____ ____
|
||||||
# / __/___ / __/
|
# / __/___ / __/
|
||||||
# / /_/_ / / /_
|
# / /_/_ / / /_
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ brew "openssl@3"
|
|||||||
brew "cryptography"
|
brew "cryptography"
|
||||||
# YAML Parser
|
# YAML Parser
|
||||||
brew "libyaml"
|
brew "libyaml"
|
||||||
|
# Display directories as trees (with optional color/HTML output)
|
||||||
|
brew "tree"
|
||||||
# Automate deployment, configuration, and upgrading
|
# Automate deployment, configuration, and upgrading
|
||||||
brew "ansible"
|
brew "ansible"
|
||||||
# Checks ansible playbooks for practices and behaviour
|
# Checks ansible playbooks for practices and behaviour
|
||||||
@@ -104,7 +106,7 @@ brew "glib"
|
|||||||
brew "cargo-binstall"
|
brew "cargo-binstall"
|
||||||
# Multi-platform support library with a focus on asynchronous I/O
|
# Multi-platform support library with a focus on asynchronous I/O
|
||||||
brew "libuv"
|
brew "libuv"
|
||||||
# Platform built on V8 to build network applications
|
# Open-source, cross-platform JavaScript runtime environment
|
||||||
brew "node", link: false
|
brew "node", link: false
|
||||||
# CLI tool for analyzing Claude Code usage from local JSONL files
|
# CLI tool for analyzing Claude Code usage from local JSONL files
|
||||||
brew "ccusage"
|
brew "ccusage"
|
||||||
@@ -230,6 +232,8 @@ brew "luarocks"
|
|||||||
brew "lzip"
|
brew "lzip"
|
||||||
# Swiss Army Knife for macOS
|
# Swiss Army Knife for macOS
|
||||||
brew "m-cli"
|
brew "m-cli"
|
||||||
|
# Cross platform, open source .NET development framework
|
||||||
|
brew "mono"
|
||||||
# Collection of tools that nobody wrote when UNIX was young
|
# Collection of tools that nobody wrote when UNIX was young
|
||||||
brew "moreutils"
|
brew "moreutils"
|
||||||
# NCurses Disk Usage
|
# NCurses Disk Usage
|
||||||
@@ -290,8 +294,8 @@ brew "tflint"
|
|||||||
brew "tfsec"
|
brew "tfsec"
|
||||||
# Terminal multiplexer
|
# Terminal multiplexer
|
||||||
brew "tmux"
|
brew "tmux"
|
||||||
# Display directories as trees (with optional color/HTML output)
|
# Extremely fast Python package installer and resolver, written in Rust
|
||||||
brew "tree"
|
brew "uv"
|
||||||
# Tool for creating isolated virtual python environments
|
# Tool for creating isolated virtual python environments
|
||||||
brew "virtualenv"
|
brew "virtualenv"
|
||||||
# Command-line interface to the WakaTime api
|
# Command-line interface to the WakaTime api
|
||||||
@@ -349,13 +353,18 @@ cask "fantastical"
|
|||||||
cask "font-jetbrains-mono"
|
cask "font-jetbrains-mono"
|
||||||
cask "font-jetbrains-mono-nerd-font"
|
cask "font-jetbrains-mono-nerd-font"
|
||||||
cask "font-monaspace"
|
cask "font-monaspace"
|
||||||
|
cask "font-monaspace-nf"
|
||||||
cask "font-open-sans"
|
cask "font-open-sans"
|
||||||
# GIT client
|
# GIT client
|
||||||
cask "fork"
|
cask "fork"
|
||||||
|
# Desktop automation application
|
||||||
|
cask "hammerspoon"
|
||||||
# HTTP and GraphQL Client
|
# HTTP and GraphQL Client
|
||||||
cask "insomnia"
|
cask "insomnia"
|
||||||
# JetBrains tools manager
|
# JetBrains tools manager
|
||||||
cask "jetbrains-toolbox"
|
cask "jetbrains-toolbox"
|
||||||
|
# Keyboard customiser
|
||||||
|
cask "karabiner-elements"
|
||||||
# End-to-end encryption software
|
# End-to-end encryption software
|
||||||
cask "keybase"
|
cask "keybase"
|
||||||
# Kubernetes IDE
|
# Kubernetes IDE
|
||||||
|
|||||||
68
config/karabiner/karabiner.json
Normal file
68
config/karabiner/karabiner.json
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"profiles": [
|
||||||
|
{
|
||||||
|
"complex_modifications": {
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"description": "Change right_command+hjkl to arrow keys",
|
||||||
|
"manipulators": [
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "h",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["right_command"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [{ "key_code": "left_arrow" }],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "j",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["right_command"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [{ "key_code": "down_arrow" }],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "k",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["right_command"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [{ "key_code": "up_arrow" }],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "l",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["right_command"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [{ "key_code": "right_arrow" }],
|
||||||
|
"type": "basic"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"name": "Default profile",
|
||||||
|
"selected": true,
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "caps_lock" },
|
||||||
|
"to": [{ "key_code": "f18" }]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -55,7 +55,8 @@ return {
|
|||||||
{
|
{
|
||||||
event = 'file_opened',
|
event = 'file_opened',
|
||||||
handler = function(_)
|
handler = function(_)
|
||||||
require('neo-tree.command').execute { action = 'close' }
|
local c = require 'neo-tree.command'
|
||||||
|
c.execute { action = 'close' }
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,31 +1,112 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'neanias/everforest-nvim',
|
'catppuccin/nvim',
|
||||||
version = false,
|
name = 'catppuccin',
|
||||||
lazy = false,
|
priority = 1000,
|
||||||
priority = 1000, -- make sure to load this before all the other start plugins
|
|
||||||
config = function()
|
config = function()
|
||||||
require('everforest').setup {
|
require('catppuccin').setup {
|
||||||
background = 'medium', -- hard, medium, soft
|
flavour = 'auto', -- latte, frappe, macchiato, mocha
|
||||||
transparent_background_level = 2, -- 0, 1, 2
|
background = { -- :h background
|
||||||
sign_column_background = 'grey', -- none, grey
|
light = 'latte',
|
||||||
disable_italic_comments = false,
|
dark = 'mocha',
|
||||||
diagnostic_virtual_text = 'coloured', -- coloured, gray, underline, none
|
},
|
||||||
diagnostic_line_highlight = true,
|
transparent_background = false,
|
||||||
diagnostic_line_highlight_background = 'dimmed', -- dimmed, normal
|
float = {
|
||||||
diagnostic_text_highlight = true,
|
transparent = true, -- enable transparent floating windows
|
||||||
ui_contrast = 'low', -- high, low
|
solid = false, -- use solid styling for floating windows, see |winborder|
|
||||||
italics = true,
|
},
|
||||||
spell_foreground = true,
|
show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
|
||||||
show_eob = true,
|
term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
|
||||||
colours_override = function() end,
|
dim_inactive = {
|
||||||
float_style = 'dim',
|
enabled = true, -- dims the background color of inactive window
|
||||||
on_highlights = function(_, _) end,
|
shade = 'dark',
|
||||||
dim_inactive_windows = true,
|
percentage = 0.15, -- percentage of the shade to apply to the inactive window
|
||||||
inlay_hints_background = 'dimmed',
|
},
|
||||||
|
no_italic = false, -- Force no italic
|
||||||
|
no_bold = false, -- Force no bold
|
||||||
|
no_underline = false, -- Force no underline
|
||||||
|
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
|
||||||
|
comments = { 'italic' }, -- Change the style of comments
|
||||||
|
conditionals = { 'italic' },
|
||||||
|
loops = {},
|
||||||
|
functions = {},
|
||||||
|
keywords = {},
|
||||||
|
strings = {},
|
||||||
|
variables = {},
|
||||||
|
numbers = {},
|
||||||
|
booleans = {},
|
||||||
|
properties = {},
|
||||||
|
types = {},
|
||||||
|
operators = {},
|
||||||
|
-- miscs = {}, -- Uncomment to turn off hard-coded styles
|
||||||
|
},
|
||||||
|
lsp_styles = { -- Handles the style of specific lsp hl groups (see `:h lsp-highlight`).
|
||||||
|
virtual_text = {
|
||||||
|
errors = { 'italic' },
|
||||||
|
hints = { 'italic' },
|
||||||
|
warnings = { 'italic' },
|
||||||
|
information = { 'italic' },
|
||||||
|
ok = { 'italic' },
|
||||||
|
},
|
||||||
|
underlines = {
|
||||||
|
errors = { 'underline' },
|
||||||
|
hints = { 'underline' },
|
||||||
|
warnings = { 'underline' },
|
||||||
|
information = { 'underline' },
|
||||||
|
ok = { 'underline' },
|
||||||
|
},
|
||||||
|
inlay_hints = {
|
||||||
|
background = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
color_overrides = {},
|
||||||
|
custom_highlights = {},
|
||||||
|
default_integrations = true,
|
||||||
|
auto_integrations = false,
|
||||||
|
integrations = {
|
||||||
|
cmp = true,
|
||||||
|
gitsigns = true,
|
||||||
|
nvimtree = true,
|
||||||
|
notify = false,
|
||||||
|
mini = {
|
||||||
|
enabled = true,
|
||||||
|
indentscope_color = '',
|
||||||
|
},
|
||||||
|
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- setup must be called before loading
|
||||||
|
vim.cmd.colorscheme 'catppuccin'
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
-- {
|
||||||
|
-- 'neanias/everforest-nvim',
|
||||||
|
-- version = false,
|
||||||
|
-- lazy = false,
|
||||||
|
-- priority = 1000, -- make sure to load this before all the other start plugins
|
||||||
|
-- config = function()
|
||||||
|
-- require('everforest').setup {
|
||||||
|
-- background = 'medium', -- hard, medium, soft
|
||||||
|
-- transparent_background_level = 2, -- 0, 1, 2
|
||||||
|
-- sign_column_background = 'grey', -- none, grey
|
||||||
|
-- disable_italic_comments = false,
|
||||||
|
-- diagnostic_virtual_text = 'coloured', -- coloured, gray, underline, none
|
||||||
|
-- diagnostic_line_highlight = true,
|
||||||
|
-- diagnostic_line_highlight_background = 'dimmed', -- dimmed, normal
|
||||||
|
-- diagnostic_text_highlight = true,
|
||||||
|
-- ui_contrast = 'low', -- high, low
|
||||||
|
-- italics = true,
|
||||||
|
-- spell_foreground = true,
|
||||||
|
-- show_eob = true,
|
||||||
|
-- colours_override = function() end,
|
||||||
|
-- float_style = 'dim',
|
||||||
|
-- on_highlights = function(_, _) end,
|
||||||
|
-- dim_inactive_windows = true,
|
||||||
|
-- inlay_hints_background = 'dimmed',
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
|
||||||
-- Automatic dark mode
|
-- Automatic dark mode
|
||||||
-- https://github.com/f-person/auto-dark-mode.nvim
|
-- https://github.com/f-person/auto-dark-mode.nvim
|
||||||
@@ -60,37 +141,37 @@ return {
|
|||||||
|
|
||||||
-- Remove all background colors to make nvim transparent
|
-- Remove all background colors to make nvim transparent
|
||||||
-- https://github.com/xiyaowong/nvim-transparent
|
-- https://github.com/xiyaowong/nvim-transparent
|
||||||
{
|
-- {
|
||||||
'xiyaowong/nvim-transparent',
|
-- 'xiyaowong/nvim-transparent',
|
||||||
lazy = false,
|
-- lazy = false,
|
||||||
enabled = true,
|
-- enabled = true,
|
||||||
config = function()
|
-- config = function()
|
||||||
local t = require 'transparent'
|
-- local t = require 'transparent'
|
||||||
t.setup {
|
-- t.setup {
|
||||||
extra_groups = {
|
-- extra_groups = {
|
||||||
'NormalNC',
|
-- 'NormalNC',
|
||||||
'NormalFloat',
|
-- 'NormalFloat',
|
||||||
'EndOfBuffer',
|
-- 'EndOfBuffer',
|
||||||
'FloatTitle',
|
-- 'FloatTitle',
|
||||||
'FloatBorder',
|
-- 'FloatBorder',
|
||||||
'NotifyDEBUGBorder',
|
-- 'NotifyDEBUGBorder',
|
||||||
'NotifyERRORBorder',
|
-- 'NotifyERRORBorder',
|
||||||
'NotifyINFOBorder',
|
-- 'NotifyINFOBorder',
|
||||||
'NotifyINFOBorder73',
|
-- 'NotifyINFOBorder73',
|
||||||
'NotifyINFOBorder75',
|
-- 'NotifyINFOBorder75',
|
||||||
'NotifyINFOBorder101',
|
-- 'NotifyINFOBorder101',
|
||||||
'NotifyTRACEBorder',
|
-- 'NotifyTRACEBorder',
|
||||||
'NotifyWARNBorder',
|
-- 'NotifyWARNBorder',
|
||||||
'NotifyBackground',
|
-- 'NotifyBackground',
|
||||||
'TelescopeBorder',
|
-- 'TelescopeBorder',
|
||||||
'TelescopePromptBorder',
|
-- 'TelescopePromptBorder',
|
||||||
'TelescopeResultsBorder',
|
-- 'TelescopeResultsBorder',
|
||||||
'TelescopePreviewBorder',
|
-- 'TelescopePreviewBorder',
|
||||||
},
|
-- },
|
||||||
}
|
-- }
|
||||||
t.clear_prefix 'NeoTree'
|
-- t.clear_prefix 'NeoTree'
|
||||||
end,
|
-- end,
|
||||||
},
|
-- },
|
||||||
|
|
||||||
-- Display a character as the colorcolumn
|
-- Display a character as the colorcolumn
|
||||||
-- https://github.com/lukas-reineke/virt-column.nvim
|
-- https://github.com/lukas-reineke/virt-column.nvim
|
||||||
|
|||||||
@@ -56,4 +56,3 @@ disable_startup_command = true
|
|||||||
name = "Downloads"
|
name = "Downloads"
|
||||||
path = "~/Downloads"
|
path = "~/Downloads"
|
||||||
startup_command = "lsa"
|
startup_command = "lsa"
|
||||||
|
|
||||||
|
|||||||
1
config/tmux/plugins/catppuccin
Submodule
1
config/tmux/plugins/catppuccin
Submodule
Submodule config/tmux/plugins/catppuccin added at 38932bddfc
18
config/tmux/sesh-tmux.fish
Executable file
18
config/tmux/sesh-tmux.fish
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
set selection (sesh list --icons | fzf-tmux -p 80%,70% \
|
||||||
|
--no-sort --ansi --border-label ' sesh ' --prompt '⚡ ' \
|
||||||
|
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
|
||||||
|
--bind 'tab:down,btab:up' \
|
||||||
|
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)' \
|
||||||
|
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)' \
|
||||||
|
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \
|
||||||
|
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \
|
||||||
|
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
|
||||||
|
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \
|
||||||
|
--preview-window 'right:55%' \
|
||||||
|
--preview 'sesh preview {}')
|
||||||
|
|
||||||
|
if test -n "$selection"
|
||||||
|
sesh connect "$selection"
|
||||||
|
end
|
||||||
@@ -1,46 +1 @@
|
|||||||
# Everforest dark theme for tmux
|
set -g @catppuccin_flavor "mocha"
|
||||||
# Generated from template - do not edit manually
|
|
||||||
|
|
||||||
# Enable proper color support
|
|
||||||
set -g default-terminal "tmux-256color"
|
|
||||||
set -as terminal-features ",*:RGB"
|
|
||||||
|
|
||||||
set -g pane-border-style "bg=default,fg=#859289"
|
|
||||||
set -g pane-active-border-style "bg=default,fg=#a7c080"
|
|
||||||
|
|
||||||
# Window tabs
|
|
||||||
set -g window-style "bg=default,fg=default,dim"
|
|
||||||
set -g window-status-style "bg=default,fg=default,dim"
|
|
||||||
set -g window-status-current-style "bg=default,fg=#d3c6aa"
|
|
||||||
set -g window-status-activity-style "bg=default,fg=#dbbc7f,nodim"
|
|
||||||
set -g window-status-bell-style "bg=default,fg=yellow,nodim"
|
|
||||||
set -g window-status-last-style "bg=default,fg=#a7c080"
|
|
||||||
set -g window-status-format " #I:#W "
|
|
||||||
|
|
||||||
# Messages
|
|
||||||
set -g message-style "bg=default,fg=#d3c6aa"
|
|
||||||
set -g message-command-style "bg=default,fg=#d3c6aa"
|
|
||||||
|
|
||||||
# Status bar
|
|
||||||
set -g status-style "bg=default,fg=default"
|
|
||||||
set -g status-left " #[default]"
|
|
||||||
set -g status-right " #[fg=#a7c080]#S@#[fg=#859289]#h #[fg=#7fbbb3]%H:%M #[fg=#dbbc7f]%d.%m "
|
|
||||||
set -g status-left-style "bg=default,fg=white"
|
|
||||||
set -g status-right-style "bg=default,fg=white"
|
|
||||||
|
|
||||||
set -g menu-style "bg=default,fg=white"
|
|
||||||
set -g menu-selected-style "bg=default,fg=#a7c080"
|
|
||||||
set -g menu-border-style "fg=#a7c080"
|
|
||||||
set -g menu-border-lines "single"
|
|
||||||
|
|
||||||
set -g popup-style "bg=default,fg=white"
|
|
||||||
set -g popup-border-style "fg=#a7c080"
|
|
||||||
set -g popup-border-lines "single"
|
|
||||||
|
|
||||||
set -g display-panes-colour "blue"
|
|
||||||
set -g display-panes-active-colour "red"
|
|
||||||
set -g display-panes-time 1000 # milliseconds
|
|
||||||
|
|
||||||
set -g pane-border-indicators "arrows"
|
|
||||||
set -g pane-border-lines "single"
|
|
||||||
set -g clock-mode-style "24"
|
|
||||||
|
|||||||
@@ -1,6 +1 @@
|
|||||||
set-option -g status-style 'fg=#4c4f69,bg=default'
|
set -g @catppuccin_flavor "latte"
|
||||||
set-window-option -g window-status-style 'fg=#4c4f69,bg=default dim'
|
|
||||||
set-window-option -g window-status-current-style 'fg=#8839ef,bg=default'
|
|
||||||
set-window-option -g window-status-activity-style 'fg=#4c4f69,bg=default nodim'
|
|
||||||
set-window-option -g window-status-bell-style 'fg=#4c4f69,bg=default'
|
|
||||||
set -g message-style 'fg=#8839ef bg=#e6e9ef bold' # fg magenta, bg black
|
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||||
set -ag terminal-features 'xterm-256color:RGB'
|
set -ag terminal-features 'xterm-256color:RGB'
|
||||||
|
|
||||||
|
# Enable proper color support
|
||||||
|
set -as terminal-features ",*:RGB"
|
||||||
|
|
||||||
set -g default-terminal "tmux-256color" # Set default terminal to 256 colors
|
set -g default-terminal "tmux-256color" # Set default terminal to 256 colors
|
||||||
set -g detach-on-destroy off # don't detach tmux when killing a session
|
set -g detach-on-destroy off # don't detach tmux when killing a session
|
||||||
set -g display-time 0 # Hide clock
|
set -g display-time 0 # Hide clock
|
||||||
@@ -26,7 +29,6 @@ set -g mouse on # Mouse support
|
|||||||
set -g set-titles on # Allow tmux to set the terminal title
|
set -g set-titles on # Allow tmux to set the terminal title
|
||||||
set -g status on # Setting status on
|
set -g status on # Setting status on
|
||||||
set -g status-keys vi # vi keys to move between panes
|
set -g status-keys vi # vi keys to move between panes
|
||||||
set -g history-limit 3000 # Scrollback history limit
|
|
||||||
|
|
||||||
# Activity Monitoring (for when something happens in another pain)
|
# Activity Monitoring (for when something happens in another pain)
|
||||||
set -g monitor-activity on
|
set -g monitor-activity on
|
||||||
@@ -44,24 +46,23 @@ set -g base-index 1
|
|||||||
set -g pane-base-index 1
|
set -g pane-base-index 1
|
||||||
set -g renumber-windows on
|
set -g renumber-windows on
|
||||||
|
|
||||||
# Activate with `DEBUG=1 tmux -vv`
|
|
||||||
if-shell '[ "$DEBUG" = "1" ]' 'set -g debug-file ~/.cache/tmux-debug.log'
|
|
||||||
|
|
||||||
# ╭──────────────────────────────────────────────────────────╮
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
# │ Theme │
|
# │ Theme │
|
||||||
# ╰──────────────────────────────────────────────────────────╯
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
set -g pane-active-border-style "bg=default,fg=#7aa2f7"
|
|
||||||
set -g pane-border-style "bg=default,fg=#31748f"
|
|
||||||
set -g status-style "bg=default"
|
|
||||||
set -g status-justify "left"
|
set -g status-justify "left"
|
||||||
set -g status-left ''
|
set -g status-left ''
|
||||||
set -g status-left-length "0"
|
set -g status-left-length "0"
|
||||||
set -g status-position "bottom"
|
set -g status-position "bottom"
|
||||||
set -g status-right "#S@#h #{tmux_mode_indicator}"
|
#set -g status-right "#S@#h #{tmux_mode_indicator}"
|
||||||
set -g status-right-length "30"
|
set -g status-right-length "50"
|
||||||
set -g window-status-current-format ' #I:#W#{?window_zoomed_flag, ◈ ,} '
|
#set -g window-status-current-format ' #I:#W#{?window_zoomed_flag, ◈ ,} '
|
||||||
set -g window-status-format ' #I:#W '
|
#set -g window-status-format ' #I:#W '
|
||||||
|
set -g @catppuccin_status_background 'none'
|
||||||
|
set -g @catppuccin_window_flags 'icon'
|
||||||
|
set -g @catppuccin_status_connect_separator 'no'
|
||||||
|
set -g @catppuccin_window_text "#T"
|
||||||
|
set -g @catppuccin_window_current_text "#T"
|
||||||
|
|
||||||
# ╭──────────────────────────────────────────────────────────╮
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
# │ Bindings │
|
# │ Bindings │
|
||||||
@@ -83,11 +84,6 @@ bind -n M-Right select-pane -R
|
|||||||
bind -n M-Up select-pane -U
|
bind -n M-Up select-pane -U
|
||||||
bind -n M-Down select-pane -D
|
bind -n M-Down select-pane -D
|
||||||
|
|
||||||
# Easier switching between window
|
|
||||||
bind C-n next-window
|
|
||||||
bind C-p previous-window
|
|
||||||
bind C-a last-window
|
|
||||||
|
|
||||||
# Reload tmux config with <prefix> + r
|
# Reload tmux config with <prefix> + r
|
||||||
unbind r
|
unbind r
|
||||||
bind r "source-file ~/.dotfiles/config/tmux/tmux.conf; display 'tmux cfg reloaded!'"
|
bind r "source-file ~/.dotfiles/config/tmux/tmux.conf; display 'tmux cfg reloaded!'"
|
||||||
@@ -100,33 +96,10 @@ bind Escape copy-mode
|
|||||||
unbind p
|
unbind p
|
||||||
bind p paste-buffer
|
bind p paste-buffer
|
||||||
|
|
||||||
# tms bindings
|
|
||||||
bind -N "tms" t display-popup -E "tms"
|
|
||||||
bind -N "tms windows" C-w display-popup -E "tms windows"
|
|
||||||
bind -N "tms switch" C-s display-popup -E "tms switch"
|
|
||||||
bind -N "tms refresh" C-r display-popup -E "tms refresh"
|
|
||||||
|
|
||||||
# global sessions
|
# global sessions
|
||||||
# bind-key "K" display-popup -h 90% -w 50% -E "sesh ui"
|
bind -N "sesh selection" t run-shell "$HOME/.dotfiles/config/tmux/sesh-tmux.fish"
|
||||||
bind-key "K" run-shell "sesh connect \"$(
|
bind -N "last-session (via sesh) " L run-shell "sesh last"
|
||||||
sesh list --icons --hide-duplicates | fzf-tmux -p 100%,100% --no-border \
|
bind -N "sesh ui" N display-popup -E "sesh ui"
|
||||||
--list-border \
|
|
||||||
--no-sort --prompt '⚡ ' \
|
|
||||||
--input-border \
|
|
||||||
--header-border \
|
|
||||||
--bind 'tab:down,btab:up' \
|
|
||||||
--bind 'ctrl-b:abort' \
|
|
||||||
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)' \
|
|
||||||
--bind 'ctrl-t:change-prompt( )+reload(sesh list -t --icons)' \
|
|
||||||
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \
|
|
||||||
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \
|
|
||||||
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
|
|
||||||
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \
|
|
||||||
--preview-window 'right:70%' \
|
|
||||||
--preview 'sesh preview {}' \
|
|
||||||
)\""
|
|
||||||
|
|
||||||
bind-key "N" display-popup -E "sesh ui"
|
|
||||||
|
|
||||||
# ╭──────────────────────────────────────────────────────────╮
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
# │ Plugins │
|
# │ Plugins │
|
||||||
@@ -142,7 +115,7 @@ bind-key "N" display-popup -E "sesh ui"
|
|||||||
## A plugin to name your tmux windows smartly.
|
## A plugin to name your tmux windows smartly.
|
||||||
## https://github.com/ofirgall/tmux-window-name
|
## https://github.com/ofirgall/tmux-window-name
|
||||||
### Maximum name length of a window
|
### Maximum name length of a window
|
||||||
set -g @tmux_window_name_max_name_len "20"
|
set -g @tmux_window_name_max_name_len "25"
|
||||||
### Replace $HOME with ~ in window names
|
### Replace $HOME with ~ in window names
|
||||||
set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git']"
|
set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git']"
|
||||||
set -g @tmux_window_name_ignored_programs "['sqlite3', 'antidote', 'direnv', 'md5']" # Default is []
|
set -g @tmux_window_name_ignored_programs "['sqlite3', 'antidote', 'direnv', 'md5']" # Default is []
|
||||||
@@ -189,5 +162,6 @@ run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-current-pane-hostname/curren
|
|||||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-fzf-url/fzf-url.tmux"
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-fzf-url/fzf-url.tmux"
|
||||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/resurrect.tmux"
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/resurrect.tmux"
|
||||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux"
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux"
|
||||||
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/catppuccin/catppuccin.tmux"
|
||||||
|
|
||||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-dark-notify/main.tmux"
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-dark-notify/main.tmux"
|
||||||
|
|||||||
@@ -66,9 +66,11 @@ config.scrollback_lines = 3000
|
|||||||
-- Function to detect the theme based on appearance
|
-- Function to detect the theme based on appearance
|
||||||
function Scheme_for_appearance(appearance)
|
function Scheme_for_appearance(appearance)
|
||||||
if appearance:find 'Dark' then
|
if appearance:find 'Dark' then
|
||||||
return 'Everforest Dark (Medium)'
|
return 'Catppuccin Mocha'
|
||||||
|
-- return 'Everforest Dark (Medium)'
|
||||||
else
|
else
|
||||||
return 'Everforest Light (Medium)'
|
return 'Catppuccin Latte'
|
||||||
|
-- return 'Everforest Light (Medium)'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# shellcheck shell=zsh
|
# shellcheck disable=SC1071,SC1103,SC2148
|
||||||
# Source: https://github.com/nvm-sh/nvm#zsh
|
# Source: https://github.com/nvm-sh/nvm#zsh
|
||||||
# place this after nvm initialization!
|
# place this after nvm initialization!
|
||||||
autoload -U add-zsh-hook
|
autoload -U add-zsh-hook
|
||||||
|
|||||||
52
cspell.config.yaml
Normal file
52
cspell.config.yaml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
version: "0.2"
|
||||||
|
ignorePaths: []
|
||||||
|
dictionaryDefinitions: []
|
||||||
|
dictionaries: []
|
||||||
|
words:
|
||||||
|
- aquasec
|
||||||
|
- cdgr
|
||||||
|
- cheatsheets
|
||||||
|
- CODEQUALITY
|
||||||
|
- DEVSKIM
|
||||||
|
- dscacheutil
|
||||||
|
- emptytrash
|
||||||
|
- flushcache
|
||||||
|
- getifaddr
|
||||||
|
- goenv
|
||||||
|
- irssi
|
||||||
|
- Ismo
|
||||||
|
- isodate
|
||||||
|
- KEYSFILE
|
||||||
|
- KEYSSOURCE
|
||||||
|
- killall
|
||||||
|
- lakka
|
||||||
|
- libexec
|
||||||
|
- Licence
|
||||||
|
- lmstudio
|
||||||
|
- localip
|
||||||
|
- locatedb
|
||||||
|
- LOGFILE
|
||||||
|
- luarocks
|
||||||
|
- mvdan
|
||||||
|
- myip
|
||||||
|
- onnimonni
|
||||||
|
- opencode
|
||||||
|
- optstring
|
||||||
|
- orbstack
|
||||||
|
- osascript
|
||||||
|
- phpenv
|
||||||
|
- psub
|
||||||
|
- pyenv
|
||||||
|
- SARIF
|
||||||
|
- shellcheck
|
||||||
|
- shfmt
|
||||||
|
- shivammathur
|
||||||
|
- spelllang
|
||||||
|
- updatedb
|
||||||
|
- vendordirs
|
||||||
|
- vimrc
|
||||||
|
- virtualenv
|
||||||
|
- Vuorinen
|
||||||
|
- zedit
|
||||||
|
ignoreWords: []
|
||||||
|
import: []
|
||||||
@@ -33,8 +33,10 @@ Leader: `<ctrl><space>`
|
|||||||
? List key bindings
|
? List key bindings
|
||||||
D Choose and detach a client from a list
|
D Choose and detach a client from a list
|
||||||
E Spread panes out evenly
|
E Spread panes out evenly
|
||||||
L Switch to the last client
|
L last-session (via sesh)
|
||||||
M Clear the marked pane
|
M Clear the marked pane
|
||||||
|
N sesh ui
|
||||||
|
T tms
|
||||||
] Paste the most recent paste buffer
|
] Paste the most recent paste buffer
|
||||||
c Create a new window
|
c Create a new window
|
||||||
d Detach the current client
|
d Detach the current client
|
||||||
@@ -46,7 +48,7 @@ Leader: `<ctrl><space>`
|
|||||||
o Select the next pane
|
o Select the next pane
|
||||||
q Display pane numbers
|
q Display pane numbers
|
||||||
s Choose a session from a list
|
s Choose a session from a list
|
||||||
t tms
|
t sesh selection
|
||||||
w Choose a window from a list
|
w Choose a window from a list
|
||||||
x Kill the active pane
|
x Kill the active pane
|
||||||
z Zoom the active pane
|
z Zoom the active pane
|
||||||
@@ -74,8 +76,6 @@ Leader: `<ctrl><space>`
|
|||||||
M-Left Resize the pane left by 5
|
M-Left Resize the pane left by 5
|
||||||
M-Right Resize the pane right by 5
|
M-Right Resize the pane right by 5
|
||||||
C-o Rotate through the panes
|
C-o Rotate through the panes
|
||||||
C-r tms refresh
|
|
||||||
C-s tms switch
|
|
||||||
C-w tms windows
|
C-w tms windows
|
||||||
C-z Suspend the current client
|
C-z Suspend the current client
|
||||||
C-Up Resize the pane up
|
C-Up Resize the pane up
|
||||||
|
|||||||
16
local/bin/a
16
local/bin/a
@@ -103,9 +103,9 @@ fetch_keys_if_missing()
|
|||||||
if [[ ! -f "$KEYS_FILE" ]]; then
|
if [[ ! -f "$KEYS_FILE" ]]; then
|
||||||
log_message "Keys file '$KEYS_FILE' not found. Attempting to fetch from $KEYS_SOURCE..."
|
log_message "Keys file '$KEYS_FILE' not found. Attempting to fetch from $KEYS_SOURCE..."
|
||||||
mkdir -p "$(dirname "$KEYS_FILE")"
|
mkdir -p "$(dirname "$KEYS_FILE")"
|
||||||
curl -s "$KEYS_SOURCE" -o "$KEYS_FILE"
|
|
||||||
|
|
||||||
if [[ $? -ne 0 || ! -s "$KEYS_FILE" ]]; then
|
if ! curl -s "$KEYS_SOURCE" -o "$KEYS_FILE" || [[ ! -s "$KEYS_FILE" ]]; then
|
||||||
|
rm -f "$KEYS_FILE" 2> /dev/null || true
|
||||||
log_message "Error: Failed to fetch keys from $KEYS_SOURCE"
|
log_message "Error: Failed to fetch keys from $KEYS_SOURCE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -126,10 +126,12 @@ encrypt_file_or_directory()
|
|||||||
elif [[ -f "$file" ]]; then
|
elif [[ -f "$file" ]]; then
|
||||||
fetch_keys_if_missing
|
fetch_keys_if_missing
|
||||||
local output_file="${file}.age"
|
local output_file="${file}.age"
|
||||||
age -R "$KEYS_FILE" "$file" > "$output_file"
|
local temp_file
|
||||||
if [[ $? -eq 0 ]]; then
|
temp_file="$(mktemp -p "$(dirname "$file")")"
|
||||||
|
if age -R "$KEYS_FILE" "$file" > "$temp_file" && mv "$temp_file" "$output_file"; then
|
||||||
log_message "File encrypted successfully: $output_file"
|
log_message "File encrypted successfully: $output_file"
|
||||||
else
|
else
|
||||||
|
rm -f "$temp_file"
|
||||||
log_message "Error: Failed to encrypt file '$file'."
|
log_message "Error: Failed to encrypt file '$file'."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -147,10 +149,12 @@ decrypt_file_or_directory()
|
|||||||
elif [[ -f "$file" ]]; then
|
elif [[ -f "$file" ]]; then
|
||||||
fetch_keys_if_missing
|
fetch_keys_if_missing
|
||||||
local output_file="${file%.age}"
|
local output_file="${file%.age}"
|
||||||
age -d -i "$KEYS_FILE" "$file" > "$output_file"
|
local temp_file
|
||||||
if [[ $? -eq 0 ]]; then
|
temp_file="$(mktemp -p "$(dirname "$file")")"
|
||||||
|
if age -d -i "$KEYS_FILE" "$file" > "$temp_file" && mv "$temp_file" "$output_file"; then
|
||||||
log_message "File decrypted successfully: $output_file"
|
log_message "File decrypted successfully: $output_file"
|
||||||
else
|
else
|
||||||
|
rm -f "$temp_file"
|
||||||
log_message "Error: Failed to decrypt file '$file'."
|
log_message "Error: Failed to decrypt file '$file'."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
11
local/bin/ad
11
local/bin/ad
@@ -36,9 +36,8 @@ if [[ ! -f "$KEYS_FILE" ]]; then
|
|||||||
mkdir -p "$(dirname "$KEYS_FILE")"
|
mkdir -p "$(dirname "$KEYS_FILE")"
|
||||||
|
|
||||||
# Fetch the keys and save to the file
|
# Fetch the keys and save to the file
|
||||||
curl -s "$KEYS_SOURCE" -o "$KEYS_FILE"
|
if ! curl -s "$KEYS_SOURCE" -o "$KEYS_FILE" || [[ ! -s "$KEYS_FILE" ]]; then
|
||||||
|
rm -f "$KEYS_FILE" 2> /dev/null || true
|
||||||
if [[ $? -ne 0 || ! -s "$KEYS_FILE" ]]; then
|
|
||||||
echo "Error: Failed to fetch keys from $KEYS_SOURCE"
|
echo "Error: Failed to fetch keys from $KEYS_SOURCE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -50,11 +49,11 @@ fi
|
|||||||
|
|
||||||
# Decrypt the file
|
# Decrypt the file
|
||||||
OUTPUT_FILE="${FILE%.age}"
|
OUTPUT_FILE="${FILE%.age}"
|
||||||
age -d -i "$KEYS_FILE" "$FILE" > "$OUTPUT_FILE"
|
TEMP_FILE="$(mktemp -p "$(dirname "$OUTPUT_FILE")")"
|
||||||
|
if age -d -i "$KEYS_FILE" "$FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$OUTPUT_FILE"; then
|
||||||
if [[ $? -eq 0 ]]; then
|
|
||||||
echo "File decrypted successfully: $OUTPUT_FILE"
|
echo "File decrypted successfully: $OUTPUT_FILE"
|
||||||
else
|
else
|
||||||
|
rm -f "$TEMP_FILE"
|
||||||
echo "Error: Failed to decrypt file."
|
echo "Error: Failed to decrypt file."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -37,9 +37,7 @@ if [[ ! -f "$KEYS_FILE" ]]; then
|
|||||||
mkdir -p "$(dirname "$KEYS_FILE")"
|
mkdir -p "$(dirname "$KEYS_FILE")"
|
||||||
|
|
||||||
# Fetch the keys and save to the file
|
# Fetch the keys and save to the file
|
||||||
curl -s "$KEYS_SOURCE" -o "$KEYS_FILE"
|
if ! curl -s "$KEYS_SOURCE" -o "$KEYS_FILE" || [[ ! -s "$KEYS_FILE" ]]; then
|
||||||
|
|
||||||
if [[ $? -ne 0 || ! -s "$KEYS_FILE" ]]; then
|
|
||||||
echo "Error: Failed to fetch keys from $KEYS_SOURCE"
|
echo "Error: Failed to fetch keys from $KEYS_SOURCE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -51,9 +49,7 @@ fi
|
|||||||
|
|
||||||
# Encrypt the file
|
# Encrypt the file
|
||||||
OUTPUT_FILE="${FILE}.age"
|
OUTPUT_FILE="${FILE}.age"
|
||||||
age -R "$KEYS_FILE" "$FILE" > "$OUTPUT_FILE"
|
if age -R "$KEYS_FILE" "$FILE" > "$OUTPUT_FILE"; then
|
||||||
|
|
||||||
if [[ $? -eq 0 ]]; then
|
|
||||||
echo "File encrypted successfully: $OUTPUT_FILE"
|
echo "File encrypted successfully: $OUTPUT_FILE"
|
||||||
else
|
else
|
||||||
echo "Error: Failed to encrypt file."
|
echo "Error: Failed to encrypt file."
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ source_file()
|
|||||||
case "$CURRENT_SHELL" in
|
case "$CURRENT_SHELL" in
|
||||||
fish)
|
fish)
|
||||||
if [[ -f "$file.fish" ]]; then
|
if [[ -f "$file.fish" ]]; then
|
||||||
|
# shellcheck disable=SC1090
|
||||||
source "$file.fish"
|
source "$file.fish"
|
||||||
else
|
else
|
||||||
echo "Fish shell file not found: $file.fish"
|
echo "Fish shell file not found: $file.fish"
|
||||||
@@ -32,6 +33,7 @@ source_file()
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
sh | bash | zsh)
|
sh | bash | zsh)
|
||||||
|
# shellcheck disable=SC1090
|
||||||
source "$file"
|
source "$file"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ if [[ ! "$opt" =~ "-E" ]] && tmux list-panes -F '#F' | grep -q Z; then
|
|||||||
zoomed_without_popup=1
|
zoomed_without_popup=1
|
||||||
original_window=$(tmux display-message -p "#{window_id}")
|
original_window=$(tmux display-message -p "#{window_id}")
|
||||||
tmp_window=$(tmux new-window -d -P -F "#{window_id}" "bash -c 'while :; do for c in \\| / - '\\;' do sleep 0.2; printf \"\\r\$c fzf-tmux is running\\r\"; done; done'")
|
tmp_window=$(tmux new-window -d -P -F "#{window_id}" "bash -c 'while :; do for c in \\| / - '\\;' do sleep 0.2; printf \"\\r\$c fzf-tmux is running\\r\"; done; done'")
|
||||||
tmux swap-pane -t $tmp_window \; select-window -t $tmp_window
|
tmux swap-pane -t "$tmp_window" \; select-window -t "$tmp_window"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
@@ -154,15 +154,16 @@ fifo1="${TMPDIR:-/tmp}/fzf-fifo1-$id"
|
|||||||
fifo2="${TMPDIR:-/tmp}/fzf-fifo2-$id"
|
fifo2="${TMPDIR:-/tmp}/fzf-fifo2-$id"
|
||||||
fifo3="${TMPDIR:-/tmp}/fzf-fifo3-$id"
|
fifo3="${TMPDIR:-/tmp}/fzf-fifo3-$id"
|
||||||
if tmux_win_opts=$(tmux show-options -p remain-on-exit \; show-options -p synchronize-panes 2> /dev/null); then
|
if tmux_win_opts=$(tmux show-options -p remain-on-exit \; show-options -p synchronize-panes 2> /dev/null); then
|
||||||
tmux_win_opts=($(sed '/ off/d; s/synchronize-panes/set-option -p synchronize-panes/; s/remain-on-exit/set-option -p remain-on-exit/; s/$/ \\;/' <<< "$tmux_win_opts"))
|
mapfile -t tmux_win_opts < <(sed '/ off/d; s/synchronize-panes/set-option -p synchronize-panes/; s/remain-on-exit/set-option -p remain-on-exit/; s/$/ \\;/' <<< "$tmux_win_opts")
|
||||||
tmux_off_opts='; set-option -p synchronize-panes off ; set-option -p remain-on-exit off'
|
tmux_off_opts='; set-option -p synchronize-panes off ; set-option -p remain-on-exit off'
|
||||||
else
|
else
|
||||||
tmux_win_opts=($(tmux show-window-options remain-on-exit \; show-window-options synchronize-panes | sed '/ off/d; s/^/set-window-option /; s/$/ \\;/'))
|
mapfile -t tmux_win_opts < <(tmux show-window-options remain-on-exit \; show-window-options synchronize-panes | sed '/ off/d; s/^/set-window-option /; s/$/ \\;/')
|
||||||
tmux_off_opts='; set-window-option synchronize-panes off ; set-window-option remain-on-exit off'
|
tmux_off_opts='; set-window-option synchronize-panes off ; set-window-option remain-on-exit off'
|
||||||
fi
|
fi
|
||||||
|
# shellcheck disable=SC2329
|
||||||
cleanup()
|
cleanup()
|
||||||
{
|
{
|
||||||
\rm -f $argsf $fifo1 $fifo2 $fifo3
|
\rm -f "$argsf" "$fifo1" "$fifo2" "$fifo3"
|
||||||
|
|
||||||
# Restore tmux window options
|
# Restore tmux window options
|
||||||
if [[ "${#tmux_win_opts[@]}" -gt 0 ]]; then
|
if [[ "${#tmux_win_opts[@]}" -gt 0 ]]; then
|
||||||
@@ -172,9 +173,9 @@ cleanup()
|
|||||||
# Remove temp window if we were zoomed without popup options
|
# Remove temp window if we were zoomed without popup options
|
||||||
if [[ -n "$zoomed_without_popup" ]]; then
|
if [[ -n "$zoomed_without_popup" ]]; then
|
||||||
tmux display-message -p "#{window_id}" > /dev/null
|
tmux display-message -p "#{window_id}" > /dev/null
|
||||||
tmux swap-pane -t $original_window \; \
|
tmux swap-pane -t "$original_window" \; \
|
||||||
select-window -t $original_window \; \
|
select-window -t "$original_window" \; \
|
||||||
kill-window -t $tmp_window \; \
|
kill-window -t "$tmp_window" \; \
|
||||||
resize-pane -Z
|
resize-pane -Z
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -209,39 +210,40 @@ echo "$envs;" > "$argsf"
|
|||||||
opts=$(printf "%q " "${args[@]}")
|
opts=$(printf "%q " "${args[@]}")
|
||||||
|
|
||||||
pppid=$$
|
pppid=$$
|
||||||
echo -n "trap 'kill -SIGUSR1 -$pppid' EXIT SIGINT SIGTERM;" >> $argsf
|
echo -n "trap 'kill -SIGUSR1 -$pppid' EXIT SIGINT SIGTERM;" >> "$argsf"
|
||||||
close="; trap - EXIT SIGINT SIGTERM $close"
|
close="; trap - EXIT SIGINT SIGTERM $close"
|
||||||
|
|
||||||
export TMUX=$(cut -d , -f 1,2 <<< "$TMUX")
|
export TMUX
|
||||||
mkfifo -m o+w $fifo2
|
TMUX=$(cut -d , -f 1,2 <<< "$TMUX")
|
||||||
|
mkfifo -m o+w "$fifo2"
|
||||||
if [[ "$opt" =~ "-E" ]]; then
|
if [[ "$opt" =~ "-E" ]]; then
|
||||||
cat $fifo2 &
|
cat "$fifo2" &
|
||||||
if [[ -n "$term" ]] || [[ -t 0 ]]; then
|
if [[ -n "$term" ]] || [[ -t 0 ]]; then
|
||||||
cat <<< "\"$fzf\" $opts > $fifo2; out=\$? $close; exit \$out" >> $argsf
|
cat <<< "\"$fzf\" $opts > $fifo2; out=\$? $close; exit \$out" >> "$argsf"
|
||||||
else
|
else
|
||||||
mkfifo $fifo1
|
mkfifo "$fifo1"
|
||||||
cat <<< "\"$fzf\" $opts < $fifo1 > $fifo2; out=\$? $close; exit \$out" >> $argsf
|
cat <<< "\"$fzf\" $opts < $fifo1 > $fifo2; out=\$? $close; exit \$out" >> "$argsf"
|
||||||
cat <&0 > $fifo1 &
|
cat <&0 > "$fifo1" &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmux popup -d "$PWD" $opt "bash $argsf" > /dev/null 2>&1
|
tmux popup -d "$PWD" "$opt" "bash $argsf" > /dev/null 2>&1
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkfifo -m o+w $fifo3
|
mkfifo -m o+w "$fifo3"
|
||||||
if [[ -n "$term" ]] || [[ -t 0 ]]; then
|
if [[ -n "$term" ]] || [[ -t 0 ]]; then
|
||||||
cat <<< "\"$fzf\" $opts > $fifo2; echo \$? > $fifo3 $close" >> $argsf
|
cat <<< "\"$fzf\" $opts > $fifo2; echo \$? > $fifo3 $close" >> "$argsf"
|
||||||
else
|
else
|
||||||
mkfifo $fifo1
|
mkfifo "$fifo1"
|
||||||
cat <<< "\"$fzf\" $opts < $fifo1 > $fifo2; echo \$? > $fifo3 $close" >> $argsf
|
cat <<< "\"$fzf\" $opts < $fifo1 > $fifo2; echo \$? > $fifo3 $close" >> "$argsf"
|
||||||
cat <&0 > $fifo1 &
|
cat <&0 > "$fifo1" &
|
||||||
fi
|
fi
|
||||||
tmux \
|
tmux \
|
||||||
split-window -c "$PWD" $opt "bash -c 'exec -a fzf bash $argsf'" $swap \
|
split-window -c "$PWD" "$opt" "bash -c 'exec -a fzf bash $argsf'" "$swap" \
|
||||||
$tmux_off_opts \
|
"$tmux_off_opts" \
|
||||||
> /dev/null 2>&1 || {
|
> /dev/null 2>&1 || {
|
||||||
"$fzf" "${args[@]}"
|
"$fzf" "${args[@]}"
|
||||||
exit $?
|
exit $?
|
||||||
}
|
}
|
||||||
cat $fifo2
|
cat "$fifo2"
|
||||||
exit "$(cat $fifo3)"
|
exit "$(cat "$fifo3")"
|
||||||
|
|||||||
@@ -25,27 +25,27 @@ fi
|
|||||||
# Output functions
|
# Output functions
|
||||||
msg_err()
|
msg_err()
|
||||||
{
|
{
|
||||||
echo -e "\e[31m$@\e[0m" >&2
|
echo -e "\e[31m$*\e[0m" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
msg_success()
|
msg_success()
|
||||||
{
|
{
|
||||||
echo -e "\e[32m$@\e[0m"
|
echo -e "\e[32m$*\e[0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
msg_warn()
|
msg_warn()
|
||||||
{
|
{
|
||||||
echo -e "\e[33m$@\e[0m" >&2
|
echo -e "\e[33m$*\e[0m" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
msg_info()
|
msg_info()
|
||||||
{
|
{
|
||||||
echo -e "\e[36m$@\e[0m"
|
echo -e "\e[36m$*\e[0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
msg_debug()
|
msg_debug()
|
||||||
{
|
{
|
||||||
[[ $VERBOSE -eq 1 ]] && echo -e "\e[35m$@\e[0m"
|
[[ $VERBOSE -eq 1 ]] && echo -e "\e[35m$*\e[0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
show_help()
|
show_help()
|
||||||
@@ -180,7 +180,8 @@ format_rule()
|
|||||||
get_file_extension()
|
get_file_extension()
|
||||||
{
|
{
|
||||||
local file="$1"
|
local file="$1"
|
||||||
local basename=$(basename "$file")
|
local basename
|
||||||
|
basename=$(basename "$file")
|
||||||
local extension=""
|
local extension=""
|
||||||
|
|
||||||
# Check if file has no extension or is a dotfile
|
# Check if file has no extension or is a dotfile
|
||||||
@@ -231,8 +232,8 @@ suggest_rule()
|
|||||||
# If file path contains .d/ pattern, we need special handling
|
# If file path contains .d/ pattern, we need special handling
|
||||||
if [[ "$file" =~ \.d/ ]]; then
|
if [[ "$file" =~ \.d/ ]]; then
|
||||||
# Extract the pattern part that includes the .d/ directory
|
# Extract the pattern part that includes the .d/ directory
|
||||||
local dir_part=$(dirname "$file")
|
local dir_part
|
||||||
local base_name=$(basename "$file")
|
dir_part=$(dirname "$file")
|
||||||
|
|
||||||
# Check if it's a config directory pattern worth capturing
|
# Check if it's a config directory pattern worth capturing
|
||||||
if [[ "$dir_part" =~ /(\.d|[^/]+\.d)$ ]]; then
|
if [[ "$dir_part" =~ /(\.d|[^/]+\.d)$ ]]; then
|
||||||
@@ -430,7 +431,8 @@ detect_shell_scripts()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Skip if file extension already covered
|
# Skip if file extension already covered
|
||||||
local extension=$(get_file_extension "$rel_path")
|
local extension
|
||||||
|
extension=$(get_file_extension "$rel_path")
|
||||||
if [[ "$extension" != "$rel_path" ]] && grep -q "^\*\.$extension " <<< "$existing_rules"; then
|
if [[ "$extension" != "$rel_path" ]] && grep -q "^\*\.$extension " <<< "$existing_rules"; then
|
||||||
msg_debug "Script covered by extension rule: $rel_path (*.$extension)"
|
msg_debug "Script covered by extension rule: $rel_path (*.$extension)"
|
||||||
continue
|
continue
|
||||||
@@ -458,7 +460,8 @@ detect_shell_scripts()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Group by directory
|
# Group by directory
|
||||||
local dir=$(dirname "$rel_path")
|
local dir
|
||||||
|
dir=$(dirname "$rel_path")
|
||||||
if [[ "$dir" == "." ]]; then
|
if [[ "$dir" == "." ]]; then
|
||||||
dir="root"
|
dir="root"
|
||||||
fi
|
fi
|
||||||
@@ -480,7 +483,8 @@ detect_shell_scripts()
|
|||||||
|
|
||||||
# Check if we can use directory-based rules instead of individual files
|
# Check if we can use directory-based rules instead of individual files
|
||||||
for dir in "${!scripts_by_dir[@]}"; do
|
for dir in "${!scripts_by_dir[@]}"; do
|
||||||
local files_in_dir=$(echo -e "${scripts_by_dir[$dir]}" | wc -l)
|
local files_in_dir
|
||||||
|
files_in_dir=$(echo -e "${scripts_by_dir[$dir]}" | wc -l)
|
||||||
local dir_path="$dir"
|
local dir_path="$dir"
|
||||||
|
|
||||||
if [[ "$dir" == "root" ]]; then
|
if [[ "$dir" == "root" ]]; then
|
||||||
@@ -575,7 +579,8 @@ suggest_gitattributes()
|
|||||||
declare -A seen_patterns=()
|
declare -A seen_patterns=()
|
||||||
|
|
||||||
while IFS= read -r file; do
|
while IFS= read -r file; do
|
||||||
local suggestion=$(suggest_rule "$file")
|
local suggestion
|
||||||
|
suggestion=$(suggest_rule "$file")
|
||||||
if [[ -n "$suggestion" ]]; then
|
if [[ -n "$suggestion" ]]; then
|
||||||
IFS=':' read -r pattern attributes <<< "$suggestion"
|
IFS=':' read -r pattern attributes <<< "$suggestion"
|
||||||
|
|
||||||
@@ -639,7 +644,8 @@ suggest_gitattributes()
|
|||||||
formatted_suggestions+="$pattern\n"
|
formatted_suggestions+="$pattern\n"
|
||||||
echo "$pattern"
|
echo "$pattern"
|
||||||
else
|
else
|
||||||
local formatted_rule=$(printf "%-${format_width}s %s\n" "$pattern" "$attributes")
|
local formatted_rule
|
||||||
|
formatted_rule=$(printf "%-${format_width}s %s\n" "$pattern" "$attributes")
|
||||||
formatted_suggestions+="$formatted_rule\n"
|
formatted_suggestions+="$formatted_rule\n"
|
||||||
echo "$formatted_rule"
|
echo "$formatted_rule"
|
||||||
fi
|
fi
|
||||||
|
|||||||
1
local/bin/iterm2_shell_integration.zsh
Executable file → Normal file
1
local/bin/iterm2_shell_integration.zsh
Executable file → Normal file
@@ -1,3 +1,4 @@
|
|||||||
|
# shellcheck disable=all
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# as published by the Free Software Foundation; either version 2
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ if [ ! -x "${CURL}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
devices="$(printf "${devices}" | xargs -n1 | sort -u | uniq)\n"
|
devices="$(printf "%s" "${devices}" | xargs -n1 | sort -u)"
|
||||||
|
|
||||||
if [ -z "${devices}" ]; then
|
if [ -z "${devices}" ]; then
|
||||||
__pushover_send_message
|
__pushover_send_message
|
||||||
|
|||||||
@@ -126,11 +126,11 @@ if [[ -f "$CONFIG_FILE" ]]; then
|
|||||||
PROTECTED_KEYS+=("$key")
|
PROTECTED_KEYS+=("$key")
|
||||||
done <<< "$CUSTOM_KEYS"
|
done <<< "$CUSTOM_KEYS"
|
||||||
|
|
||||||
SKIPPED+=("$(yq '.skipped_keys[]' "$CONFIG_FILE")")
|
mapfile -t SKIPPED < <(yq '.skipped_keys[]' "$CONFIG_FILE")
|
||||||
while IFS= read -r key; do
|
for key in "${SKIPPED[@]}"; do
|
||||||
# Add to default_skipped_keys
|
# Add to default_skipped_keys
|
||||||
SKIPPED_KEYS+=("$key")
|
SKIPPED_KEYS+=("$key")
|
||||||
done <<< "$SKIPPED"
|
done
|
||||||
|
|
||||||
CUSTOM_GROUPS=$(yq '.custom_grouping[]' "$CONFIG_FILE")
|
CUSTOM_GROUPS=$(yq '.custom_grouping[]' "$CONFIG_FILE")
|
||||||
while IFS= read -r group; do
|
while IFS= read -r group; do
|
||||||
@@ -159,6 +159,7 @@ is_protected()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
# Wildcard match (protected_key contains '*')
|
# Wildcard match (protected_key contains '*')
|
||||||
|
# shellcheck disable=SC2053 # Intentional glob matching - protected_key contains wildcard patterns
|
||||||
if [[ "$protected_key" == *"*"* ]] && [[ "$key" == $protected_key ]]; then
|
if [[ "$protected_key" == *"*"* ]] && [[ "$key" == $protected_key ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@@ -198,6 +199,7 @@ is_skipped()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
# Wildcard match (skipped_key contains '*')
|
# Wildcard match (skipped_key contains '*')
|
||||||
|
# shellcheck disable=SC2053 # Intentional glob matching - skipped_key contains wildcard patterns
|
||||||
if [[ "$skipped_key" == *"*"* ]] && [[ "$key" == $skipped_key ]]; then
|
if [[ "$skipped_key" == *"*"* ]] && [[ "$key" == $skipped_key ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@@ -244,8 +246,15 @@ while IFS='=' read -r key value; do
|
|||||||
value="[protected value]"
|
value="[protected value]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update group data
|
# Update group data - check if group already exists
|
||||||
if [[ ! " ${all_groups[*]} " =~ " $group " ]]; then
|
group_exists=false
|
||||||
|
for existing_group in "${all_groups[@]}"; do
|
||||||
|
if [[ "$existing_group" == "$group" ]]; then
|
||||||
|
group_exists=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ "$group_exists" == false ]]; then
|
||||||
all_groups+=("$group")
|
all_groups+=("$group")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,9 @@ config_msg()
|
|||||||
{
|
{
|
||||||
# if $1 is empty, return
|
# if $1 is empty, return
|
||||||
[ -z "$1" ] && return
|
[ -z "$1" ] && return
|
||||||
[ -z "$2" ] && $2=""
|
|
||||||
|
|
||||||
local msg_type="$1"
|
local msg_type="$1"
|
||||||
local msg_content="$2"
|
local msg_content="${2:-}"
|
||||||
[[ "$VERBOSE" -eq 1 ]] && printf 'x-load-configs: %s %s\n' "$msg_type" "$msg_content"
|
[[ "$VERBOSE" -eq 1 ]] && printf 'x-load-configs: %s %s\n' "$msg_type" "$msg_content"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -50,7 +49,8 @@ source_config()
|
|||||||
{
|
{
|
||||||
local config_file=$1
|
local config_file=$1
|
||||||
if [ -f "$config_file" ]; then
|
if [ -f "$config_file" ]; then
|
||||||
eval "$config_file"
|
# shellcheck disable=SC1090
|
||||||
|
source "$config_file"
|
||||||
config_msg "Sourced" "$config_file"
|
config_msg "Sourced" "$config_file"
|
||||||
else
|
else
|
||||||
msg "Config file $config_file not found"
|
msg "Config file $config_file not found"
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ log_debug()
|
|||||||
filter_coderabbit_addressed_comments()
|
filter_coderabbit_addressed_comments()
|
||||||
{
|
{
|
||||||
local input_data="$1"
|
local input_data="$1"
|
||||||
local is_wrapped="$2" # true for {comments: [...]}, false for [...]
|
local is_wrapped="$2" # true for {comments: [...]}, false for [...]
|
||||||
|
|
||||||
local jq_filter='select(
|
local jq_filter='select(
|
||||||
(.user.login | contains("coderabbit") | not) or
|
(.user.login | contains("coderabbit") | not) or
|
||||||
@@ -68,9 +68,9 @@ filter_coderabbit_addressed_comments()
|
|||||||
)'
|
)'
|
||||||
|
|
||||||
if [[ "$is_wrapped" == "true" ]]; then
|
if [[ "$is_wrapped" == "true" ]]; then
|
||||||
echo "$input_data" | jq "{comments: [.comments[] | $jq_filter]}" 2>/dev/null || echo "$input_data"
|
echo "$input_data" | jq "{comments: [.comments[] | $jq_filter]}" 2> /dev/null || echo "$input_data"
|
||||||
else
|
else
|
||||||
echo "$input_data" | jq "[.[] | $jq_filter]" 2>/dev/null || echo "$input_data"
|
echo "$input_data" | jq "[.[] | $jq_filter]" 2> /dev/null || echo "$input_data"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,13 +79,13 @@ fetch_and_filter_data()
|
|||||||
{
|
{
|
||||||
local endpoint="$1"
|
local endpoint="$1"
|
||||||
local data_name="$2"
|
local data_name="$2"
|
||||||
local is_wrapped="$3" # true/false
|
local is_wrapped="$3" # true/false
|
||||||
|
|
||||||
local data
|
local data
|
||||||
data=$(gh api "$endpoint" 2>/dev/null || echo "[]")
|
data=$(gh api "$endpoint" 2> /dev/null || echo "[]")
|
||||||
|
|
||||||
if [[ "$is_wrapped" == "true" ]]; then
|
if [[ "$is_wrapped" == "true" ]]; then
|
||||||
data=$(echo "$data" | jq '{comments: .}' 2>/dev/null || echo '{"comments":[]}')
|
data=$(echo "$data" | jq '{comments: .}' 2> /dev/null || echo '{"comments":[]}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
data=$(filter_coderabbit_addressed_comments "$data" "$is_wrapped")
|
data=$(filter_coderabbit_addressed_comments "$data" "$is_wrapped")
|
||||||
@@ -94,14 +94,12 @@ fetch_and_filter_data()
|
|||||||
[[ "$is_wrapped" == "true" ]] && count_field=".comments | length"
|
[[ "$is_wrapped" == "true" ]] && count_field=".comments | length"
|
||||||
|
|
||||||
local count
|
local count
|
||||||
count=$(echo "$data" | jq -r "$count_field" 2>/dev/null || echo "0")
|
count=$(echo "$data" | jq -r "$count_field" 2> /dev/null || echo "0")
|
||||||
log_debug "$data_name count: $count"
|
log_debug "$data_name count: $count"
|
||||||
|
|
||||||
echo "$data"
|
echo "$data"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Format file-specific comments grouped by review
|
# Format file-specific comments grouped by review
|
||||||
format_grouped_review_comments()
|
format_grouped_review_comments()
|
||||||
{
|
{
|
||||||
@@ -110,7 +108,7 @@ format_grouped_review_comments()
|
|||||||
local repo="$3"
|
local repo="$3"
|
||||||
|
|
||||||
local count
|
local count
|
||||||
count=$(echo "$review_comments" | jq -r 'length' 2>/dev/null || echo "0")
|
count=$(echo "$review_comments" | jq -r 'length' 2> /dev/null || echo "0")
|
||||||
|
|
||||||
if [[ "$count" -eq 0 ]]; then
|
if [[ "$count" -eq 0 ]]; then
|
||||||
echo "No file-specific comments found."
|
echo "No file-specific comments found."
|
||||||
@@ -143,7 +141,7 @@ Review ID: \($review.id) - API: gh api /repos/'"$repo"'/pulls/1/reviews/\($revie
|
|||||||
"] | join("")) + "
|
"] | join("")) + "
|
||||||
---
|
---
|
||||||
"
|
"
|
||||||
' 2>/dev/null || {
|
' 2> /dev/null || {
|
||||||
log_debug "Error grouping review comments by review ID"
|
log_debug "Error grouping review comments by review ID"
|
||||||
echo "Error parsing grouped review comments."
|
echo "Error parsing grouped review comments."
|
||||||
}
|
}
|
||||||
@@ -244,7 +242,7 @@ EOF
|
|||||||
**URL:** \(.url)
|
**URL:** \(.url)
|
||||||
**Number:** '"$pr_number"'
|
**Number:** '"$pr_number"'
|
||||||
**Repository:** '"$repo"'
|
**Repository:** '"$repo"'
|
||||||
"' 2>/dev/null || {
|
"' 2> /dev/null || {
|
||||||
echo "**Error:** Could not parse PR information"
|
echo "**Error:** Could not parse PR information"
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|||||||
2
local/bin/x-ssh-audit
Normal file → Executable file
2
local/bin/x-ssh-audit
Normal file → Executable file
@@ -350,7 +350,7 @@ ssh_with_retry()
|
|||||||
log_message "INFO" "Trying SSH agent/default authentication"
|
log_message "INFO" "Trying SSH agent/default authentication"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086,SC2029
|
||||||
if ssh $ssh_opts "${username}@${host}" "$command" 2> /dev/null; then
|
if ssh $ssh_opts "${username}@${host}" "$command" 2> /dev/null; then
|
||||||
if [ "$try_key" != "NO_KEY" ]; then
|
if [ "$try_key" != "NO_KEY" ]; then
|
||||||
log_message "SUCCESS" "Connected using SSH key: $try_key"
|
log_message "SUCCESS" "Connected using SSH key: $try_key"
|
||||||
|
|||||||
@@ -52,17 +52,18 @@ fi
|
|||||||
for name in "$@"; do
|
for name in "$@"; do
|
||||||
|
|
||||||
# Make a temporary file
|
# Make a temporary file
|
||||||
# Test if we have BSD or GNU version of mktemp
|
# Try GNU syntax first, fall back to BSD
|
||||||
if (strings "$(which mktemp)" | grep -q GNU); then
|
if tmp=$(mktemp 2> /dev/null) && [ -f "$tmp" ]; then
|
||||||
# We have the GNU version
|
# GNU mktemp succeeded
|
||||||
tmp=$(mktemp)
|
:
|
||||||
else
|
else
|
||||||
# We have the BSD version
|
# Try BSD syntax
|
||||||
tmp=$(mktemp -t tmp)
|
tmp=$(mktemp -t tmp)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Download the certificate
|
# Download the certificate
|
||||||
if (! echo "" | openssl s_client -connect "$name:$port" > "$tmp" 2> /dev/null); then
|
if (! echo "" | openssl s_client -connect "$name:$port" > "$tmp" 2> /dev/null); then
|
||||||
|
rm -f "$tmp"
|
||||||
echo "Failed to get cert from https://$name:$port/"
|
echo "Failed to get cert from https://$name:$port/"
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
@@ -74,26 +75,26 @@ for name in "$@"; do
|
|||||||
rm -f "$tmp"
|
rm -f "$tmp"
|
||||||
|
|
||||||
# Convert the expiry date + todays date to seconds-past epoch
|
# Convert the expiry date + todays date to seconds-past epoch
|
||||||
# Check if we have the BSD or the GNU version of date
|
# Try GNU syntax first, fall back to BSD
|
||||||
if (strings "$(which date)" | grep -q GNU); then
|
if then=$(date --date "$date" +%s 2> /dev/null); then
|
||||||
# We have GNU this is easy
|
# GNU date succeeded
|
||||||
then=$(date --date "$date" +%s)
|
:
|
||||||
else
|
else
|
||||||
# We have BSD now it is getting complicated
|
# BSD date requires manual parsing
|
||||||
year=$(echo "$date" | awk '{print $4}')
|
year=$(echo "$date" | awk '{print $4}')
|
||||||
month=$(echo "$date" | awk '{print $1}')
|
month=$(echo "$date" | awk '{print $1}')
|
||||||
day=$(echo "$date" | awk '{print $2}')
|
day=$(echo "$date" | awk '{print $2}')
|
||||||
hour=$(echo "$date" | awk '{print $3}' | awk -F: '{print $1}')
|
hour=$(echo "$date" | awk '{print $3}' | awk -F: '{print $1}')
|
||||||
minute=$(echo "$date" | awk '{print $3}' | awk -F: '{print $2}')
|
minute=$(echo "$date" | awk '{print $3}' | awk -F: '{print $2}')
|
||||||
second=$(echo "$date" | awk '{print $3}' | awk -F: '{print $3}')
|
second=$(echo "$date" | awk '{print $3}' | awk -F: '{print $3}')
|
||||||
then=$(date -v${year}y -v${month} -v${day}d -v${hour}H -v${minute}M -v${second}S -u +%s)
|
then=$(date -v"${year}"y -v"${month}" -v"${day}"d -v"${hour}"H -v"${minute}"M -v"${second}"S -u +%s)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
now=$(date +%s)
|
now=$(date +%s)
|
||||||
|
|
||||||
# Day diff
|
# Day diff
|
||||||
diff=$(("$then" - "$now"))
|
diff=$(("$then" - "$now"))
|
||||||
diff=$($diff / 86400)
|
diff=$((diff / 86400))
|
||||||
|
|
||||||
# All done
|
# All done
|
||||||
if [ "$days" = "1" ]; then
|
if [ "$days" = "1" ]; then
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ resetOutput()
|
|||||||
# ranging between 0 and 255 inclusive
|
# ranging between 0 and 255 inclusive
|
||||||
rainbowColor()
|
rainbowColor()
|
||||||
{
|
{
|
||||||
let h=$1/43
|
((h = $1 / 43))
|
||||||
let f=$1-43*$h
|
((f = $1 - 43 * h))
|
||||||
let t=$f*255/43
|
((t = f * 255 / 43))
|
||||||
let q=255-t
|
((q = 255 - t))
|
||||||
|
|
||||||
if [ $h -eq 0 ]; then
|
if [ $h -eq 0 ]; then
|
||||||
echo "255 $t 0"
|
echo "255 $t 0"
|
||||||
@@ -81,11 +81,13 @@ done
|
|||||||
resetOutput
|
resetOutput
|
||||||
|
|
||||||
for i in $(seq 0 127); do
|
for i in $(seq 0 127); do
|
||||||
|
# shellcheck disable=SC2046 # Intentional word splitting to pass 3 RGB values as separate args
|
||||||
setBackgroundColor $(rainbowColor "$i")
|
setBackgroundColor $(rainbowColor "$i")
|
||||||
echo -n " "
|
echo -n " "
|
||||||
done
|
done
|
||||||
resetOutput
|
resetOutput
|
||||||
for i in $(seq 255 128); do
|
for i in $(seq 255 128); do
|
||||||
|
# shellcheck disable=SC2046 # Intentional word splitting to pass 3 RGB values as separate args
|
||||||
setBackgroundColor $(rainbowColor "$i")
|
setBackgroundColor $(rainbowColor "$i")
|
||||||
echo -n " "
|
echo -n " "
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -126,8 +126,8 @@ parse_options()
|
|||||||
# Generate thumbnails recursively using find and filtering by MIME type
|
# Generate thumbnails recursively using find and filtering by MIME type
|
||||||
generate_thumbnails()
|
generate_thumbnails()
|
||||||
{
|
{
|
||||||
local source_dir=$1
|
local source_dir="$1"
|
||||||
local output_dir=$2
|
local output_dir="$2"
|
||||||
|
|
||||||
# Ensure the output directory exists (create if necessary)
|
# Ensure the output directory exists (create if necessary)
|
||||||
if [ ! -d "$output_dir" ]; then
|
if [ ! -d "$output_dir" ]; then
|
||||||
@@ -144,7 +144,7 @@ generate_thumbnails()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine the relative path with respect to the source directory.
|
# Determine the relative path with respect to the source directory.
|
||||||
rel_path="${file#$source_dir/}"
|
rel_path="${file#"$source_dir"/}"
|
||||||
dir="$(dirname "$rel_path")"
|
dir="$(dirname "$rel_path")"
|
||||||
base="$(basename "$rel_path")"
|
base="$(basename "$rel_path")"
|
||||||
filename="${base%.*}"
|
filename="${base%.*}"
|
||||||
|
|||||||
17
package.json
17
package.json
@@ -6,14 +6,13 @@
|
|||||||
"doc": "docs"
|
"doc": "docs"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint:markdown": "markdownlint -d .",
|
"lint:biome": "biome check .",
|
||||||
"fix:markdown": "markdownlint -df .",
|
"fix:biome": "biome check --write .",
|
||||||
"lint:prettier": "prettier . --check",
|
"format": "biome format --write .",
|
||||||
"fix:prettier": "prettier . --write",
|
|
||||||
"test": "bash test-all.sh",
|
"test": "bash test-all.sh",
|
||||||
"lint:ec": "ec -f gcc",
|
"lint:ec": "ec -f gcc",
|
||||||
"lint": "yarn lint:markdown && yarn lint:prettier && yarn lint:ec",
|
"lint": "yarn lint:biome && yarn lint:ec",
|
||||||
"fix": "yarn fix:markdown && yarn fix:prettier"
|
"fix": "yarn fix:biome"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -30,13 +29,11 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/ivuorinen/dotfiles#readme",
|
"homepage": "https://github.com/ivuorinen/dotfiles#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ivuorinen/base-configs": "^2.0.0",
|
"@biomejs/biome": "^2.3.1",
|
||||||
"@types/node": "^24.0.1",
|
"@types/node": "^24.0.1",
|
||||||
"bats": "^1.12.0",
|
"bats": "^1.12.0",
|
||||||
"editorconfig-checker": "^6.1.0",
|
"editorconfig-checker": "^6.1.0",
|
||||||
"markdownlint": "^0.39.0",
|
|
||||||
"prettier": "^3.6.2",
|
|
||||||
"typescript": "^5.8.3"
|
"typescript": "^5.8.3"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@1.22.22"
|
"packageManager": "yarn@4.12.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user