Compare commits

...

44 Commits

Author SHA1 Message Date
6d72003446 fix(lint): fix all sonarcloud detected issues (#279)
* fix(ci): replace broad permissions with specific scopes in workflows

Replace read-all/write-all with minimum required permission scopes
across all GitHub Actions workflows to follow the principle of least
privilege (SonarCloud rule githubactions:S8234).

* fix(shell): use [[ instead of [ for conditional tests

Replace single brackets with double brackets in bash conditional
expressions across 14 files (28 changes). All scripts use bash
shebangs so [[ is safe everywhere (SonarCloud rule shelldre:S7688).

* fix(shell): add explicit return statements to functions

Add return 0 as the last statement in ~46 shell functions across
17 files that previously relied on implicit return codes
(SonarCloud rule shelldre:S7682).

* fix(shell): assign positional parameters to local variables

Replace direct $1/$2/$3 usage with named local variables in _log(),
msg(), msg_err(), msg_done(), msg_run(), msg_ok(), and array_diff()
(SonarCloud rule shelldre:S7679).

* fix(python): replace dict() constructor with literal

Use {} instead of dict() for empty dictionary initialization
(SonarCloud rule python:S7498).

* fix(shell): fix husky shebang and tolerate npm outdated exit code

* docs(shell): add function docstring comments

* fix(shell): fix heredoc indentation in x-sonarcloud

* feat(python): add ruff linter and formatter configuration

* fix(ci): align megalinter config with biome, ruff, and shfmt settings

* fix(ci): disable black and yaml-prettier in megalinter config

* chore(ci): update ruff-pre-commit to v0.15.0 and fix hook name

* fix(scripts): check for .git dir before skipping clone in install-fonts

* fix(shell): address code review issues in scripts and shared.sh

- Guard wezterm show-keys failure in create-wezterm-keymaps.sh
- Stop masking git failures with return 0 in install-cheat-purebashbible.sh
- Add missing shared.sh source in install-xcode-cli-tools.sh
- Replace exit 1 with return 1 in sourced shared.sh

* fix(scripts): address code review and security findings

- Guard wezterm show-keys failure in create-wezterm-keymaps.sh
- Stop masking git failures with return 0 in install-cheat-purebashbible.sh
- Add missing shared.sh source in install-xcode-cli-tools.sh
- Replace exit 1 with return 1 in sourced shared.sh
- Remove shell=True subprocess calls in x-git-largest-files.py

* style(shell): apply shfmt formatting and add args to pre-commit hook

* fix(python): suppress bandit false positives in x-git-largest-files

* fix(python): add nosemgrep suppression for check_output call

* feat(format): add prettier for YAML formatting

Install prettier, add .prettierrc.json config (200-char width, 2-space
indent, LF endings), .prettierignore, yarn scripts (lint:prettier,
fix:prettier, format:yaml), and pre-commit hook scoped to YAML files.

* style(yaml): apply prettier formatting

* fix(scripts): address remaining code review findings

- Python: use list comprehension to filter empty strings instead of
  slicing off the last element
- create-wezterm-keymaps: write to temp file and mv for atomic updates
- install-xcode-cli-tools: fix shellcheck source directive path

* fix(python): sort imports alphabetically in x-git-largest-files

* fix(lint): disable PYTHON_ISORT in MegaLinter, ruff handles it

* chore(git): add __pycache__ to gitignore

* fix(python): rename ambiguous variable l to line (E741)

* style: remove trailing whitespace and blank lines

* style(fzf): apply shfmt formatting

* style(shell): apply shfmt formatting

* docs(plans): add design documents

* style(docs): add language specifier to fenced code block

* feat(lint): add markdown-table-formatter to dev tooling

Add markdown-table-formatter as a dev dependency with yarn scripts
(lint:md-table, fix:md-table) and a local pre-commit hook to
automatically format markdown tables on commit.
2026-02-07 19:01:02 +02:00
cff3d1dd8a feat(scripts): add x-sonarcloud script for LLM-driven issue analysis
Bridges LLM agents with SonarCloud's REST API to fetch and format
code quality issues as structured markdown with processing instructions.
2026-02-07 13:24:29 +02:00
a47ce85991 chore: remove hammerspoon type generator and types 2026-02-06 09:12:06 +02:00
13dd701eb7 feat(a): improve encryption script with better error handling
- Add dependency check for age and curl with install instructions
- Add --delete flag to remove originals after encryption
- Add -f/--force flag to control overwrite behavior
- Skip already-encrypted .age files during encryption
- Include hidden files (dotglob) when encrypting directories
- Handle empty directories gracefully with nullglob
- Allow flags in any position (proper option parsing)
- Add set -euo pipefail for better error handling
- Update documentation with all features and examples
- Bump version to 1.1.0
2026-02-06 01:51:01 +02:00
cfde007494 fix(shell): clean up rcfiles and remove redundancies
- Remove deprecated GREP_OPTIONS (handled via alias)
- Quote $ZSH_COMPDUMP to prevent word splitting
- Remove duplicate vim alias (nvim alias takes precedence)
- Consolidate completion path to ZSH_CUSTOM_COMPLETION_PATH
- Simplify PATH setup in rcfiles, centralize in exports
- Move LM Studio PATH from rcfiles to exports
- Add clarifying comments for macOS-specific ssh-add
2026-02-06 00:09:03 +02:00
ed4aa2ffe1 feat(scripts): add install-dnf-packages.sh for Fedora/RHEL 2026-02-05 23:46:10 +02:00
bcf11406b6 feat(scripts): add install-apt-packages.sh for Debian/Ubuntu
Install essential developer packages via apt:
- Build tools: build-essential, cmake, pkg-config, autoconf, automake, libtool
- Dev libraries: libssl-dev, libffi-dev, zlib1g-dev, libreadline-dev, etc.
- CLI utilities: jq, tmux, tree, unzip, shellcheck, socat, gnupg

Curated to avoid duplicates with cargo/go installs (ripgrep, fd, fzf, etc.).
Uses batched apt install for efficiency, exits gracefully on non-Debian systems.
2026-02-05 23:42:16 +02:00
443361cddb chore(scripts): remove unused VERBOSE declarations
Remove VERBOSE="${VERBOSE:-0}" from scripts that never reference
$VERBOSE after setting it. The variable is already set in
scripts/shared.sh line 5.
2026-02-05 22:57:20 +02:00
083d30a0c3 fix(scripts): fix shared.sh guard logic and echo -e portability
- shared.sh: simplify guard logic, remove misleading warning message,
  use ${VAR:-} pattern to avoid unbound variable error
- install-cheat-purebashbible.sh: replace echo -e with printf for
  POSIX portability
2026-02-05 22:55:27 +02:00
81190c051a fix(scripts): standardize source paths and quoting
- install-composer.sh: use $DOTFILES instead of $HOME/.dotfiles
- install-macos-defaults.sh: use $DOTFILES, replace which with command -v
- install-xcode-cli-tools.sh: quote command substitution
- create-nvim-keymaps.sh: quote $DEST in nvim redir command
2026-02-05 22:53:04 +02:00
de773ad68f refactor(scripts): add set -euo pipefail to all installer scripts
Add strict error handling to all scripts:
- 13 scripts get `set -euo pipefail`
- install-macos-defaults.sh gets `set -uo pipefail` (without -e) because
  defaults write commands may fail on newer macOS versions
- install-cargo-packages.sh: also add missing source of shared.sh
2026-02-05 22:51:40 +02:00
e8725c4b47 fix(scripts): use safe temp directories and fix composer exit code
- install-ntfy.sh: use mktemp -d with cleanup trap instead of /tmp/ntfy_*
- install-git-crypt.sh: use mktemp -d with cleanup trap instead of /tmp/git-crypt
- install-composer.sh: only move composer.phar if installation succeeded
2026-02-05 22:49:36 +02:00
b8070e2815 fix(scripts): add missing exit after error handlers
Critical bugs where error paths print a message but don't stop execution:
- install-fonts.sh: cd failure now exits properly
- install-ntfy.sh: unsupported OS case now exits with error
- install-git-crypt.sh: git clone and cd failures now exit properly
2026-02-05 22:44:44 +02:00
9de394d8e9 chore(python): add openapi-python-client to uv tools 2026-02-05 22:07:03 +02:00
08de5ea4a6 refactor(submodules): improve old submodule cleanup in add-submodules.sh 2026-02-05 22:07:03 +02:00
0e69b7cb16 refactor: remove dotbot-brew, dotbot-pip submodules and pipx 2026-02-05 22:07:03 +02:00
7c9096d666 fix: standardize shebangs, error handling, and minor issues in x-* scripts
Normalize shebangs to #!/usr/bin/env bash (x-env-list, x-localip).
Use XDG_CONFIG_HOME in x-change-alacritty-theme. Remove unused
VERBOSE variable in x-multi-ping. Add set -euo pipefail to x-when-down
and x-when-up. Add usage header to x-term-colors. Fix notify-call
to notify-send.sh in x-record.
2026-02-05 22:07:03 +02:00
efd9eebc85 fix: resolve critical issues in x-clean-vendordirs, x-foreach, x-ip
x-clean-vendordirs: remove broken msgr dependency (not sourced),
add set -euo pipefail. x-foreach: replace eval on command args with
direct "$@" execution, add usage guard. x-ip: add set -euo pipefail,
curl dependency check, and silent-fail flag.
2026-02-05 22:07:03 +02:00
fc8db1f5b5 refactor(path): consolidate x-path-{append,prepend,remove} as thin wrappers
Add source guard to x-path so its functions can be loaded without
executing the main logic. Rewrite standalone path scripts to source
x-path and call the appropriate function directly, eliminating code
duplication while preserving source-ability for shell integration.
2026-02-05 22:07:03 +02:00
4414e0c3b6 chore: remove unused x-mkd and x-validate-sha256sum.sh scripts
x-mkd's cd-in-subshell cannot work when executed (only sourced) and
is unused in the repo. x-validate-sha256sum.sh duplicates the
functionality of x-sha256sum-matcher.
2026-02-05 22:07:03 +02:00
abb6c9f615 refactor(dfm): clean up portability, dead code, and error handling
Add bash 4.0+ version check with macOS Homebrew bootstrap. Remove
unreachable fish shell detection and source_file function. Fix bugs:
remove dead ntfy menu entry, fix msg/msgr case mismatch in tests,
guard shift calls against empty args, quote $width, fix $"..." locale
string, fix exit 0 on apt error. Replace declare -A with indexed
array in section_scripts. Use early-return guards with msgr warn for
unavailable brew/apt. Replace exit with return in section functions.
2026-02-05 22:07:03 +02:00
57b566704e fix(lint): resolve all lint errors and remove dangling symlinks
Fix 14 editorconfig/biome errors across 6 files: update biome schema
version, replace tabs with spaces, fix continuation indents, and wrap
long lines. Remove dangling OrbStack fish completion symlinks.
2026-02-05 22:07:03 +02:00
renovate[bot]
4510e62070 chore(deps): update ivuorinen/actions action (v2026.01.21 → v2026.02.03) (#278)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-05 17:56:56 +00:00
959e7c418e chore: remove 15 unused config directories and stale references
Drop config folders (aerospace, aqua, asdf, direnv, flipperdevices,
ghostty, htop, misc, nano, task, tealdeer, tms, wtf, yamlfmt,
yamllint) along with starship.toml, nbrc, and aerospace scripts/docs.

Clean up references in dfm, _dfm completions, bashrc, exports, and
exports-lakka to match.
2026-02-04 08:05:37 +02:00
3fb9d2a32e refactor(python): migrate pip to uv and inline packages
Replace pip install --user with uv tool install for CLI tools
(ansible) and uv pip install --system for libraries (libtmux, pynvim).
Drop pipx and pipenv (uv replaces both), delete the external
config/asdf/python-packages file, and rename the script to
install-python-packages to reflect the broader scope.
2026-02-04 03:22:17 +02:00
e1050fc7e1 refactor(npm): inline packages and drop unused dependencies 2026-02-04 03:22:17 +02:00
9d7a1acd30 refactor(go): inline packages and drop unused dependencies
Replace external golang-packages config file with an inline array,
remove 6 unused packages (actionlint, antidot, gopls, templ, html2md,
pup), and update documentation to match cargo script style.
2026-02-04 03:22:17 +02:00
9b7942a9fb refactor(tmux): combine sesh scripts into single bash script
Replace sesh-gum.sh and sesh-tmux.fish with a unified sesh.sh that
cascades through available tools: gum, fzf-tmux, fzf, bash select.
Falls back to native tmux choose-tree if sesh is not installed.
2026-02-04 03:22:17 +02:00
3e6b80b598 chore(tmux): remove unused plugins
Remove tmux-sensible, tmux-mode-indicator, tmux-yank, and
tmux-fzf-url submodules, configurations, and run-shell lines.
2026-02-04 03:22:17 +02:00
f6fb14d651 feat(tmux): configure tmux-suspend with F8 key and visual indicator
Enable suspend key (F8) and add @suspend_suspended_options to show
a ⏸ indicator in the status bar when session is suspended.
2026-02-04 03:22:17 +02:00
bafb8fc2f6 refactor(tmux): update keybindings for pane nav and copy mode
Switch pane navigation from Alt-arrow to Ctrl-arrow (Alt doesn't
work reliably on Linux). Add copy-mode-vi clipboard bindings and
C-p/C-n for window switching.
2026-02-04 03:22:17 +02:00
6b11727540 refactor(tmux): consolidate terminal capabilities into terminal-features
Replace terminal-overrides + terminal-features with a single
terminal-features line declaring RGB, clipboard, usstyle,
strikethrough and overline for xterm-256color (WezTerm).
2026-02-04 03:22:17 +02:00
5f4268d2e0 fix(tmux): correct catppuccin config and remove no-op options
Fix @catppuccin_flavor → @catppuccin_flavour spelling so theme
switching via tmux-dark-notify actually applies mocha/latte.
Remove non-existent variables (@catppuccin_status_background,
@catppuccin_window_flags, @catppuccin_window_text,
@catppuccin_window_current_text) and conflicting status overrides
that catppuccin manages. Add rounded window separators.
2026-02-04 03:22:17 +02:00
ed3f881b93 chore(tmux): remove tmux-window-name submodule
Remove the git submodule, its config in tmux.conf, the zsh hook
in zshrc, and add cleanup entry in add-submodules.sh.
2026-02-04 03:22:17 +02:00
939ee65e7a chore(tmux): remove tmux-window-name plugin 2026-02-04 03:22:17 +02:00
14f0cd00e2 chore(deps): update ivuorinen/phpenv.fish plugin 2026-02-04 03:22:17 +02:00
ddbfed1dd9 chore(fish): update fisher, plugins, and Catppuccin themes
Update fisher to v4.4.8 with uninstall alias and rate limit
handling. Add catppuccin/fish plugin, consolidate Latte theme
into Mocha as light/dark variants, and add Frappe and Macchiato
themes. Set Catppuccin Mocha as the default theme in config.
2026-02-04 03:22:17 +02:00
e19120c45a refactor(scripts): inline cargo packages into install script
Move package list from config/asdf/cargo-packages into
install-cargo-packages.sh as a bash array and remove the
external file. Update documentation accordingly.
2026-02-04 03:22:17 +02:00
renovate[bot]
d46631b017 chore(deps): update simek/yarn-lock-changes action (v0.12.2 → v0.14.0) (#277)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-01 17:56:25 +00:00
cbfc9049a1 Merge remote-tracking branch 'origin/main' 2026-01-25 21:18:14 +02:00
12391d7757 chore(deps): yarn update 2026-01-25 21:17:51 +02:00
10fd3862aa chore: tmux and sesh cleanup 2026-01-25 21:17:35 +02:00
77b3173531 chore(nvim): tweak treesitter 2026-01-25 21:17:13 +02:00
e53a880e75 refactor(config): moves theme import to general
Moves theme import from top-level to the general section for better organization.
2026-01-25 21:13:59 +02:00
177 changed files with 4042 additions and 21712 deletions

View File

@@ -8,6 +8,10 @@ indent_style = space
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
[*.py]
indent_size = 4
max_line_length = 120
[*.fish] [*.fish]
max_line_length = 120 max_line_length = 120

6
.github/README.md vendored
View File

@@ -37,7 +37,7 @@ see what interesting stuff you've done with it. Sharing is caring.
### Interesting folders ### Interesting folders
| Path | Description | | Path | Description |
| ------------------- | -------------------------------------------- | |---------------------|----------------------------------------------|
| `.github` | GitHub Repository configuration files, meta. | | `.github` | GitHub Repository configuration files, meta. |
| `hosts/{hostname}/` | Configs that should apply to that host only. | | `hosts/{hostname}/` | Configs that should apply to that host only. |
| `local/bin` | Helper scripts that I've collected or wrote. | | `local/bin` | Helper scripts that I've collected or wrote. |
@@ -52,7 +52,7 @@ is processed by Dotbot during installation.
### dotfile folders ### dotfile folders
| Repo | Destination | Description | | Repo | Destination | Description |
| --------- | ----------- | ------------------------------------------- | |-----------|-------------|---------------------------------------------|
| `base/` | `.*` | `$HOME` level files. | | `base/` | `.*` | `$HOME` level files. |
| `config/` | `.config/` | Configurations for applications. | | `config/` | `.config/` | Configurations for applications. |
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` | | `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
@@ -86,7 +86,7 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
### XDG Variables ### XDG Variables
| Env | Default | Short description | | Env | Default | Short description |
| ------------------ | -------------------- | ---------------------------------------------- | |--------------------|----------------------|------------------------------------------------|
| `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries | | `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries |
| `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs | | `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs |
| `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files | | `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files |

View File

@@ -9,13 +9,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
permissions: read-all permissions:
contents: read
jobs: jobs:
debug-changelog: debug-changelog:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: write-all permissions:
contents: read
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -27,7 +29,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/tag-changelog-config.js config_file: .github/tag-changelog-config.js
- name: 'Echo results' - name: "Echo results"
id: output-changelog id: output-changelog
run: | run: |
echo "${{ steps.changelog.outputs.changes }}" echo "${{ steps.changelog.outputs.changes }}"

View File

@@ -11,7 +11,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
permissions: read-all permissions:
contents: read
jobs: jobs:
Linter: Linter:
@@ -30,9 +31,9 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Yarn Lock Changes - name: Yarn Lock Changes
uses: Simek/yarn-lock-changes@61d1a0595070b79c1abdc8e1e5a5f5d98b18918c # v0.12.2 uses: Simek/yarn-lock-changes@c7543145aaafdd8fc925cea5d85b2bd5a73091f8 # v0.14.0
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Run PR Lint - name: Run PR Lint
uses: ivuorinen/actions/pr-lint@f98ae7cd7d0feb1f9d6b01de0addbb11414cfc73 # v2026.01.21 uses: ivuorinen/actions/pr-lint@f371da218e9152e7d29ee39358454e41010c36dc # v2026.02.03

View File

@@ -5,19 +5,21 @@ name: Release Daily State
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: '0 21 * * *' # 00:00 at Europe/Helsinki - cron: "0 21 * * *" # 00:00 at Europe/Helsinki
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
permissions: read-all permissions:
contents: read
jobs: jobs:
new-daily-release: new-daily-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: write-all permissions:
contents: write
outputs: outputs:
created: ${{ steps.daily-version.outputs.created }} created: ${{ steps.daily-version.outputs.created }}

View File

@@ -5,14 +5,15 @@ name: Pre-commit autoupdate
on: on:
schedule: schedule:
# At 04:00 on Monday and Thursday. # At 04:00 on Monday and Thursday.
- cron: '0 4 * * 1,4' - cron: "0 4 * * 1,4"
workflow_dispatch: workflow_dispatch:
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
permissions: read-all permissions:
contents: read
jobs: jobs:
auto-update: auto-update:
@@ -33,6 +34,6 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-hooks branch: update/pre-commit-hooks
title: 'chore: update pre-commit hooks' title: "chore: update pre-commit hooks"
commit-message: 'chore: update pre-commit hooks' commit-message: "chore: update pre-commit hooks"
body: Update versions of pre-commit hooks to latest version. body: Update versions of pre-commit hooks to latest version.

View File

@@ -14,7 +14,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
permissions: read-all permissions:
pull-requests: read
jobs: jobs:
semantic-pr: semantic-pr:

View File

@@ -11,7 +11,7 @@ on:
- .github/workflows/sync-labels.yml - .github/workflows/sync-labels.yml
- .github/labels.yml - .github/labels.yml
schedule: schedule:
- cron: '34 5 * * *' - cron: "34 5 * * *"
workflow_call: workflow_call:
workflow_dispatch: workflow_dispatch:
@@ -19,7 +19,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
permissions: read-all permissions:
contents: read
jobs: jobs:
SyncLabels: SyncLabels:
@@ -29,4 +30,4 @@ jobs:
issues: write issues: write
steps: steps:
- uses: ivuorinen/actions/sync-labels@f98ae7cd7d0feb1f9d6b01de0addbb11414cfc73 # v2026.01.21 - uses: ivuorinen/actions/sync-labels@f371da218e9152e7d29ee39358454e41010c36dc # v2026.02.03

View File

@@ -5,20 +5,22 @@ name: Update submodules
on: on:
schedule: schedule:
# At 04:00 on Monday and Thursday. # At 04:00 on Monday and Thursday.
- cron: '0 4 * * 1' - cron: "0 4 * * 1"
workflow_dispatch: workflow_dispatch:
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
permissions: read-all permissions:
contents: read
jobs: jobs:
update-submodules: update-submodules:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: write-all permissions:
contents: write
steps: steps:
- name: Checkout repository - name: Checkout repository

1
.gitignore vendored
View File

@@ -56,5 +56,6 @@ local/man/yabai.1
local/share/fonts/* local/share/fonts/*
lock lock
node_modules node_modules
__pycache__
ssh/local.d/* ssh/local.d/*
config/fish/fish_variables* config/fish/fish_variables*

32
.gitmodules vendored
View File

@@ -4,11 +4,6 @@
url = https://github.com/anishathalye/dotbot.git url = https://github.com/anishathalye/dotbot.git
ignore = dirty ignore = dirty
[submodule "dotbot-brew"]
path = tools/dotbot-brew
url = https://github.com/wren/dotbot-brew.git
ignore = dirty
[submodule "dotbot-include"] [submodule "dotbot-include"]
path = tools/dotbot-include path = tools/dotbot-include
url = https://gitlab.com/gnfzdz/dotbot-include.git url = https://gitlab.com/gnfzdz/dotbot-include.git
@@ -24,41 +19,16 @@
url = https://github.com/tmux-plugins/tmux-continuum url = https://github.com/tmux-plugins/tmux-continuum
ignore = dirty ignore = dirty
[submodule "tmux/tmux-sensible"]
path = config/tmux/plugins/tmux-sensible
url = https://github.com/tmux-plugins/tmux-sensible.git
ignore = dirty
[submodule "tmux/tmux-sessionist"] [submodule "tmux/tmux-sessionist"]
path = config/tmux/plugins/tmux-sessionist path = config/tmux/plugins/tmux-sessionist
url = https://github.com/tmux-plugins/tmux-sessionist.git url = https://github.com/tmux-plugins/tmux-sessionist.git
ignore = dirty ignore = dirty
[submodule "tmux/tmux-yank"]
path = config/tmux/plugins/tmux-yank
url = https://github.com/tmux-plugins/tmux-yank.git
ignore = dirty
[submodule "tmux/tmux-window-name"]
path = config/tmux/plugins/tmux-window-name
url = https://github.com/ivuorinen/tmux-window-name.git
ignore = dirty
[submodule "dotbot-pip"]
path = tools/dotbot-pip
url = https://github.com/sobolevn/dotbot-pip.git
ignore = dirty
[submodule "tmux/tmux-suspend"] [submodule "tmux/tmux-suspend"]
path = config/tmux/plugins/tmux-suspend path = config/tmux/plugins/tmux-suspend
url = https://github.com/MunifTanjim/tmux-suspend.git url = https://github.com/MunifTanjim/tmux-suspend.git
ignore = dirty ignore = dirty
[submodule "tmux/tmux-mode-indicator"]
path = config/tmux/plugins/tmux-mode-indicator
url = https://github.com/MunifTanjim/tmux-mode-indicator.git
ignore = dirty
[submodule "tmux/tmux-current-pane-hostname"] [submodule "tmux/tmux-current-pane-hostname"]
path = config/tmux/plugins/tmux-current-pane-hostname path = config/tmux/plugins/tmux-current-pane-hostname
url = https://github.com/soyuka/tmux-current-pane-hostname.git url = https://github.com/soyuka/tmux-current-pane-hostname.git
@@ -83,6 +53,8 @@
[submodule "tmux/tmux-resurrect"] [submodule "tmux/tmux-resurrect"]
path = config/tmux/plugins/tmux-resurrect path = config/tmux/plugins/tmux-resurrect
url = https://github.com/tmux-plugins/tmux-resurrect.git url = https://github.com/tmux-plugins/tmux-resurrect.git
ignore = dirty
[submodule "tmux/catppuccin"] [submodule "tmux/catppuccin"]
path = config/tmux/plugins/catppuccin path = config/tmux/plugins/catppuccin
url = https://github.com/catppuccin/tmux.git url = https://github.com/catppuccin/tmux.git
ignore = dirty

View File

@@ -6,6 +6,5 @@ config/tmux/plugins/**
config/vim/plugged/** config/vim/plugged/**
node_modules node_modules
tools/antidote/** tools/antidote/**
tools/dotbot-brew/**
tools/dotbot-include/** tools/dotbot-include/**
tools/dotbot/** tools/dotbot/**

View File

@@ -9,16 +9,21 @@ VALIDATE_ALL_CODEBASE: true
FILEIO_REPORTER: false # Generate file.io report FILEIO_REPORTER: false # Generate file.io report
GITHUB_STATUS_REPORTER: true # Generate GitHub status report GITHUB_STATUS_REPORTER: true # Generate GitHub status report
IGNORE_GENERATED_FILES: true # Ignore generated files IGNORE_GENERATED_FILES: true # Ignore generated files
JAVASCRIPT_DEFAULT_STYLE: prettier # Default style for JavaScript
PRINT_ALPACA: false # Print Alpaca logo in console PRINT_ALPACA: false # Print Alpaca logo in console
SARIF_REPORTER: true # Generate SARIF report SARIF_REPORTER: true # Generate SARIF report
SHOW_SKIPPED_LINTERS: false # Show skipped linters in MegaLinter log SHOW_SKIPPED_LINTERS: false # Show skipped linters in MegaLinter log
TYPESCRIPT_DEFAULT_STYLE: prettier # Default style for TypeScript
DISABLE_LINTERS: DISABLE_LINTERS:
- REPOSITORY_DEVSKIM - REPOSITORY_DEVSKIM
- JAVASCRIPT_ES # using biome - JAVASCRIPT_ES # using biome
- JAVASCRIPT_PRETTIER # using biome - JAVASCRIPT_PRETTIER # using biome
- TYPESCRIPT_PRETTIER # using biome
- JSON_PRETTIER # using biome
- PYTHON_BLACK # using ruff
- PYTHON_FLAKE8 # using ruff
- PYTHON_PYLINT # using ruff
- PYTHON_ISORT # using ruff (I rules)
YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml
REPOSITORY_GIT_DIFF_DISABLE_ERRORS: true REPOSITORY_GIT_DIFF_DISABLE_ERRORS: true
BASH_SHFMT_ARGUMENTS: -i 2 -bn -ci -sr -fn
FILTER_REGEX_EXCLUDE: > FILTER_REGEX_EXCLUDE: >
(node_modules|tools|config/cheat/cheatsheets/community|config/cheat/cheatsheets/tldr|config/fzf|config/zsh|config/tmux/plugins) (node_modules|tools|config/cheat/cheatsheets/community|config/cheat/cheatsheets/tldr|config/fzf|config/zsh|config/tmux/plugins)

View File

@@ -28,12 +28,25 @@ repos:
entry: yarn biome check --write --files-ignore-unknown=true --no-errors-on-unmatched entry: yarn biome check --write --files-ignore-unknown=true --no-errors-on-unmatched
language: system language: system
files: \.(js|ts|jsx|tsx|json|md)$ files: \.(js|ts|jsx|tsx|json|md)$
- id: markdown-table-formatter
name: Markdown Table Formatter
entry: yarn markdown-table-formatter
language: system
types: [markdown]
- repo: https://github.com/adrienverge/yamllint - repo: https://github.com/adrienverge/yamllint
rev: v1.38.0 rev: v1.38.0
hooks: hooks:
- id: yamllint - id: yamllint
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [yaml]
additional_dependencies:
- prettier@3.8.1
- repo: https://github.com/shellcheck-py/shellcheck-py - repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1 rev: v0.11.0.1
hooks: hooks:
@@ -43,6 +56,7 @@ repos:
rev: v3.12.0-2 rev: v3.12.0-2
hooks: hooks:
- id: shfmt - id: shfmt
args: [-i, "2", -bn, -ci, -sr, -fn, -w]
- repo: https://github.com/rhysd/actionlint - repo: https://github.com/rhysd/actionlint
rev: v1.7.10 rev: v1.7.10
@@ -60,3 +74,10 @@ repos:
hooks: hooks:
- id: fish_syntax - id: fish_syntax
- id: fish_indent - id: fish_indent
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format

18
.prettierignore Normal file
View File

@@ -0,0 +1,18 @@
node_modules
.yarn
.pnp.*
.mypy_cache
Brewfile.lock.json
lazy-lock.json
config/cheat/cheatsheets/community
config/cheat/cheatsheets/tldr
config/fzf
config/nvim
config/op/plugins/used_plugins
config/tmux/plugins
config/vim/plugged
config/zsh
local/bin/antigen.zsh
local/bin/asdf
tools
docs/plans

9
.prettierrc.json Normal file
View File

@@ -0,0 +1,9 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"printWidth": 200,
"tabWidth": 2,
"useTabs": false,
"endOfLine": "lf",
"singleQuote": false,
"proseWrap": "preserve"
}

View File

@@ -13,11 +13,11 @@ ignore_all_files_in_gitignore: true
# Was previously called `ignored_dirs`, please update your config if you are using that. # Was previously called `ignored_dirs`, please update your config if you are using that.
# Added (renamed) on 2025-04-07 # Added (renamed) on 2025-04-07
ignored_paths: ignored_paths:
- '*.swp' - "*.swp"
- '*.tmp' - "*.tmp"
- '*.tmp.*' - "*.tmp.*"
- '.DS_Store' - ".DS_Store"
- '.git/**' - ".git/**"
- /config/cheat/cheatsheets/community/** - /config/cheat/cheatsheets/community/**
- /config/cheat/cheatsheets/pure-bash-bible/** - /config/cheat/cheatsheets/pure-bash-bible/**
- /config/cheat/cheatsheets/tldr/** - /config/cheat/cheatsheets/tldr/**
@@ -85,6 +85,6 @@ excluded_tools: []
# initial prompt for the project. It will always be given to the LLM upon activating the project # initial prompt for the project. It will always be given to the LLM upon activating the project
# (contrary to the memories, which are loaded on demand). # (contrary to the memories, which are loaded on demand).
initial_prompt: '' initial_prompt: ""
project_name: '.dotfiles' project_name: ".dotfiles"

123
CLAUDE.md Normal file
View File

@@ -0,0 +1,123 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code)
when working with code in this repository.
## Repository Overview
Personal dotfiles repository for Ismo Vuorinen.
Uses **Dotbot** (not GNU Stow) to symlink configuration files into place.
The directory layout follows the XDG Base Directory Specification.
## Directory Layout and Linking
| Source | Destination | Notes |
|---------------------|-------------------|-------------------------------------------|
| `base/*` | `~/.*` | Home-level dotfiles (`.` added by Dotbot) |
| `config/*` | `~/.config/` | Application configurations |
| `local/bin/*` | `~/.local/bin/` | Helper scripts and utilities |
| `local/share/*` | `~/.local/share/` | Data files |
| `local/man/**` | `~/.local/man/` | Manual pages |
| `ssh/*` | `~/.ssh/` | SSH configuration (mode 0600) |
| `hosts/<hostname>/` | Overlays | Host-specific overrides |
Installation: `./install` runs Dotbot with `install.conf.yaml`,
then applies `hosts/<hostname>/install.conf.yaml` if it exists.
## Commands
```bash
# Install dependencies (required before lint/test)
yarn install
# Linting
yarn lint # Run biome + prettier + editorconfig-checker
yarn lint:biome # Biome only
yarn lint:ec # EditorConfig checker only
# Formatting
yarn fix:biome # Autofix with biome (JS/TS/JSON/MD)
yarn fix:prettier # Autofix with prettier (YAML)
yarn format # Format with biome
yarn format:yaml # Format YAML files with prettier
# Testing (Bats - Bash Automated Testing System)
yarn test # Run all tests in tests/
# Run a single test file:
./node_modules/.bin/bats tests/dfm.bats
# Shell linting
shellcheck <script> # Lint shell scripts
```
## Pre-commit Hooks
Configured in `.pre-commit-config.yaml`: shellcheck, shfmt, biome,
yamllint, prettier, actionlint, stylua, fish_syntax/fish_indent.
Run `pre-commit run --all-files` to check everything.
## Commit Convention
Semantic Commit messages: `type(scope): summary`
(e.g., `fix(tmux): correct prefix binding`).
Enforced by commitlint extending `@ivuorinen/commitlint-config`.
## Architecture
### Shell Configuration Chain
Both `base/bashrc` and `base/zshrc` source `config/shared.sh`,
which loads:
- `config/exports` — environment variables, XDG dirs, PATH
- `config/alias` — shell aliases
Zsh additionally uses **antidote** (in `tools/antidote/`)
for plugin management and **oh-my-posh** for the prompt.
### dfm — Dotfiles Manager
`local/bin/dfm` is the main management script. Key commands:
- `dfm install all` — install everything (called during `./install`)
- `dfm brew install` / `dfm brew update` — Homebrew management
- `dfm docs all` — regenerate documentation under `docs/`
### Submodules
External dependencies are git submodules (Dotbot, plugins,
tmux plugins, cheatsheets, antidote).
Managed by `add-submodules.sh`. All set to `ignore = dirty`.
Updated automatically via GitHub Actions on a schedule.
### Host-specific Configs
Machine-specific overrides live in `hosts/<hostname>/`
with their own `base/`, `config/`, and `install.conf.yaml`.
These are layered on top of the global config during installation.
## Code Style
- **EditorConfig**: 2-space indent, UTF-8, LF line endings.
See `.editorconfig` for per-filetype overrides
(4-space for PHP/fish, tabs for git config).
- **Shell scripts**: Must have a shebang or
`# shellcheck shell=bash` directive.
Follow shfmt settings in `.editorconfig`
(2-space indent, `binary_next_line`,
`switch_case_indent`, `space_redirects`, `function_next_line`).
- **Lua** (neovim config): Formatted with stylua (`stylua.toml`),
90-char line length.
- **JSON/JS/TS/Markdown**: Formatted with Biome (`biome.json`),
80-char width.
- **YAML**: Formatted with Prettier (`.prettierrc.json`),
validated with yamllint (`.yamllint.yml`).
## ShellCheck Disabled Rules
Defined in `.shellcheckrc`:
SC2039 (POSIX `local`), SC2166 (`-o` in test),
SC2154 (unassigned variables), SC1091 (source following),
SC2174 (mkdir -p -m), SC2016 (single-quote expressions).
## Package Manager
Yarn (v4.12.0) is the package manager. Do not use npm.

View File

@@ -5,12 +5,8 @@ git submodule sync --recursive
# dotbot and plugins # dotbot and plugins
git submodule add --name dotbot \ git submodule add --name dotbot \
-f https://github.com/anishathalye/dotbot.git tools/dotbot -f https://github.com/anishathalye/dotbot.git tools/dotbot
git submodule add --name dotbot-brew \
-f https://github.com/wren/dotbot-brew.git tools/dotbot-brew
git submodule add --name dotbot-include \ git submodule add --name dotbot-include \
-f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include -f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include
git submodule add --name dotbot-pip \
-f https://github.com/sobolevn/dotbot-pip.git tools/dotbot-pip
# other repos # other repos
git submodule add --name cheat-community \ git submodule add --name cheat-community \
@@ -24,20 +20,12 @@ git submodule add --name antidote \
# tmux plugin manager and plugins # tmux plugin manager and plugins
git submodule add --name tmux/tmux-continuum \ git submodule add --name tmux/tmux-continuum \
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum -f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
git submodule add --name tmux/tmux-mode-indicator \
-f https://github.com/MunifTanjim/tmux-mode-indicator.git config/tmux/plugins/tmux-mode-indicator
git submodule add --name tmux/tmux-resurrect \ git submodule add --name tmux/tmux-resurrect \
-f https://github.com/tmux-plugins/tmux-resurrect.git config/tmux/plugins/tmux-resurrect -f https://github.com/tmux-plugins/tmux-resurrect.git config/tmux/plugins/tmux-resurrect
git submodule add --name tmux/tmux-sensible \
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
git submodule add --name tmux/tmux-sessionist \ git submodule add --name tmux/tmux-sessionist \
-f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist -f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist
git submodule add --name tmux/tmux-suspend \ git submodule add --name tmux/tmux-suspend \
-f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/tmux-suspend -f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/tmux-suspend
git submodule add --name tmux/tmux-window-name \
-f https://github.com/ivuorinen/tmux-window-name.git config/tmux/plugins/tmux-window-name
git submodule add --name tmux/tmux-yank \
-f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank
git submodule add --name tmux/tmux-current-pane-hostname \ git submodule add --name tmux/tmux-current-pane-hostname \
-f https://github.com/soyuka/tmux-current-pane-hostname.git config/tmux/plugins/tmux-current-pane-hostname -f https://github.com/soyuka/tmux-current-pane-hostname.git config/tmux/plugins/tmux-current-pane-hostname
git submodule add --name tmux/tmux-dark-notify \ git submodule add --name tmux/tmux-dark-notify \
@@ -54,21 +42,70 @@ done
# Mark certain repositories shallow # Mark certain repositories shallow
git config -f .gitmodules submodule.antidote.shallow true git config -f .gitmodules submodule.antidote.shallow true
# remove old submodules # Log a message using msgr if available, else echo
folders=( _log()
"config/tmux/plugins/tpm" {
"config/tmux/plugins/tmux" local msg="$1"
"config/tmux/plugins/tmux-menus" if command -v msgr > /dev/null 2>&1; then
"tools/dotbot-crontab" msgr run_done "$msg"
"tools/dotbot-snap" else
"config/nvim-kickstart" echo " [ok] $msg"
"local/bin/asdf" fi
"local/asdf" return 0
"tools/dotbot-asdf" }
# Remove a stale git submodule and clean up references
remove_old_submodule()
{
local name="$1" path="$2"
# Remove working tree
if [[ -d "$path" ]]; then
rm -rf "$path"
_log "Removed $path"
fi
# Remove stale git index entry
git rm --cached "$path" 2> /dev/null || true
# Remove .git/config section keyed by path
git config --remove-section "submodule.$path" 2> /dev/null || true
# Skip name-based cleanup if no submodule name provided
[[ -z "$name" ]] && return 0
# Remove .git/config section keyed by name
git config --remove-section "submodule.$name" 2> /dev/null || true
# Remove .git/modules/<name>/ cached repository
if [[ -d ".git/modules/$name" ]]; then
rm -rf ".git/modules/$name"
_log "Removed .git/modules/$name"
fi
}
# remove old submodules (name:path pairs)
old_submodules=(
"tmux/tpm:config/tmux/plugins/tpm"
":config/tmux/plugins/tmux"
"tmux/tmux-menus:config/tmux/plugins/tmux-menus"
"dotbot-crontab:tools/dotbot-crontab"
"dotbot-snap:tools/dotbot-snap"
"tmux/tmux-window-name:config/tmux/plugins/tmux-window-name"
"tmux/tmux-sensible:config/tmux/plugins/tmux-sensible"
"tmux/tmux-mode-indicator:config/tmux/plugins/tmux-mode-indicator"
"tmux/tmux-yank:config/tmux/plugins/tmux-yank"
":config/tmux/plugins/tmux-fzf-url"
"nvim-kickstart:config/nvim-kickstart"
"asdf:local/bin/asdf"
"asdf:local/asdf"
"dotbot-asdf:tools/dotbot-asdf"
"dotbot-pip:tools/dotbot-pip"
"dotbot-brew:tools/dotbot-brew"
) )
for folder in "${folders[@]}"; do for entry in "${old_submodules[@]}"; do
[ -d "$folder" ] \ name="${entry%%:*}"
&& rm -rf "$folder" \ path="${entry#*:}"
&& msgr run_done "Removed old submodule $folder" remove_old_submodule "$name" "$path"
done done

View File

@@ -2,20 +2,17 @@
# shellcheck shell=bash # shellcheck shell=bash
export DOTFILES="$HOME/.dotfiles" export DOTFILES="$HOME/.dotfiles"
# Minimal PATH for x-have and utilities; full PATH set in shared.sh/exports
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$PATH" export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$PATH"
export SHARED_SCRIPTS_SOURCED=0 export SHARED_SCRIPTS_SOURCED=0
source "$DOTFILES/config/shared.sh" source "$DOTFILES/config/shared.sh"
if [ -n "${GHOSTTY_RESOURCES_DIR}" ]; then
builtin source "${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash"
fi
# shellcheck source=../config/fzf/fzf.bash # shellcheck source=../config/fzf/fzf.bash
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] && [ -f "${DOTFILES}/config/fzf/fzf.bash" ] &&
source "${DOTFILES}/config/fzf/fzf.bash" source "${DOTFILES}/config/fzf/fzf.bash"
# Import ssh keys in keychain # Import ssh keys in keychain (macOS-specific -A flag, silently fails on Linux)
ssh-add -A 2>/dev/null ssh-add -A 2>/dev/null
x-have antidot && { x-have antidot && {
@@ -25,6 +22,3 @@ x-have antidot && {
PROMPT_DIRTRIM=3 PROMPT_DIRTRIM=3
PROMPT_COMMAND='PS1_CMD1=$(git branch --show-current 2>/dev/null)' PROMPT_COMMAND='PS1_CMD1=$(git branch --show-current 2>/dev/null)'
PS1='\[\e[95m\]\u\[\e[0m\]@\[\e[38;5;22;2m\]\h\[\e[0m\] \[\e[38;5;33m\]\w\[\e[0m\] \[\e[92;2m\]${PS1_CMD1}\n\[\e[39m\]➜\[\e[0m\] ' PS1='\[\e[95m\]\u\[\e[0m\]@\[\e[38;5;22;2m\]\h\[\e[0m\] \[\e[38;5;33m\]\w\[\e[0m\] \[\e[92;2m\]${PS1_CMD1}\n\[\e[39m\]➜\[\e[0m\] '
# Added by LM Studio CLI (lms)
export PATH="$PATH:$HOME/.lmstudio/bin"

View File

@@ -1 +0,0 @@
use node

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -7,18 +7,13 @@
autoload -U promptinit; promptinit autoload -U promptinit; promptinit
export DOTFILES="$HOME/.dotfiles" export DOTFILES="$HOME/.dotfiles"
LOCAL_SHARE="$HOME/.local/share" # Minimal PATH for x-have and utilities; full PATH set in shared.sh/exports
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$LOCAL_SHARE/nvim/mason/bin:$LOCAL_SHARE/bob/nvim-bin:$LOCAL_SHARE/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH" export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$PATH"
export SHARED_SCRIPTS_SOURCED=0 export SHARED_SCRIPTS_SOURCED=0
source "$DOTFILES/config/shared.sh" source "$DOTFILES/config/shared.sh"
# zsh completions directory # zsh completions directory (ZSH_CUSTOM_COMPLETION_PATH set in shared.sh)
[ -z "$ZSH_COMPLETIONS" ] && export ZSH_COMPLETIONS="$XDG_CONFIG_HOME/zsh/completion"
# Add zsh completions to FPATH, compinit will be called later
FPATH="$ZSH_COMPLETIONS:$FPATH"
ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-${SHORT_HOST}-${ZSH_VERSION}" ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
source "$DOTFILES/config/zsh/antidote.zsh" source "$DOTFILES/config/zsh/antidote.zsh"
@@ -33,33 +28,13 @@ source_fzf_config()
fi fi
} }
# Function to set up tmux window name plugin if tmux is active
setup_tmux_window_name_plugin()
{
if [[ -n "$TMUX" ]]; then
local tmux_window_name_plugin="$TMUX_PLUGINS/tmux-window-name/scripts/rename_session_windows.py"
if [[ -f "$tmux_window_name_plugin" ]]; then
tmux_window_name()
{
($tmux_window_name_plugin &)
}
add-zsh-hook chpwd tmux_window_name
tmux_window_name
fi
fi
}
source_fzf_config source_fzf_config
setup_tmux_window_name_plugin
x-have antidot && eval "$(antidot init)" x-have antidot && eval "$(antidot init)"
autoload -Uz compinit bashcompinit autoload -Uz compinit bashcompinit
compinit -d $ZSH_COMPDUMP compinit -d "$ZSH_COMPDUMP"
bashcompinit bashcompinit
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
export P10K_CONFIG="$DOTFILES/config/zsh/p10k.zsh" export P10K_CONFIG="$DOTFILES/config/zsh/p10k.zsh"
[[ ! -f "$P10K_CONFIG" ]] || source "$P10K_CONFIG" [[ ! -f "$P10K_CONFIG" ]] || source "$P10K_CONFIG"
# Added by LM Studio CLI (lms)
export PATH="$PATH:$HOME/.lmstudio/bin"

View File

@@ -1,5 +1,5 @@
{ {
"$schema": "https://biomejs.dev/schemas/2.3.1/schema.json", "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"vcs": { "vcs": {
"enabled": true, "enabled": true,
"clientKind": "git", "clientKind": "git",

View File

@@ -1,251 +0,0 @@
# Start AeroSpace at login
start-at-login = false
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
# The 'accordion-padding' specifies the size of accordion padding
# You can set 0 to disable the padding feature
accordion-padding = 10
# Possible values: tiles|accordion
default-root-container-layout = 'tiles'
# Possible values: horizontal|vertical|auto
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
# tall monitor (anything higher than wide) gets vertical orientation
default-root-container-orientation = 'auto'
# Mouse follows focus when focused monitor changes
# Drop it from your config, if you don't like this behavior
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
# Fallback value (if you omit the key): on-focused-monitor-changed = []
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
# Also see: https://nikitabobko.github.io/AeroSpace/goodness#disable-hide-app
automatically-unhide-macos-hidden-apps = true
# [[on-window-detected]]
# if.app-id = 'com.apple.systempreferences'
# if.app-name-regex-substring = 'settings'
# if.window-title-regex-substring = 'substring'
# if.workspace = 'workspace-name'
# if.during-aerospace-startup = true
# check-further-callbacks = true
# run = ['layout floating', 'move-node-to-workspace S'] # The callback itself
[[on-window-detected]]
if.app-name-regex-substring = 'settings' # All settings
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.apple.systempreferences' # macOS System Preferences
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.1password.1password' # 1Password
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'org.ferdium.ferdium-app' # Ferdium, has WhatsApp etc.
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.jetbrains.PhpStorm' # PhpStorm
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.apple.finder' # Finder
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.apple.Preview' # Preview
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.apple.mail' # Mail
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.DanPristupov.Fork' # Fork
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.flexibits.fantastical2.mac' # Fantastical
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'org.whispersystems.signal-desktop' # Signal
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.tidal.desktop' # TIDAL
run = ['layout floating', 'move-node-to-workspace 2'] # Float and move to workspace 2
[[on-window-detected]]
if.app-id = 'com.apple.TV' # Apple TV app
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.setapp.DesktopClient' # Setapp
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.electron.dockerdesktop' # Docker Desktop
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.tinyspeck.slackmacgap' # Slack
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'md.obsidia' # Obsidian
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.todoist.mac.Todoist' # Todoist
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.apple.backup.launcher' # TimeMachine
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.philipyoungg.session-setapp' # Session app (Setapp)
run = ['layout floating']
[[on-window-detected]]
if.app-id = 'com.microsoft.rdc.macos' # Remote Desktop
run = ['layout floating']
# Possible values: (qwerty|dvorak)
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
[key-mapping]
preset = 'qwerty'
# Gaps between windows (inner-*) and between monitor edges (outer-*).
# Possible values:
# - Constant: gaps.outer.top = 8
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
# In this example, 24 is a default value when there is no match.
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
[gaps]
inner.horizontal = 5
inner.vertical = 5
outer.top = [{ monitor.'^built-in retina display$' = 0 }, 0]
outer.right = 0
outer.bottom = 0
outer.left = 0
# 'main' binding mode declaration
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
# 'main' binding mode must be always presented
# Fallback value (if you omit the key): mode.main.binding = {}
[mode.main.binding]
cmd-h = [] # Disable "hide application"
cmd-alt-h = [] # Disable "hide others"
# All possible keys:
# - Letters. a, b, c, ..., z
# - Numbers. 0, 1, 2, ..., 9
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
# - F-keys. f1, f2, ..., f20
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
# keypadMinus, keypadMultiply, keypadPlus
# - Arrows. left, down, up, right
# All possible modifiers: cmd, alt, ctrl, shift
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3)
# alt-enter = '''exec-and-forget osascript -e '
# tell application "Terminal"
# do script
# activate
# end tell'
# '''
# alt-cmd-shift-f = 'fullscreen'
# alt-shift-f = 'layout floating'
# alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
alt-h = 'focus left'
alt-j = 'focus down'
alt-k = 'focus up'
alt-l = 'focus right'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
alt-shift-1 = 'workspace 1' # Main
alt-shift-2 = 'workspace 2' # Media
ctrl-shift-1 = 'move-node-to-workspace 1' # Move node to Main
ctrl-shift-2 = 'move-node-to-workspace 2' # Move node to Media
alt-shift-tab = 'workspace-back-and-forth' # Switch between workspaces
ctrl-shift-tab = 'move-workspace-to-monitor --wrap-around prev'
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
alt-a = 'mode apps'
alt-s = 'mode service'
alt-m = 'mode move'
# ╭──────────────────────────────────────────────────────────╮
# │ alt-m │
# ╰──────────────────────────────────────────────────────────╯
[mode.move.binding]
esc = ['reload-config', 'mode main']
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
1 = ['move-node-to-workspace 1 --focus-follows-window']
2 = ['move-node-to-workspace 2 --focus-follows-window']
# See: https://nikitabobko.github.io/AeroSpace/commands#move
h = 'move left'
j = 'move down'
k = 'move up'
l = 'move right'
# See: https://nikitabobko.github.io/AeroSpace/commands#join-with
shift-h = 'join-with left'
shift-j = 'join-with down'
shift-k = 'join-with up'
shift-l = 'join-with right'
# https://nikitabobko.github.io/AeroSpace/commands#resize
ctrl-h = 'resize smart -70'
ctrl-l = 'resize smart +70'
shift-left = 'resize smart +70'
shift-right = 'resize smart -70'
# https://nikitabobko.github.io/AeroSpace/commands#flatten-workspace-tree
r = ['flatten-workspace-tree', 'mode main'] # reset layout
# ╭──────────────────────────────────────────────────────────╮
# │ alt-a │
# ╰──────────────────────────────────────────────────────────╯
[mode.apps.binding]
esc = ['reload-config', 'mode main']
b = ['exec-and-forget open -a /Applications/Brave Browser.app', 'mode main'] # Browser
c = ['exec-and-forget open -a /Applications/Ferdium.app', 'mode main'] # Chat
g = ['exec-and-forget open -a /Applications/Ghostty.app', 'mode main'] # Ghostty
o = ['exec-and-forget open -a /Applications/Obsidian.app', 'mode main'] # Obsidian
s = ['exec-and-forget open -a /Applications/Slack.app', 'mode main'] # Slack
t = ['exec-and-forget open -a /Applications/TIDAL.app', 'mode main'] # Tidal
w = ['exec-and-forget open -a /Applications/WezTerm.app', 'mode main'] # WezTerm
# ╭──────────────────────────────────────────────────────────╮
# │ alt-s │
# ╰──────────────────────────────────────────────────────────╯
[mode.service.binding]
esc = ['reload-config', 'mode main'] # reload config
r = ['flatten-workspace-tree', 'mode main'] # reset layout
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
backspace = ['close-all-windows-but-current', 'mode main']

View File

@@ -1,8 +1,3 @@
import = [
# Default to night if the copied one doesn't exist.
"~/.dotfiles/config/alacritty/theme-night.toml",
"~/.config/alacritty/theme-active.toml"
]
[env] [env]
TERM = "xterm-256color" TERM = "xterm-256color"
@@ -50,3 +45,10 @@ lines = 75
[window.padding] [window.padding]
x = 5 x = 5
y = 5 y = 5
[general]
import = [
# Default to night if the copied one doesn't exist.
"~/.dotfiles/config/alacritty/theme-night.toml",
"~/.config/alacritty/theme-active.toml"
]

View File

@@ -7,8 +7,6 @@ x-have eza && {
alias ls="eza -h -s=type --git --icons --group-directories-first" alias ls="eza -h -s=type --git --icons --group-directories-first"
} }
alias vim='vim -u "$XDG_CONFIG_HOME/vim/vimrc"'
# Easier navigation: .., ..., .... # Easier navigation: .., ..., ....
alias ..="cd .." alias ..="cd .."
alias ...="cd ../.." alias ...="cd ../.."

View File

@@ -93,13 +93,13 @@ expand-main:
# Note that not all layouts respond to this command. # Note that not all layouts respond to this command.
increase-main: increase-main:
mod: mod1 mod: mod1
key: ',' key: ","
# Decrease the number of windows in the main pane. # Decrease the number of windows in the main pane.
# Note that not all layouts respond to this command. # Note that not all layouts respond to this command.
decrease-main: decrease-main:
mod: mod1 mod: mod1
key: '.' key: "."
# General purpose command for custom layouts. # General purpose command for custom layouts.
# Functionality is layout-dependent. # Functionality is layout-dependent.

View File

@@ -1,15 +0,0 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/aqua-yaml.json
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
# checksum:
# enabled: true
# require_checksum: true
# supported_envs:
# - all
registries:
- type: standard
ref: v4.346.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: cli/cli
version: 'v2.69.0'

View File

@@ -1,5 +0,0 @@
# See the docs for explanations: https://asdf-vm.com/manage/configuration.html
legacy_version_file=yes
use_release_candidates=no
concurrency=auto

View File

@@ -1,27 +0,0 @@
// A cargo subcommand for checking and applying
// updates to installed executables
cargo-update
// Cargo cache management utility
cargo-cache
// An incremental parsing system for programming tools
tree-sitter-cli
// a subprocess caching utility
bkt
// a structural diff that understands syntax
difftastic
// A simple, fast and user-friendly alternative to 'find'
fd-find
// recursively searches directories for a
// regex pattern while respecting your gitignore
ripgrep
// A version manager for neovim
bob-nvim
// bottom, btm - A cross-platform graphical process/system monitor with
// a customizable interface and a multitude of features.
bottom
// A modern alternative to ls
eza
// Tmux Sessionizer: A tool for opening git repositories as tmux sessions
tmux-sessionizer
// zoxide, a smarter cd command
zoxide

View File

@@ -1 +0,0 @@
bundler

View File

@@ -1,29 +0,0 @@
// These are golang packages I use,
// so they should be available with all versions
// Git Profile allows you to switch between user profiles in git repos
github.com/dotzero/git-profile@latest
// An extensible command line tool or library to format yaml files.
github.com/google/yamlfmt/cmd/yamlfmt@latest
// Parsing HTML at the command line
github.com/ericchiang/pup@latest
// HTML to Markdown converter
github.com/suntong/html2md@latest
// cheat allows you to create and view interactive cheatsheets on the cli.
github.com/cheat/cheat/cmd/cheat@latest
// Render markdown on the CLI, with pizzazz! 💅
github.com/charmbracelet/glow@latest
// Static checker for GitHub Actions workflow files
github.com/rhysd/actionlint/cmd/actionlint@latest
// Cleans up your $HOME from those pesky dotfiles
github.com/doron-cohen/antidot@latest
// FZF is a general-purpose command-line fuzzy finder.
github.com/junegunn/fzf@latest
// gopls, the Go language server
golang.org/x/tools/gopls@latest
// A language for writing HTML user interfaces in Go.
github.com/a-h/templ/cmd/templ@latest
// A tool for glamorous shell scripts 🎀
github.com/charmbracelet/gum@latest
// A terminal session manager
github.com/joshmedeski/sesh/v2@latest

View File

@@ -1,7 +0,0 @@
blade-formatter
corepack
editorconfig-checker
github-release-notes
neovim
npm
stylelint-lsp

View File

@@ -1,20 +0,0 @@
1password-cli https://github.com/NeoHsu/asdf-1password-cli.git f5d5aab
age https://github.com/threkk/asdf-age.git 396bdf6
asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git b5862c1
direnv https://github.com/asdf-community/asdf-direnv.git 6ff3dbe
dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53
editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5
fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0
github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7
golang https://github.com/asdf-community/asdf-golang.git e2527a3
hadolint https://github.com/devlincashman/asdf-hadolint.git c8eb88b
kubectl https://github.com/asdf-community/asdf-kubectl.git 2fb3b57
pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git 26bfc42
ripgrep https://gitlab.com/wt0f/asdf-ripgrep.git e836665
rust https://github.com/code-lever/asdf-rust.git 95acf4f
shellcheck https://github.com/luizm/asdf-shellcheck.git 66200ff
shfmt https://github.com/luizm/asdf-shfmt.git a42c5ff
terragrunt https://github.com/ohmer/asdf-terragrunt.git 29f2935
tf-summarize https://github.com/adamcrews/asdf-tf-summarize.git 880ad26
yamllint https://github.com/ericcornelissen/asdf-yamllint.git e4cfb17
yq https://github.com/sudermanjr/asdf-yq.git 772992f

View File

@@ -1,4 +0,0 @@
ansible
pipenv
neovim
libtmux

View File

@@ -1,12 +0,0 @@
[global]
disable_stdin = false
load_dotenv = true
hide_env_diff = false
[whitelist]
prefix = [
"~/Code/"
]
exact = [
"~/.dotfiles/.envrc"
]

View File

@@ -1,6 +0,0 @@
### Do not edit. This was autogenerated by 'asdf direnv setup' ###
# shellcheck shell=bash
use_asdf()
{
source_env "$(asdf direnv envrc "$@")"
}

View File

@@ -150,6 +150,7 @@ commit()
git commit -a -m "$commitMessage" git commit -a -m "$commitMessage"
} }
# Run Laravel scheduler in a loop
scheduler() scheduler()
{ {
while :; do while :; do
@@ -282,7 +283,8 @@ export LESSHISTFILE="$XDG_STATE_HOME"/less/history
export MANPAGER="less -X" export MANPAGER="less -X"
# Always enable colored `grep` output # Always enable colored `grep` output
export GREP_OPTIONS="--color=auto" # Note: GREP_OPTIONS is deprecated since GNU grep 2.21
# Color is handled via alias in config/alias
# check the window size after each command and, if necessary, # check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS. # update the values of LINES and COLUMNS.
@@ -348,12 +350,6 @@ export COMPOSER_HOME="$XDG_STATE_HOME/composer"
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin" export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
export PATH="$COMPOSER_BIN:$PATH" export PATH="$COMPOSER_BIN:$PATH"
# direnv, https://direnv.net/
# https://direnv.net/docs/hook.html
# Set the hook to show the direnv message in a different color
# export DIRENV_LOG_FORMAT=$'\033[2mdirenv: %s\033[0m'
export DIRENV_LOG_FORMAT=
# docker, https://docs.docker.com/engine/reference/commandline/cli/ # docker, https://docs.docker.com/engine/reference/commandline/cli/
msg "Setting up Docker configuration" msg "Setting up Docker configuration"
export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker" export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
@@ -410,11 +406,6 @@ x-have pyenv && eval "$(pyenv init -)"
msg "Setting up Rust/Cargo configuration" msg "Setting up Rust/Cargo configuration"
export RUST_WITHOUT=rust-docs export RUST_WITHOUT=rust-docs
# screen
# https://www.gnu.org/software/screen/manual/screen.html
msg "Setting up screen configuration"
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
# sonarlint # sonarlint
# https://www.sonarlint.org/ # https://www.sonarlint.org/
msg "Setting up Sonarlint configuration" msg "Setting up Sonarlint configuration"
@@ -442,14 +433,15 @@ export ZSH_TMUX_UNICODE=true
export ZSH_TMUX_AUTOQUIT=false export ZSH_TMUX_AUTOQUIT=false
export ZSH_TMUX_DEFAULT_SESSION_NAME=main export ZSH_TMUX_DEFAULT_SESSION_NAME=main
# tms, https://github.com/jrmoulton/tmux-sessionizer
export TMS_CONFIG_FILE="${XDG_CONFIG_HOME}/tms/config.toml"
# wakatime, https://github.com/wakatime/wakatime-cli # wakatime, https://github.com/wakatime/wakatime-cli
msg "Setting up Wakatime configuration" msg "Setting up Wakatime configuration"
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime" export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
x-dc "$WAKATIME_HOME" x-dc "$WAKATIME_HOME"
# LM Studio CLI
msg "Setting up LM Studio configuration"
export PATH="$PATH:$HOME/.lmstudio/bin"
# Misc # Misc
msg "Setting up miscellaneous configuration" msg "Setting up miscellaneous configuration"
export ZSHZ_DATA="$XDG_STATE_HOME/z" export ZSHZ_DATA="$XDG_STATE_HOME/z"

View File

@@ -8,7 +8,6 @@ fi
export PATH="$HOME/.local/go/bin:$PATH" export PATH="$HOME/.local/go/bin:$PATH"
alias logrotate='/usr/sbin/logrotate -s "$HOME/logs/state"' alias logrotate='/usr/sbin/logrotate -s "$HOME/logs/state"'
alias nano='nano -wS -$'
alias gpg=gpg2 alias gpg=gpg2
ACME_PATH="$HOME/.acme.sh" ACME_PATH="$HOME/.acme.sh"

View File

@@ -1 +0,0 @@
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/kubectl.fish

View File

@@ -1 +0,0 @@
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/orbctl.fish

View File

@@ -3,6 +3,13 @@
# Set default configuration using session variables for most settings # Set default configuration using session variables for most settings
# Only PHPENV_GLOBAL_VERSION needs to persist across shells # Only PHPENV_GLOBAL_VERSION needs to persist across shells
# Provider override (empty = auto-detect)
# Valid values: homebrew, apt
if not set -q PHPENV_PROVIDER
set -g PHPENV_PROVIDER ""
end
if not set -q PHPENV_AUTO_INSTALL if not set -q PHPENV_AUTO_INSTALL
set -g PHPENV_AUTO_INSTALL false set -g PHPENV_AUTO_INSTALL false
end end

View File

@@ -2,6 +2,8 @@
# │ fish/config.fish # │ fish/config.fish
# ╰──────────────────────────────────────────────────────────╯ # ╰──────────────────────────────────────────────────────────╯
fish_config theme choose "Catppuccin Mocha"
test -e "$HOME/.config/fish/alias.fish" && test -e "$HOME/.config/fish/alias.fish" &&
source "$HOME/.config/fish/alias.fish" source "$HOME/.config/fish/alias.fish"
@@ -30,7 +32,7 @@ if status is-interactive
type -q zoxide; and zoxide init fish | source type -q zoxide; and zoxide init fish | source
# Start tmux if not already running and not in SSH # Start tmux if not already running and not in SSH
open-tmux # defined in functions/open-tmux.fish #open-tmux # defined in functions/open-tmux.fish
end end
# Added by LM Studio CLI (lms) # Added by LM Studio CLI (lms)

View File

@@ -1,4 +1,5 @@
jorgebucaran/fisher jorgebucaran/fisher
ilancosman/tide@v6
jethrokuan/z jethrokuan/z
ivuorinen/phpenv.fish ivuorinen/phpenv.fish
ilancosman/tide@v6
catppuccin/fish

View File

@@ -7,65 +7,67 @@ To be used with a companion fish function like this:
""" """
from __future__ import print_function
import json import json
import os import os
import signal import signal
import subprocess import subprocess
import sys import sys
import traceback
BASH = "bash"
BASH = 'bash'
FISH_READONLY = [ FISH_READONLY = [
'PWD', 'SHLVL', 'history', 'pipestatus', 'status', 'version', "PWD",
'FISH_VERSION', 'fish_pid', 'hostname', '_', 'fish_private_mode' "SHLVL",
"history",
"pipestatus",
"status",
"version",
"FISH_VERSION",
"fish_pid",
"hostname",
"_",
"fish_private_mode",
] ]
IGNORED = [ IGNORED = ["PS1", "XPC_SERVICE_NAME"]
'PS1', 'XPC_SERVICE_NAME'
]
def ignored(name): def ignored(name):
if name == 'PWD': # this is read only, but has special handling if name == "PWD": # this is read only, but has special handling
return False return False
# ignore other read only variables # ignore other read only variables
if name in FISH_READONLY: if name in FISH_READONLY:
return True return True
if name in IGNORED or name.startswith("BASH_FUNC"): if name in IGNORED or name.startswith("BASH_FUNC"):
return True return True
if name.startswith('%'): return name.startswith("%")
return True
return False
def escape(string): def escape(string):
# use json.dumps to reliably escape quotes and backslashes # use json.dumps to reliably escape quotes and backslashes
return json.dumps(string).replace(r'$', r'\$') return json.dumps(string).replace(r"$", r"\$")
def escape_identifier(word): def escape_identifier(word):
return escape(word.replace('?', '\\?')) return escape(word.replace("?", "\\?"))
def comment(string): def comment(string):
return '\n'.join(['# ' + line for line in string.split('\n')]) return "\n".join(["# " + line for line in string.split("\n")])
def gen_script(): def gen_script():
# Use the following instead of /usr/bin/env to read environment so we can # Use the following instead of /usr/bin/env to read environment so we can
# deal with multi-line environment variables (and other odd cases). # deal with multi-line environment variables (and other odd cases).
env_reader = "%s -c 'import os,json; print(json.dumps({k:v for k,v in os.environ.items()}))'" % (sys.executable) env_reader = f"{sys.executable} -c 'import os,json; print(json.dumps({{k:v for k,v in os.environ.items()}}))'"
args = [BASH, '-c', env_reader] args = [BASH, "-c", env_reader]
output = subprocess.check_output(args, universal_newlines=True) output = subprocess.check_output(args, universal_newlines=True)
old_env = output.strip() old_env = output.strip()
pipe_r, pipe_w = os.pipe() pipe_r, pipe_w = os.pipe()
if sys.version_info >= (3, 4):
os.set_inheritable(pipe_w, True) os.set_inheritable(pipe_w, True)
command = 'eval $1 && ({}; alias) >&{}'.format( command = f"eval $1 && ({env_reader}; alias) >&{pipe_w}"
env_reader, args = [BASH, "-c", command, "bass", " ".join(sys.argv[1:])]
pipe_w
)
args = [BASH, '-c', command, 'bass', ' '.join(sys.argv[1:])]
p = subprocess.Popen(args, universal_newlines=True, close_fds=False) p = subprocess.Popen(args, universal_newlines=True, close_fds=False)
os.close(pipe_w) os.close(pipe_w)
with os.fdopen(pipe_r) as f: with os.fdopen(pipe_r) as f:
@@ -73,9 +75,7 @@ def gen_script():
alias_str = f.read() alias_str = f.read()
if p.wait() != 0: if p.wait() != 0:
raise subprocess.CalledProcessError( raise subprocess.CalledProcessError(
returncode=p.returncode, returncode=p.returncode, cmd=" ".join(sys.argv[1:]), output=new_env + alias_str
cmd=' '.join(sys.argv[1:]),
output=new_env + alias_str
) )
new_env = new_env.strip() new_env = new_env.strip()
@@ -89,41 +89,41 @@ def gen_script():
continue continue
v1 = old_env.get(k) v1 = old_env.get(k)
if not v1: if not v1:
script_lines.append(comment('adding %s=%s' % (k, v))) script_lines.append(comment(f"adding {k}={v}"))
elif v1 != v: elif v1 != v:
script_lines.append(comment('updating %s=%s -> %s' % (k, v1, v))) script_lines.append(comment(f"updating {k}={v1} -> {v}"))
# process special variables # process special variables
if k == 'PWD': if k == "PWD":
script_lines.append('cd %s' % escape(v)) script_lines.append(f"cd {escape(v)}")
continue continue
else: else:
continue continue
if k == 'PATH': if k == "PATH": # noqa: SIM108
value = ' '.join([escape(directory) value = " ".join([escape(directory) for directory in v.split(":")])
for directory in v.split(':')])
else: else:
value = escape(v) value = escape(v)
script_lines.append('set -g -x %s %s' % (k, value)) script_lines.append(f"set -g -x {k} {value}")
for var in set(old_env.keys()) - set(new_env.keys()): for var in set(old_env.keys()) - set(new_env.keys()):
script_lines.append(comment('removing %s' % var)) script_lines.append(comment(f"removing {var}"))
script_lines.append('set -e %s' % var) script_lines.append(f"set -e {var}")
script = '\n'.join(script_lines) script = "\n".join(script_lines)
alias_lines = [] alias_lines = []
for line in alias_str.splitlines(): for line in alias_str.splitlines():
_, rest = line.split(None, 1) _, rest = line.split(None, 1)
k, v = rest.split("=", 1) k, v = rest.split("=", 1)
alias_lines.append("alias " + escape_identifier(k) + "=" + v) alias_lines.append("alias " + escape_identifier(k) + "=" + v)
alias = '\n'.join(alias_lines) alias = "\n".join(alias_lines)
return script + '\n' + alias return script + "\n" + alias
script_file = os.fdopen(3, 'w')
script_file = os.fdopen(3, "w")
if not sys.argv[1:]: if not sys.argv[1:]:
print('__bass_usage', file=script_file, end='') print("__bass_usage", file=script_file, end="")
sys.exit(0) sys.exit(0)
try: try:
@@ -131,7 +131,7 @@ try:
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
sys.exit(e.returncode) sys.exit(e.returncode)
except Exception: except Exception:
print('Bass internal error!', file=sys.stderr) print("Bass internal error!", file=sys.stderr)
raise # traceback will output to stderr raise # traceback will output to stderr
except KeyboardInterrupt: except KeyboardInterrupt:
signal.signal(signal.SIGINT, signal.SIG_DFL) signal.signal(signal.SIGINT, signal.SIG_DFL)

View File

@@ -1,6 +1,6 @@
function fisher --argument-names cmd --description "A plugin manager for Fish" function fisher --argument-names cmd --description "A plugin manager for Fish"
set --query fisher_path || set --local fisher_path $__fish_config_dir set --query fisher_path || set --local fisher_path $__fish_config_dir
set --local fisher_version 4.4.5 set --local fisher_version 4.4.8
set --local fish_plugins $__fish_config_dir/fish_plugins set --local fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd" switch "$cmd"
@@ -9,6 +9,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
case "" -h --help case "" -h --help
echo "Usage: fisher install <plugins...> Install plugins" echo "Usage: fisher install <plugins...> Install plugins"
echo " fisher remove <plugins...> Remove installed plugins" echo " fisher remove <plugins...> Remove installed plugins"
echo " fisher uninstall <plugins...> Remove installed plugins (alias)"
echo " fisher update <plugins...> Update installed plugins" echo " fisher update <plugins...> Update installed plugins"
echo " fisher update Update all installed plugins" echo " fisher update Update all installed plugins"
echo " fisher list [<regex>] List installed plugins matching regex" echo " fisher list [<regex>] List installed plugins matching regex"
@@ -19,9 +20,11 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~ echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~
case ls list case ls list
string match --entire --regex -- "$argv[2]" $_fisher_plugins string match --entire --regex -- "$argv[2]" $_fisher_plugins
case install update remove case install update remove uninstall
isatty || read --local --null --array stdin && set --append argv $stdin isatty || read --local --null --array stdin && set --append argv $stdin
test "$cmd" = uninstall && set cmd remove
set --local install_plugins set --local install_plugins
set --local update_plugins set --local update_plugins
set --local remove_plugins set --local remove_plugins
@@ -38,6 +41,8 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1 echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
end end
set arg_plugins $file_plugins set arg_plugins $file_plugins
else if test "$cmd" = install && ! set --query old_plugins[1]
set --append arg_plugins $file_plugins
end end
for plugin in $arg_plugins for plugin in $arg_plugins
@@ -86,6 +91,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
if test -e $plugin if test -e $plugin
command cp -Rf $plugin/* $source command cp -Rf $plugin/* $source
else else
set resp (command mktemp)
set temp (command mktemp -d) set temp (command mktemp -d)
set repo (string split -- \@ $plugin) || set repo[2] HEAD set repo (string split -- \@ $plugin) || set repo[2] HEAD
@@ -98,8 +104,13 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
echo Fetching (set_color --underline)\$url(set_color normal) echo Fetching (set_color --underline)\$url(set_color normal)
if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null set http (command curl -q --silent -L -o \$resp -w %{http_code} \$url)
if test \"\$http\" = 200 && command tar -xzC \$temp -f \$resp 2>/dev/null
command cp -Rf \$temp/*/* $source command cp -Rf \$temp/*/* $source
else if test \"\$http\" = 403
echo fisher: GitHub API rate limit exceeded \(HTTP 403\) >&2
command rm -rf $source
else else
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2 echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
command rm -rf $source command rm -rf $source

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,60 @@
# name: 'Catppuccin Frappé'
# url: 'https://github.com/catppuccin/fish'
[light]
# preferred_background: eff1f5
fish_color_normal 4c4f69
fish_color_command 1e66f5
fish_color_param dd7878
fish_color_keyword 8839ef
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
[dark]
# preferred_background: 303446
fish_color_normal c6d0f5
fish_color_command 8caaee
fish_color_param eebebe
fish_color_keyword ca9ee6
fish_color_quote a6d189
fish_color_redirection f4b8e4
fish_color_end ef9f76
fish_color_comment 838ba7
fish_color_error e78284
fish_color_gray 737994
fish_color_selection --background=414559
fish_color_search_match --background=414559
fish_color_option a6d189
fish_color_operator f4b8e4
fish_color_escape ea999c
fish_color_autosuggestion 737994
fish_color_cancel e78284
fish_color_cwd e5c890
fish_color_user 81c8be
fish_color_host 8caaee
fish_color_host_remote a6d189
fish_color_status e78284
fish_pager_color_progress 737994
fish_pager_color_prefix f4b8e4
fish_pager_color_completion c6d0f5
fish_pager_color_description 737994

View File

@@ -1,30 +0,0 @@
# 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

View File

@@ -0,0 +1,60 @@
# name: 'Catppuccin Macchiato'
# url: 'https://github.com/catppuccin/fish'
[light]
# preferred_background: eff1f5
fish_color_normal 4c4f69
fish_color_command 1e66f5
fish_color_param dd7878
fish_color_keyword 8839ef
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
[dark]
# preferred_background: 24273a
fish_color_normal cad3f5
fish_color_command 8aadf4
fish_color_param f0c6c6
fish_color_keyword c6a0f6
fish_color_quote a6da95
fish_color_redirection f5bde6
fish_color_end f5a97f
fish_color_comment 8087a2
fish_color_error ed8796
fish_color_gray 6e738d
fish_color_selection --background=363a4f
fish_color_search_match --background=363a4f
fish_color_option a6da95
fish_color_operator f5bde6
fish_color_escape ee99a0
fish_color_autosuggestion 6e738d
fish_color_cancel ed8796
fish_color_cwd eed49f
fish_color_user 8bd5ca
fish_color_host 8aadf4
fish_color_host_remote a6da95
fish_color_status ed8796
fish_pager_color_progress 6e738d
fish_pager_color_prefix f5bde6
fish_pager_color_completion cad3f5
fish_pager_color_description 6e738d

View File

@@ -1,11 +1,41 @@
# name: 'Catppuccin Mocha' # name: 'Catppuccin Mocha'
# url: 'https://github.com/catppuccin/fish' # url: 'https://github.com/catppuccin/fish'
# preferred_background: 1e1e2e
[light]
# preferred_background: eff1f5
fish_color_normal 4c4f69
fish_color_command 1e66f5
fish_color_param dd7878
fish_color_keyword 8839ef
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
[dark]
# preferred_background: 1e1e2e
fish_color_normal cdd6f4 fish_color_normal cdd6f4
fish_color_command 89b4fa fish_color_command 89b4fa
fish_color_param f2cdcd fish_color_param f2cdcd
fish_color_keyword f38ba8 fish_color_keyword cba6f7
fish_color_quote a6e3a1 fish_color_quote a6e3a1
fish_color_redirection f5c2e7 fish_color_redirection f5c2e7
fish_color_end fab387 fish_color_end fab387

View File

@@ -1,6 +0,0 @@
[General]
ApplicationUpdateChannel=release
CheckApplicatonUpdates=true
FirmwareUpdateChannel=release
LastFolderUrl=/Users/ivuorinen
ShowHiddenFiles=false

View File

@@ -14,7 +14,8 @@ if [[ $- =~ i ]]; then
# To use custom commands instead of find, override _fzf_compgen_{path,dir} # To use custom commands instead of find, override _fzf_compgen_{path,dir}
if ! declare -f _fzf_compgen_path > /dev/null; then if ! declare -f _fzf_compgen_path > /dev/null; then
_fzf_compgen_path() { _fzf_compgen_path()
{
echo "$1" echo "$1"
command find -L "$1" \ command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \ -name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
@@ -23,7 +24,8 @@ if [[ $- =~ i ]]; then
fi fi
if ! declare -f _fzf_compgen_dir > /dev/null; then if ! declare -f _fzf_compgen_dir > /dev/null; then
_fzf_compgen_dir() { _fzf_compgen_dir()
{
command find -L "$1" \ command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \ -name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@' -a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
@@ -35,10 +37,13 @@ if [[ $- =~ i ]]; then
# To redraw line after fzf closes (printf '\e[5n') # To redraw line after fzf closes (printf '\e[5n')
bind '"\e[0n": redraw-current-line' 2> /dev/null bind '"\e[0n": redraw-current-line' 2> /dev/null
__fzf_comprun() { __fzf_comprun()
{
if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then
_fzf_comprun "$@" _fzf_comprun "$@"
elif [[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; }; then elif [[ -n "${TMUX_PANE-}" ]] && {
[[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]
}; then
shift shift
fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@" fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"
else else
@@ -47,7 +52,8 @@ if [[ $- =~ i ]]; then
fi fi
} }
__fzf_orig_completion() { __fzf_orig_completion()
{
local l comp f cmd local l comp f cmd
while read -r l; do while read -r l; do
if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then
@@ -63,7 +69,8 @@ if [[ $- =~ i ]]; then
done done
} }
_fzf_opts_completion() { _fzf_opts_completion()
{
local cur prev opts local cur prev opts
COMPREPLY=() COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}" cur="${COMP_WORDS[COMP_CWORD]}"
@@ -134,7 +141,8 @@ if [[ $- =~ i ]]; then
return 0 return 0
} }
_fzf_handle_dynamic_completion() { _fzf_handle_dynamic_completion()
{
local cmd orig_var orig ret orig_cmd orig_complete local cmd orig_var orig ret orig_cmd orig_complete
cmd="$1" cmd="$1"
shift shift
@@ -161,7 +169,8 @@ if [[ $- =~ i ]]; then
fi fi
} }
__fzf_generic_path_completion() { __fzf_generic_path_completion()
{
local cur base dir leftover matches trigger cmd local cur base dir leftover matches trigger cmd
cmd="${COMP_WORDS[0]}" cmd="${COMP_WORDS[0]}"
if [[ $cmd == \\* ]]; then if [[ $cmd == \\* ]]; then
@@ -207,7 +216,8 @@ if [[ $- =~ i ]]; then
fi fi
} }
_fzf_complete() { _fzf_complete()
{
# Split arguments around -- # Split arguments around --
local args rest str_arg i sep local args rest str_arg i sep
args=("$@") args=("$@")
@@ -253,50 +263,59 @@ if [[ $- =~ i ]]; then
fi fi
} }
_fzf_path_completion() { _fzf_path_completion()
{
__fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@" __fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"
} }
# Deprecated. No file only completion. # Deprecated. No file only completion.
_fzf_file_completion() { _fzf_file_completion()
{
_fzf_path_completion "$@" _fzf_path_completion "$@"
} }
_fzf_dir_completion() { _fzf_dir_completion()
{
__fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@" __fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@"
} }
_fzf_complete_kill() { _fzf_complete_kill()
{
_fzf_proc_completion "$@" _fzf_proc_completion "$@"
} }
_fzf_proc_completion() { _fzf_proc_completion()
{
_fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <( _fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
command ps -eo user,pid,ppid,start,time,command 2>/dev/null || command ps -eo user,pid,ppid,start,time,command 2> /dev/null \
command ps -eo user,pid,ppid,time,args # For BusyBox || command ps -eo user,pid,ppid,time,args # For BusyBox
) )
} }
_fzf_proc_completion_post() { _fzf_proc_completion_post()
{
awk '{print $2}' awk '{print $2}'
} }
_fzf_host_completion() { _fzf_host_completion()
{
_fzf_complete +m -- "$@" < <( _fzf_complete +m -- "$@" < <(
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \ command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \ <(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') | <(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') \
awk '{if (length($2) > 0) {print $2}}' | sort -u | awk '{if (length($2) > 0) {print $2}}' | sort -u
) )
} }
_fzf_var_completion() { _fzf_var_completion()
{
_fzf_complete -m -- "$@" < <( _fzf_complete -m -- "$@" < <(
declare -xp | sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p' declare -xp | sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p'
) )
} }
_fzf_alias_completion() { _fzf_alias_completion()
{
_fzf_complete -m -- "$@" < <( _fzf_complete -m -- "$@" < <(
alias | sed -En 's|^alias ([^=]+).*|\1|p' alias | sed -En 's|^alias ([^=]+).*|\1|p'
) )
@@ -327,7 +346,8 @@ if [[ $- =~ i ]]; then
_fzf_completion_loader=1 _fzf_completion_loader=1
fi fi
__fzf_defc() { __fzf_defc()
{
local cmd func opts orig_var orig def local cmd func opts orig_var orig def
cmd="$1" cmd="$1"
func="$2" func="$2"
@@ -354,7 +374,8 @@ if [[ $- =~ i ]]; then
unset cmd d_cmds a_cmds unset cmd d_cmds a_cmds
_fzf_setup_completion() { _fzf_setup_completion()
{
local kind fn cmd local kind fn cmd
kind=$1 kind=$1
fn=_fzf_${1}_completion fn=_fzf_${1}_completion

View File

@@ -13,7 +13,8 @@
# Key bindings # Key bindings
# ------------ # ------------
__fzf_select__() { __fzf_select__()
{
local cmd opts local cmd opts
cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type f -print \ -o -type f -print \
@@ -21,27 +22,32 @@ __fzf_select__() {
-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"
# shellcheck disable=SC2091 # Intentionally execute output of __fzfcmd # shellcheck disable=SC2091 # Intentionally execute output of __fzfcmd
eval "$cmd" | 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
} }
if [[ $- =~ i ]]; then if [[ $- =~ i ]]; then
__fzfcmd() { __fzfcmd()
[[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; } && {
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf" [[ -n "${TMUX_PANE-}" ]] && {
[[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]
} \
&& echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
} }
fzf-file-widget() { fzf-file-widget()
{
local selected local selected
selected="$(__fzf_select__ "$@")" 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}))
} }
__fzf_cd__() { __fzf_cd__()
{
local cmd opts dir local cmd opts dir
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ 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-"}"
@@ -53,16 +59,17 @@ if [[ $- =~ i ]]; then
) && printf 'builtin cd -- %q' "$dir" ) && printf 'builtin cd -- %q' "$dir"
} }
__fzf_history__() { __fzf_history__()
{
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 # shellcheck disable=SC2091 # Intentionally execute output of __fzfcmd
output=$( output=$(
set +o pipefail set +o pipefail
builtin fc -lnr -2147483648 | builtin fc -lnr -2147483648 \
last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" | | last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" \
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE"
) || return ) || return
READLINE_LINE=${output#*$'\t'} READLINE_LINE=${output#*$'\t'}
if [[ -z "$READLINE_POINT" ]]; then if [[ -z "$READLINE_POINT" ]]; then

View File

@@ -52,4 +52,4 @@ keybindings:
prs: [] prs: []
repoPaths: {} repoPaths: {}
pager: pager:
diff: '' diff: ""

View File

@@ -1,3 +1,3 @@
--- ---
git_protocol: https git_protocol: https
version: '1' version: "1"

View File

@@ -1,15 +0,0 @@
# vim: ft=ghostty
theme = "light:tokyonight-day,dark:tokyonight-storm"
font-family = "JetBrainsMono Nerd Font Mono"
background-blur-radius = 15
background-opacity = 0.95
clipboard-read = allow
clipboard-write = allow
cursor-style = bar
custom-shader-animation = true
gtk-single-instance = true
mouse-hide-while-typing = true
shell-integration-features = true
window-theme = system

View File

@@ -260,8 +260,6 @@ brew "php@8.2", link: true
brew "php@8.3" brew "php@8.3"
# Pins GitHub Actions to full hashes and versions # Pins GitHub Actions to full hashes and versions
brew "pinact" brew "pinact"
# Execute binaries from Python packages in isolated environments
brew "pipx"
# Python version management # Python version management
brew "pyenv" brew "pyenv"
# Migrate pip packages from one Python version to another # Migrate pip packages from one Python version to another

View File

@@ -1,54 +0,0 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
htop_version=3.4.1
config_reader_min_version=3
fields=0 48 17 18 38 39 2 46 47 49 1
hide_kernel_threads=1
hide_userland_threads=0
hide_running_in_container=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_deleted_exe=1
shadow_distribution_path_prefix=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
header_margin=1
screen_tabs=1
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
show_cached_memory=1
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
hide_function_bar=0
header_layout=two_50_50
column_meters_0=LeftCPUs2 Memory Swap
column_meter_modes_0=1 1 1
column_meters_1=RightCPUs2 Tasks LoadAverage Uptime
column_meter_modes_1=1 2 2 2
tree_view=0
sort_key=46
tree_sort_key=0
sort_direction=-1
tree_sort_direction=1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.tree_sort_key=PID
.tree_view_always_by_pid=0
.tree_view=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0

View File

@@ -1,4 +1,4 @@
#!/bin/env bash #!/usr/bin/env bash
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.config/nvm" [[ -z "$NVM_DIR" ]] && export NVM_DIR="$HOME/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [[ -s "$NVM_DIR/nvm.sh" ]] && \. "$NVM_DIR/nvm.sh" # This loads nvm

View File

@@ -1,15 +0,0 @@
# Disable the startup message
startup_message off
# Set a large scrollback buffer
defscrollback 32000
# Always start `screen` with UTF-8 enabled (`screen -U`)
defutf8 on
# Scroll with mouse wheel (http://stackoverflow.com/a/1125947)
termcapinfo xterm* ti@:te@
# Some settings for screen + vim
term xterm-256color
maptimeout 10

View File

@@ -1 +0,0 @@
set tabsize 2

View File

@@ -1,18 +0,0 @@
#!/usr/bin/env bash
###############################################################################
# .nbrc
#
# Configuration file for `nb`, a command line note-taking, bookmarking,
# and knowledge base application with encryption, search, Git-backed syncing,
# and more in a single portable script.
#
# Edit this file manually or manage settings using the `nb settings`
# subcommand. Configuration options are set as environment variables, eg:
# export NB_ENCRYPTION_TOOL=gpg
#
# https://github.com/xwmx/nb
###############################################################################
export NB_DIR="${NB_DIR:-$HOME/.local/state/nb}" # Set by `nb` • Mon May 8 15:25:12 EEST 2023
export NB_COLOR_THEME="${NB_COLOR_THEME:-unicorn}" # Set by `nb` • Mon May 8 15:41:22 EEST 2023

View File

@@ -3,19 +3,14 @@
return { return {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
version = false, -- last release is way too old and doesn't work on Windows version = false, -- last release is way too old and doesn't work on Windows
build = function() lazy = false,
pcall(require('nvim-treesitter.install').update { with_sync = true }) build = ':TSUpdate',
end,
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
'nvim-treesitter/nvim-treesitter-refactor',
'nvim-treesitter/nvim-treesitter-context',
'JoosepAlviste/nvim-ts-context-commentstring',
},
opts = { opts = {
auto_install = true, -- Auto install the parser generators auto_install = true, -- Auto install the parser generators
sync_install = false, -- Sync install the parser generators, install async sync_install = false, -- Sync install the parser generators, install async
install_dir = vim.fn.stdpath 'data' .. '/site',
-- Add languages to be installed here that you want installed for treesitter -- Add languages to be installed here that you want installed for treesitter
ensure_installed = { ensure_installed = {
'lua', 'lua',
@@ -28,31 +23,6 @@ return {
highlight = { enable = true }, highlight = { enable = true },
indent = { enable = true }, indent = { enable = true },
textobjects = {
select = {
enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
}, },
move = { config = function(_, opts) require('nvim-treesitter').setup(opts) end,
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
},
},
},
config = function(_, opts)
require('nvim-treesitter.configs').setup(opts)
vim.api.nvim_create_autocmd({ 'FileType' }, {
callback = function()
-- Set foldmethod to treesitter if available
if require('nvim-treesitter.parsers').has_parser() then
vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
end
vim.opt.foldlevel = 9 -- Open all folds by default
vim.opt.foldnestmax = 99 -- Maximum fold nesting
end,
})
end,
} }

View File

@@ -40,7 +40,8 @@ return {
operators = {}, operators = {},
-- miscs = {}, -- Uncomment to turn off hard-coded styles -- miscs = {}, -- Uncomment to turn off hard-coded styles
}, },
lsp_styles = { -- Handles the style of specific lsp hl groups (see `:h lsp-highlight`). -- Style of specific lsp hl groups (`:h lsp-highlight`)
lsp_styles = {
virtual_text = { virtual_text = {
errors = { 'italic' }, errors = { 'italic' },
hints = { 'italic' }, hints = { 'italic' },
@@ -72,7 +73,8 @@ return {
enabled = true, enabled = true,
indentscope_color = '', indentscope_color = '',
}, },
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) -- More integrations:
-- github.com/catppuccin/nvim#integrations
}, },
} }
@@ -115,7 +117,8 @@ return {
{ {
'dmtrKovalenko/fff.nvim', 'dmtrKovalenko/fff.nvim',
build = function() build = function()
-- this will download prebuild binary or try to use existing rustup toolchain to build from source -- Downloads prebuild binary or uses rustup
-- toolchain to build from source
-- (if you are using lazy you can use gb for rebuilding a plugin if needed) -- (if you are using lazy you can use gb for rebuilding a plugin if needed)
require('fff.download').download_or_build_binary() require('fff.download').download_or_build_binary()
end, end,
@@ -124,7 +127,8 @@ return {
opts = { -- (optional) opts = { -- (optional)
debug = { debug = {
enabled = true, -- we expect your collaboration at least during the beta enabled = true, -- we expect your collaboration at least during the beta
show_scores = true, -- to help us optimize the scoring system, feel free to share your scores! -- Share scores to help optimize scoring
show_scores = true,
}, },
}, },
-- No need to lazy-load with lazy.nvim. -- No need to lazy-load with lazy.nvim.

View File

@@ -32,10 +32,6 @@ disable_startup_command = true
name = "dotfiles" name = "dotfiles"
path = "~/.dotfiles" path = "~/.dotfiles"
[[session]]
name = "neovim config"
path = "~/.dotfiles/config/nvim"
[[session]] [[session]]
name = "sesh config" name = "sesh config"
path = "~/.dotfiles/config/sesh" path = "~/.dotfiles/config/sesh"

View File

@@ -5,7 +5,7 @@
# shellcheck shell=bash # shellcheck shell=bash
# Defaults # Defaults
[ -z "$DOTFILES" ] && export DOTFILES="$HOME/.dotfiles" [[ -z "$DOTFILES" ]] && export DOTFILES="$HOME/.dotfiles"
DOTFILES_CURRENT_SHELL=$(basename "$SHELL") DOTFILES_CURRENT_SHELL=$(basename "$SHELL")
export DOTFILES_CURRENT_SHELL export DOTFILES_CURRENT_SHELL
@@ -15,7 +15,7 @@ VERBOSE="${VERBOSE:-0}"
DEBUG="${DEBUG:-0}" DEBUG="${DEBUG:-0}"
# Enable debugging with DEBUG=1 # Enable debugging with DEBUG=1
[ "${DEBUG:-0}" -eq 1 ] && set -x [[ "${DEBUG:-0}" -eq 1 ]] && set -x
# Detect the current shell # Detect the current shell
CURRENT_SHELL=$(ps -p $$ -ocomm= | awk -F/ '{print $NF}') CURRENT_SHELL=$(ps -p $$ -ocomm= | awk -F/ '{print $NF}')
@@ -33,9 +33,10 @@ x-path-prepend()
;; ;;
*) *)
echo "Unsupported shell: $CURRENT_SHELL" echo "Unsupported shell: $CURRENT_SHELL"
exit 1 return 1
;; ;;
esac esac
return 0
} }
# Function to set environment variables based on the shell # Function to set environment variables based on the shell
@@ -52,9 +53,10 @@ x-set-env()
;; ;;
*) *)
echo "Unsupported shell: $CURRENT_SHELL" echo "Unsupported shell: $CURRENT_SHELL"
exit 1 return 1
;; ;;
esac esac
return 0
} }
# Explicitly set XDG folders, if not already set # Explicitly set XDG folders, if not already set
@@ -74,7 +76,7 @@ x-path-prepend "$DOTFILES/local/bin"
x-path-prepend "$XDG_BIN_HOME" x-path-prepend "$XDG_BIN_HOME"
# Custom completion paths # Custom completion paths
[ -z "$ZSH_CUSTOM_COMPLETION_PATH" ] && export ZSH_CUSTOM_COMPLETION_PATH="$XDG_CONFIG_HOME/zsh/completion" [[ -z "$ZSH_CUSTOM_COMPLETION_PATH" ]] && export ZSH_CUSTOM_COMPLETION_PATH="$XDG_CONFIG_HOME/zsh/completion"
x-dc "$ZSH_CUSTOM_COMPLETION_PATH" x-dc "$ZSH_CUSTOM_COMPLETION_PATH"
export FPATH="$ZSH_CUSTOM_COMPLETION_PATH:$FPATH" export FPATH="$ZSH_CUSTOM_COMPLETION_PATH:$FPATH"
@@ -83,7 +85,8 @@ if ! declare -f msg > /dev/null; then
# $1 - message (string) # $1 - message (string)
msg() msg()
{ {
[ "$VERBOSE" -eq 1 ] && msgr msg "$1" local message="$1"
[[ "$VERBOSE" -eq 1 ]] && msgr msg "$message"
return 0 return 0
} }
msg "msg was not defined, defined it now" msg "msg was not defined, defined it now"
@@ -95,7 +98,8 @@ if ! declare -f msg_err > /dev/null; then
# $1 - error message (string) # $1 - error message (string)
msg_err() msg_err()
{ {
msgr err "$1" >&2 local message="$1"
msgr err "$message" >&2
exit 1 exit 1
} }
fi fi
@@ -106,7 +110,8 @@ if ! declare -f msg_done > /dev/null; then
# $1 - message (string) # $1 - message (string)
msg_done() msg_done()
{ {
msgr "done" "$1" local message="$1"
msgr "done" "$message"
return 0 return 0
} }
fi fi
@@ -117,7 +122,8 @@ if ! declare -f msg_run > /dev/null; then
# $1 - message (string) # $1 - message (string)
msg_run() msg_run()
{ {
msgr run "$1" local message="$1"
msgr run "$message"
return 0 return 0
} }
fi fi
@@ -128,7 +134,8 @@ if ! declare -f msg_ok > /dev/null; then
# $1 - message (string) # $1 - message (string)
msg_ok() msg_ok()
{ {
msgr ok "$1" local message="$1"
msgr ok "$message"
return 0 return 0
} }
fi fi
@@ -143,12 +150,16 @@ if ! declare -f array_diff > /dev/null; then
# Source: https://stackoverflow.com/a/42399479/594940 # Source: https://stackoverflow.com/a/42399479/594940
array_diff() array_diff()
{ {
local result_var="$1"
local arr1_name="$2"
local arr2_name="$3"
# shellcheck disable=SC1083,SC2086 # shellcheck disable=SC1083,SC2086
eval local ARR1=\(\"\${$2[@]}\"\) eval local ARR1=\(\"\${${arr1_name}[@]}\"\)
# shellcheck disable=SC1083,SC2086 # shellcheck disable=SC1083,SC2086
eval local ARR2=\(\"\${$3[@]}\"\) eval local ARR2=\(\"\${${arr2_name}[@]}\"\)
local IFS=$'\n' local IFS=$'\n'
mapfile -t "$1" < <(comm -23 <(echo "${ARR1[*]}" | sort) <(echo "${ARR2[*]}" | sort)) mapfile -t "$result_var" < <(comm -23 <(echo "${ARR1[*]}" | sort) <(echo "${ARR2[*]}" | sort))
return 0
} }
fi fi

View File

@@ -1,154 +0,0 @@
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
format = """
$os\
$directory\
$git_branch\
$git_state\
$git_status\
$fill \
$battery\
$username\
$hostname\
$aws\
$gcloud\
$conda\
$golang\
$nodejs\
$php\
$python\
$package\
$line_break\
$character"""
# Timeout for commands executed by starship (in milliseconds).
command_timeout = 1500
[character]
success_symbol = "[→](bold green)"
error_symbol = "[→](red)"
vimcmd_symbol = "[←](green)"
[aws]
symbol = " "
format = '[$symbol($profile )(\($region\) )(\[$duration\] )]($style)'
[cmd_duration]
disabled = true
[directory]
read_only = " 󰌾"
style = "blue"
before_repo_root_style = "white"
truncation_symbol = "…/"
[docker_context]
symbol = " "
format = '[$symbol$context]($style) '
[fill]
symbol = '·'
style = 'bold black'
[gcloud]
format = '[($symbol)$account(@$domain)(\($region\))]($style) '
[git_branch]
symbol = " "
format = '[$symbol$branch(:$remote_branch)]($style) '
truncation_length = 20
truncation_symbol = '…'
ignore_branches = ['master', 'main']
[git_status]
up_to_date = '✓'
staged = '[++\($count\)](green)'
[git_state]
format = '\([$state( $progress_current/$progress_total)]($style)\) '
style = "bright-black"
[git_metrics]
added_style = 'bold blue'
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
disabled = false
[golang]
symbol = " "
format = '[$symbol($version )]($style) '
[hostname]
ssh_symbol = " "
ssh_only = false
format = '[$ssh_symbol](bold blue)[$hostname](bold red) '
[lua]
format = '[$symbol($version )]($style)'
[nodejs]
symbol = " "
format = '[$symbol($version )]($style)'
version_format = '${major}.${minor}'
[os]
format = "[$symbol]($style) "
style = "bold blue"
disabled = false
[os.symbols]
Alpaquita = " "
Alpine = " "
Amazon = " "
Android = " "
Arch = " "
Artix = " "
CentOS = " "
Debian = " "
DragonFly = " "
Emscripten = " "
EndeavourOS = " "
Fedora = " "
FreeBSD = " "
Garuda = "󰛓 "
Gentoo = " "
HardenedBSD = "󰞌 "
Illumos = "󰈸 "
Linux = " "
Mabox = " "
Macos = " "
Manjaro = " "
Mariner = " "
MidnightBSD = " "
Mint = " "
NetBSD = " "
NixOS = " "
OpenBSD = "󰈺 "
openSUSE = " "
OracleLinux = "󰌷 "
Pop = " "
Raspbian = " "
Redhat = " "
RedHatEnterprise = " "
Redox = "󰀘 "
Solus = "󰠳 "
SUSE = " "
Ubuntu = " "
Unknown = " "
Windows = "󰍲 "
[package]
symbol = "󰏗 "
format = '[$symbol($version )]($style)'
version_format = '${major}.${minor}'
[php]
format = '[$symbol($version )]($style)'
version_format = '${major}.${minor}'
[python]
symbol = " "
format = "[$virtualenv]($style) "
[username]
format = "[$user]($style) "

View File

@@ -1,81 +0,0 @@
# [Created by task 2.6.2 5/11/2023 09:33:14]
# Taskwarrior program configuration file.
# For more documentation, see https://taskwarrior.org or try 'man task', 'man task-color',
# 'man task-sync' or 'man taskrc'
# Here is an example of entries that use the default, override and blank values
# variable=foo -- By specifying a value, this overrides the default
# variable= -- By specifying no value, this means no default
# #variable=foo -- By commenting out the line, or deleting it, this uses the default
# You can also refence environment variables:
# variable=$HOME/task
# variable=$VALUE
# Use the command 'task show' to see all defaults and overrides
# Files
data.location=$XDG_DATA_HOME/task/
# To use the default location of the XDG directories,
# move this configuration file from ~/.taskrc to ~/.config/task/taskrc and uncomment below
#data.location=$XDG_DATA_HOME/task
#hooks.location=~/.config/task/hooks
# Color theme (uncomment one to use)
#include light-16.theme
#include light-256.theme
#include dark-16.theme
#include dark-256.theme
#include dark-red-256.theme
#include dark-green-256.theme
#include dark-blue-256.theme
#include dark-violets-256.theme
#include dark-yellow-green.theme
#include dark-gray-256.theme
#include dark-gray-blue-256.theme
#include solarized-dark-256.theme
#include solarized-light-256.theme
#include no-color.theme
weekstart=monday
news.version=2.6.0
default.project=Inbox
calendar.details=full
calendar.holidays=sparse
recurrence=on
uda.taskwarrior-tui.keyconfig.quit=q
uda.taskwarrior-tui.keyconfig.refresh=r
uda.taskwarrior-tui.keyconfig.go-to-bottom=G
uda.taskwarrior-tui.keyconfig.go-to-top=g
uda.taskwarrior-tui.keyconfig.down=j
uda.taskwarrior-tui.keyconfig.up=k
uda.taskwarrior-tui.keyconfig.page-down=J
uda.taskwarrior-tui.keyconfig.page-up=K
uda.taskwarrior-tui.keyconfig.delete=x
uda.taskwarrior-tui.keyconfig.done=d
uda.taskwarrior-tui.keyconfig.start-stop=s
uda.taskwarrior-tui.keyconfig.quick-tag=t
uda.taskwarrior-tui.keyconfig.undo=u
uda.taskwarrior-tui.keyconfig.edit=e
uda.taskwarrior-tui.keyconfig.modify=m
uda.taskwarrior-tui.keyconfig.shell=!
uda.taskwarrior-tui.keyconfig.log=l
uda.taskwarrior-tui.keyconfig.add=a
uda.taskwarrior-tui.keyconfig.annotate=A
uda.taskwarrior-tui.keyconfig.filter=/
uda.taskwarrior-tui.keyconfig.zoom=z
uda.taskwarrior-tui.keyconfig.context-menu=c
uda.taskwarrior-tui.keyconfig.next-tab=.
uda.taskwarrior-tui.keyconfig.previous-tab=,
taskd.certificate=$XDG_DATA_HOME/task/private.certificate.pem
taskd.key=$XDG_DATA_HOME/task/private.key.pem
taskd.ca=$XDG_DATA_HOME/task/ca.cert.pem
taskd.server=inthe.am:53589
taskd.credentials=inthe_am/ivuorinen/b99a4970-94fb-4fb8-b9fe-e1a8140dd44d
taskd.trust=strict

View File

@@ -1,38 +0,0 @@
[style.description]
underline = false
bold = false
italic = false
[style.command_name]
foreground = "cyan"
underline = false
bold = false
italic = false
[style.example_text]
foreground = "green"
underline = false
bold = false
italic = false
[style.example_code]
foreground = "cyan"
underline = false
bold = false
italic = false
[style.example_variable]
foreground = "cyan"
underline = true
bold = false
italic = false
[display]
compact = false
use_pager = false
[updates]
auto_update = false
auto_update_interval_hours = 720
[directories]

View File

@@ -1,11 +0,0 @@
default_session = "main"
display_full_path = true
[[search_dirs]]
path = "~/Code"
depth = 3
[picker_colors]
highlight_color = "#31748f"
highlight_text_color = "#e0def4"
border_color = "#524F67"

View File

@@ -1 +0,0 @@
https://wfxr.mit-license.org/2018

View File

@@ -1,64 +0,0 @@
#!/usr/bin/env bash
#===============================================================================
# Author: Wenxuan
# Email: wenxuangm@gmail.com
# Created: 2018-04-06 12:12
#===============================================================================
get_fzf_options()
{
local fzf_options
local fzf_default_options='-w 100% -h 50% --multi -0 --no-preview'
fzf_options="$(tmux show -gqv '@fzf-url-fzf-options')"
[ -n "$fzf_options" ] && echo "$fzf_options" || echo "$fzf_default_options"
}
fzf_filter()
{
eval "fzf-tmux $(get_fzf_options)"
}
custom_open=$3
open_url()
{
if [[ -n $custom_open ]]; then
$custom_open "$@"
elif hash xdg-open &> /dev/null; then
nohup xdg-open "$@"
elif hash open &> /dev/null; then
nohup open "$@"
elif [[ -n $BROWSER ]]; then
nohup "$BROWSER" "$@"
fi
}
limit='screen'
[[ $# -ge 2 ]] && limit=$2
if [[ $limit == 'screen' ]]; then
content="$(tmux capture-pane -J -p -e | sed -r 's/\x1B\[[0-9;]*[mK]//g'))"
else
content="$(tmux capture-pane -J -p -e -S -"$limit" | sed -r 's/\x1B\[[0-9;]*[mK]//g'))"
fi
urls=$(echo "$content" | grep -oE '(https?|ftp|file):/?//[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]')
wwws=$(echo "$content" | grep -oE '(http?s://)?www\.[a-zA-Z](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}(/\S+)*' | grep -vE '^https?://' | sed 's/^\(.*\)$/http:\/\/\1/')
ips=$(echo "$content" | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(:[0-9]{1,5})?(/\S+)*' | sed 's/^\(.*\)$/http:\/\/\1/')
gits=$(echo "$content" | grep -oE '(ssh://)?git@\S*' | sed 's/:/\//g' | sed 's/^\(ssh\/\/\/\)\{0,1\}git@\(.*\)$/https:\/\/\2/')
gh=$(echo "$content" | grep -oE "['\"]([_A-Za-z0-9-]*/[_.A-Za-z0-9-]*)['\"]" | sed "s/['\"]//g" | sed 's#.#https://github.com/&#')
if [[ $# -ge 1 && $1 != '' ]]; then
extras=$(echo "$content" | eval "$1")
fi
items=$(
printf '%s\n' "${urls[@]}" "${wwws[@]}" "${gh[@]}" "${ips[@]}" "${gits[@]}" "${extras[@]}" \
| grep -v '^$' \
| sort -u \
| nl -w3 -s ' '
)
[ -z "$items" ] && tmux display 'tmux-fzf-url: no URLs found' && exit
fzf_filter <<< "$items" | awk '{print $2}' \
| while read -r chosen; do
open_url "$chosen" &> "/tmp/tmux-$(id -u)-fzf-url.log"
done

View File

@@ -1,23 +0,0 @@
#!/usr/bin/env bash
#===============================================================================
# Author: Wenxuan
# Email: wenxuangm@gmail.com
# Created: 2018-04-06 09:30
#===============================================================================
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# $1: option
# $2: default value
tmux_get() {
local value
value="$(tmux show -gqv "$1")"
[ -n "$value" ] && echo "$value" || echo "$2"
}
key="$(tmux_get '@fzf-url-bind' 'u')"
history_limit="$(tmux_get '@fzf-url-history-limit' 'screen')"
extra_filter="$(tmux_get '@fzf-url-extra-filter' '')"
custom_open="$(tmux_get '@fzf-url-open' '')"
echo "$extra_filter" >/tmp/filter
tmux bind-key "$key" run -b "$SCRIPT_DIR/fzf-url.sh '$extra_filter' $history_limit '$custom_open'"

View File

@@ -7,13 +7,13 @@ DEFAULT_NAME="main"
CURRENT_SESSION=$(tmux display-message -p "#{session_name}") CURRENT_SESSION=$(tmux display-message -p "#{session_name}")
# Check that the session has a name # Check that the session has a name
if [ "$CURRENT_SESSION" = "#{session_name}" ] || [ "$CURRENT_SESSION" = "0" ]; then if [[ "$CURRENT_SESSION" = "#{session_name}" ]] || [[ "$CURRENT_SESSION" = "0" ]]; then
# Check if the default name is already in use # Check if the default name is already in use
if tmux has-session -t "$DEFAULT_NAME" 2> /dev/null; then if tmux has-session -t "$DEFAULT_NAME" 2> /dev/null; then
# Query the user for a new name # Query the user for a new name
echo "Session name '$DEFAULT_NAME' is already in use. Enter a new name:" echo "Session name '$DEFAULT_NAME' is already in use. Enter a new name:"
read -r NEW_NAME read -r NEW_NAME
while tmux has-session -t "$NEW_NAME" 2> /dev/null || [ -z "$NEW_NAME" ]; do while tmux has-session -t "$NEW_NAME" 2> /dev/null || [[ -z "$NEW_NAME" ]]; do
echo "Name '$NEW_NAME' is invalid or already in use. Enter a new name:" echo "Name '$NEW_NAME' is invalid or already in use. Enter a new name:"
read -r NEW_NAME read -r NEW_NAME
done done

View File

@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Get session list and pipe it to gum for selection
SESH_LIST=$(
sesh list -i \
| gum filter \
--limit 1 \
--no-sort \
--fuzzy \
--placeholder 'Pick a sesh' \
--height 50 \
--prompt='⚡'
)
# If a session was selected, connect to it
if [ "$SESH_LIST" != "" ]; then
sesh connect "$SESH_LIST"
fi

View File

@@ -1,18 +0,0 @@
#!/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

90
config/tmux/sesh.sh Executable file
View File

@@ -0,0 +1,90 @@
#!/usr/bin/env bash
# Unified sesh session picker with cascading tool detection:
# 1. gum — simple fuzzy filter
# 2. fzf-tmux — rich UI with keybinds, preview, session kill
# 3. fzf — same as fzf-tmux but inline
# 4. select — bare minimum numbered menu
set -euo pipefail
# Fall back to native tmux session picker if sesh is not installed
if ! command -v sesh &> /dev/null; then
tmux choose-tree -Zs
exit 0
fi
# Pick a sesh session using gum filter
pick_with_gum()
{
sesh list -i \
| gum filter \
--limit 1 \
--no-sort \
--fuzzy \
--placeholder 'Pick a sesh' \
--height 50 \
--prompt='⚡'
return 0
}
FZF_COMMON_OPTS=(
--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 {}'
)
# Pick a sesh session using fzf-tmux popup
pick_with_fzf_tmux()
{
sesh list --icons | fzf-tmux -p 80%,70% "${FZF_COMMON_OPTS[@]}"
return 0
}
# Pick a sesh session using fzf inline
pick_with_fzf()
{
sesh list --icons | fzf "${FZF_COMMON_OPTS[@]}"
return 0
}
# Pick a sesh session using bash select menu
pick_with_select()
{
local sessions
mapfile -t sessions < <(sesh list)
if [[ ${#sessions[@]} -eq 0 ]]; then
return
fi
PS3="Select session: "
select choice in "${sessions[@]}"; do
if [[ -n "${choice-}" ]]; then
printf '%s' "$choice"
break
fi
done
}
# Cascading tool detection
if command -v gum &> /dev/null; then
selection=$(pick_with_gum)
elif command -v fzf-tmux &> /dev/null; then
selection=$(pick_with_fzf_tmux)
elif command -v fzf &> /dev/null; then
selection=$(pick_with_fzf)
else
selection=$(pick_with_select)
fi
if [[ -n "${selection-}" ]]; then
sesh connect "$selection"
fi

View File

@@ -1 +1 @@
set -g @catppuccin_flavor "mocha" set -g @catppuccin_flavour "mocha"

View File

@@ -1 +1 @@
set -g @catppuccin_flavor "latte" set -g @catppuccin_flavour "latte"

View File

@@ -15,19 +15,21 @@
# -o : Set the option only if it is not already set. # -o : Set the option only if it is not already set.
# -u : Unset the specified option. # -u : Unset the specified option.
set -ag terminal-overrides ",xterm-256color:RGB" set -as terminal-features ",xterm-256color:RGB:clipboard:usstyle:strikethrough:overline"
# Enable proper color support
set -as terminal-features ",*:RGB"
set -s escape-time 0 # Address vim mode switching delay
set -s set-clipboard on # System clipboard via OSC 52
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
set -g focus-events on # Focus events enabled for terminals that support them set -g focus-events on # Focus events enabled for terminals that support them
set -g history-limit 50000 # Increase scrollback buffer size
set -g mouse on # Mouse support 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-interval 5 # Refresh status more often
set -g status-keys vi # vi keys to move between panes set -g status-keys vi # vi keys to move between panes
set -wg aggressive-resize on # Better for grouped sessions and multi-monitor
# Keep Tmux alive when the initial command is finished # Keep Tmux alive when the initial command is finished
set -g remain-on-exit off set -g remain-on-exit off
@@ -41,19 +43,10 @@ set -g renumber-windows on
# │ Theme │ # │ Theme │
# ╰──────────────────────────────────────────────────────────╯ # ╰──────────────────────────────────────────────────────────╯
set -g status-bg default
set -g status-justify left
set -g status-left ''
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 @catppuccin_window_left_separator "█"
set -g status-right-length "50" set -g @catppuccin_window_right_separator ""
#set -g window-status-current-format ' #I:#W#{?window_zoomed_flag, ◈ ,} ' set -g @catppuccin_window_middle_separator " "
#set -g window-status-format ' #I:#W '
set -g @catppuccin_status_background 'none'
set -g @catppuccin_window_flags 'icon'
set -g @catppuccin_window_text "#T"
set -g @catppuccin_window_current_text "#T"
# ╭──────────────────────────────────────────────────────────╮ # ╭──────────────────────────────────────────────────────────╮
# │ Bindings │ # │ Bindings │
@@ -69,11 +62,11 @@ set -g @catppuccin_window_current_text "#T"
set -g prefix C-Space set -g prefix C-Space
bind C-Space send-prefix bind C-Space send-prefix
# Use Alt-arrow keys without prefix key to switch panes # Use Ctrl-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L bind -n C-Left select-pane -L
bind -n M-Right select-pane -R bind -n C-Right select-pane -R
bind -n M-Up select-pane -U bind -n C-Up select-pane -U
bind -n M-Down select-pane -D bind -n C-Down select-pane -D
# Reload tmux config with <prefix> + r # Reload tmux config with <prefix> + r
unbind r unbind r
@@ -87,8 +80,16 @@ bind Escape copy-mode
unbind p unbind p
bind p paste-buffer bind p paste-buffer
# copy-mode-vi: y copies to system clipboard, Y copies and pastes
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
bind -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
# easier switching between next/prev window
bind C-p previous-window
bind C-n next-window
# global sessions # global sessions
bind -N "sesh selection" t display-popup -E "$HOME/.dotfiles/config/tmux/sesh-gum.sh" bind -N "sesh selection" t display-popup -E "$HOME/.dotfiles/config/tmux/sesh.sh"
bind -N "last-session (via sesh) " L run-shell "sesh last" bind -N "last-session (via sesh) " L run-shell "sesh last"
bind -N "sesh ui" N display-popup -E "sesh ui" bind -N "sesh ui" N display-popup -E "sesh ui"
@@ -101,33 +102,16 @@ bind -N "sesh ui" N display-popup -E "sesh ui"
# Plugin that lets you suspend local tmux session, # Plugin that lets you suspend local tmux session,
# so that you can work with nested remote tmux session painlessly. # so that you can work with nested remote tmux session painlessly.
# https://github.com/MunifTanjim/tmux-suspend # https://github.com/MunifTanjim/tmux-suspend
# set -g @suspend_key 'F8' # Default is F12 set -g @suspend_key 'F8' # Default is F12
set -g @suspend_suspended_options " \
## A plugin to name your tmux windows smartly. status-left-style::bg=brightblack\\,fg=black, \
## https://github.com/ofirgall/tmux-window-name status-left:: ⏸ , \
### Maximum name length of a window "
set -g @tmux_window_name_max_name_len "25"
### Replace $HOME with ~ in window names
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_shells "['bash', 'fish', 'sh', 'zsh']"
set -g @tmux_window_name_substitute_sets "[('.+ipython2', 'ipython2'), ('.+ipython3', 'ipython3'), ('.+\.local', '.local'), ('.+asdf', 'asdf')]"
set -g @tmux_window_name_use_tilde "True"
# https://github.com/erikw/tmux-dark-notify # https://github.com/erikw/tmux-dark-notify
set -g @dark-notify-theme-path-light "$HOME/.dotfiles/config/tmux/theme-light.conf" set -g @dark-notify-theme-path-light "$HOME/.dotfiles/config/tmux/theme-light.conf"
set -g @dark-notify-theme-path-dark "$HOME/.dotfiles/config/tmux/theme-dark.conf" set -g @dark-notify-theme-path-dark "$HOME/.dotfiles/config/tmux/theme-dark.conf"
## https://github.com/MunifTanjim/tmux-mode-indicator
set -g @mode_indicator_copy_mode_style 'bg=default,fg=yellow'
set -g @mode_indicator_empty_mode_style 'bg=default,fg=#7aa2f7'
set -g @mode_indicator_prefix_mode_style 'bg=default,fg=#7aa2f7'
set -g @mode_indicator_sync_mode_style 'bg=default,fg=red'
# https://github.com/wfxr/tmux-fzf-url
set -g @fzf-url-bind 'u'
set -g @fzf-url-history-limit '2000'
# https://github.com/tmux-plugins/tmux-continuum # https://github.com/tmux-plugins/tmux-continuum
set -g @continuum-restore 'on' set -g @continuum-restore 'on'
@@ -143,14 +127,9 @@ run-shell "$HOME/.dotfiles/config/tmux/theme-activate.sh"
# ── Sourcing the plugins ────────────────────────────────────────────── # ── Sourcing the plugins ──────────────────────────────────────────────
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sensible/sensible.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-window-name/tmux_window_name.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-suspend/suspend.tmux" run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-suspend/suspend.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux" run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-yank/yank.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-current-pane-hostname/current_pane_hostname.tmux" run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-current-pane-hostname/current_pane_hostname.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/catppuccin/catppuccin.tmux"

View File

@@ -1,181 +0,0 @@
---
wtf:
colors:
background: black
border:
focusable: darkslateblue
focused: orange
normal: gray
checked: yellow
highlight:
fore: black
back: gray
rows:
even: yellow
odd: white
grid:
# How _wide_ the columns are, in terminal characters. In this case we have
# four columns, each of which are 35 characters wide.
columns: [35, 35, 30, 20]
# How _high_ the rows are, in terminal lines. In this case we have four rows
# that support ten line of text and one of four.
rows: [10, 10, 10, 20, 10, 4]
refreshInterval: 1
openFileUtil: 'open'
mods:
# You can have multiple widgets of the same type.
# The "key" is the name of the widget and the type is the actual
# widget you want to implement.
europe_time:
title: 'Europe'
type: clocks
colors:
rows:
even: 'lightblue'
odd: 'white'
enabled: true
locations:
GMT: 'Etc/GMT'
Amsterdam: 'Europe/Amsterdam'
Berlin: 'Europe/Berlin'
Barcelona: 'Europe/Madrid'
Copenhagen: 'Europe/Copenhagen'
London: 'Europe/London'
Rome: 'Europe/Rome'
Stockholm: 'Europe/Stockholm'
position:
top: 0
left: 0
height: 1
width: 1
refreshInterval: 15
sort: 'alphabetical'
americas_time:
title: 'Americas'
type: clocks
colors:
rows:
even: 'lightblue'
odd: 'white'
enabled: true
locations:
UTC: 'Etc/UTC'
Vancouver: 'America/Vancouver'
New_York: 'America/New_York'
Sao_Paulo: 'America/Sao_Paulo'
Denver: 'America/Denver'
Iqaluit: 'America/Iqaluit'
Bahamas: 'America/Nassau'
Chicago: 'America/Chicago'
position:
top: 0
left: 1
height: 1
width: 1
refreshInterval: 15
sort: 'alphabetical'
battery:
type: power
title: '⚡️'
enabled: true
position:
top: 1
left: 2
height: 1
width: 2
refreshInterval: 15
todolist:
type: todo
checkedIcon: 'X'
colors:
checked: gray
highlight:
fore: 'black'
back: 'orange'
enabled: true
filename: 'todo.yml'
position:
top: 1
left: 0
height: 2
width: 1
refreshInterval: 3600
ip:
type: ipinfo
title: 'My IP'
colors:
name: 'lightblue'
value: 'white'
enabled: true
position:
top: 0
left: 2
height: 1
width: 2
refreshInterval: 150
security_info:
type: security
title: 'Staying safe'
enabled: true
position:
top: 1
left: 1
height: 1
width: 1
refreshInterval: 3600
readme:
type: textfile
enabled: true
filePaths:
- '~/.config/wtf/config.yml'
format: true
formatStyle: 'monokai'
position:
top: 3
left: 0
height: 1
width: 1
refreshInterval: 15
news:
type: hackernews
title: 'HackerNews'
enabled: true
numberOfStories: 10
position:
top: 3
left: 1
height: 1
width: 3
storyType: top
refreshInterval: 900
resources:
type: resourceusage
enabled: true
position:
top: 4
left: 0
height: 2
width: 1
refreshInterval: 1
uptime:
type: cmdrunner
args: []
cmd: 'uptime'
enabled: true
position:
top: 5
left: 1
height: 1
width: 3
refreshInterval: 30
disks:
type: cmdrunner
cmd: 'df'
args: ['-h']
enabled: true
position:
top: 4
left: 1
height: 1
width: 3
refreshInterval: 3600

View File

@@ -20,7 +20,6 @@ yabai -m config \
window_shadow float window_shadow float
# apps to not manage (ignore) # apps to not manage (ignore)
# TODO: add apps from aerospace config to here
# list active apps: # list active apps:
# > yabai -m query --windows | jq .[].app | sort | uniq # > yabai -m query --windows | jq .[].app | sort | uniq
yabai -m rule --add app="1Password" manage=off yabai -m rule --add app="1Password" manage=off

View File

@@ -1,8 +0,0 @@
formatter:
type: basic
indent: 2
retain_line_breaks: false
disallow_anchors: false
max_line_length: 0
scan_folded_as_literal: false
indentless_arrays: false

View File

@@ -1,31 +0,0 @@
---
extends: default
ignore-from-file: [.gitignore, .yamlignore]
rules:
braces:
level: warning
max-spaces-inside: 1
brackets:
level: warning
max-spaces-inside: 1
colons:
level: warning
commas:
level: warning
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
level: warning
hyphens:
level: warning
indentation:
level: warning
indent-sequences: consistent
line-length:
level: warning
allow-non-breakable-inline-mappings: true
max: 120
truthy: disable

View File

@@ -37,7 +37,6 @@ zdharma-continuum/fast-syntax-highlighting
# Add some plugins that are not in OMZ # Add some plugins that are not in OMZ
jreese/zsh-titles jreese/zsh-titles
yuki-ycino/tms
# This needs to be last bundle # This needs to be last bundle
# zsh-users/zsh-syntax-highlighting # zsh-users/zsh-syntax-highlighting

View File

@@ -28,7 +28,6 @@ _dfm()
sections=( sections=(
'install:Installation commands' 'install:Installation commands'
'asdf:ASDF version manager commands'
'brew:Homebrew package manager commands' 'brew:Homebrew package manager commands'
'check:System check commands' 'check:System check commands'
'dotfiles:Dotfiles management commands' 'dotfiles:Dotfiles management commands'
@@ -69,24 +68,6 @@ _dfm()
_describe 'install commands' install_cmds _describe 'install commands' install_cmds
;; ;;
asdf)
local -a asdf_cmds
asdf_cmds=(
'current:Show current versions'
'global:Show global versions'
'installed:Show installed versions'
'plugins-update:Update all plugins'
'plugins-install:Install plugins from configuration'
'plugins-remove:Remove installed plugins'
'reset:Reset plugins'
'fix-tool-versions:Remove uninstalled plugins from .tool-versions'
'versions:Show versions'
'where:Show where'
'which:Show which'
)
_describe 'asdf commands' asdf_cmds
;;
brew) brew)
local -a brew_cmds local -a brew_cmds
brew_cmds=( brew_cmds=(

View File

@@ -1,66 +0,0 @@
# aerospace keybindings
## main
| Key | Command(s) and actions |
| -------------- | -------------------------------------------- |
| alt-a | mode apps |
| alt-h | focus left |
| alt-j | focus down |
| alt-k | focus up |
| alt-l | focus right |
| alt-m | mode move |
| alt-s | mode service |
| alt-shift-1 | workspace 1 |
| alt-shift-2 | workspace 2 |
| alt-shift-tab | workspace-back-and-forth |
| ctrl-shift-1 | move-node-to-workspace 1 |
| ctrl-shift-2 | move-node-to-workspace 2 |
| ctrl-shift-tab | move-workspace-to-monitor --wrap-around prev |
## apps
| Key | Command(s) and actions |
| --- | ------------------------------------------------------------------ |
| b | exec-and-forget open -a /Applications/Brave Browser.app; mode main |
| c | exec-and-forget open -a /Applications/Ferdium.app; mode main |
| esc | reload-config; mode main |
| g | exec-and-forget open -a /Applications/Ghostty.app; mode main |
| o | exec-and-forget open -a /Applications/Obsidian.app; mode main |
| s | exec-and-forget open -a /Applications/Slack.app; mode main |
| t | exec-and-forget open -a /Applications/TIDAL.app; mode main |
| w | exec-and-forget open -a /Applications/WezTerm.app; mode main |
## move
| Key | Command(s) and actions |
| ----------- | ----------------------------------------------- |
| 1 | move-node-to-workspace 1 --focus-follows-window |
| 2 | move-node-to-workspace 2 --focus-follows-window |
| ctrl-h | resize smart -70 |
| ctrl-l | resize smart +70 |
| esc | reload-config; mode main |
| h | move left |
| j | move down |
| k | move up |
| l | move right |
| r | flatten-workspace-tree; mode main |
| shift-h | join-with left |
| shift-j | join-with down |
| shift-k | join-with up |
| shift-l | join-with right |
| shift-left | resize smart +70 |
| shift-right | resize smart -70 |
## service
| Key | Command(s) and actions |
| --------- | ---------------------------------------- |
| backspace | close-all-windows-but-current; mode main |
| esc | reload-config; mode main |
| f | layout floating tiling; mode main |
| r | flatten-workspace-tree; mode main |
File generated: 2025-01-15 13:32:41
Config file: [config/aerospace/aerospace.toml](./../config/aerospace/aerospace.toml)

View File

@@ -0,0 +1,40 @@
# Skip Already-Installed Cargo Packages
## Problem
`install-cargo-packages.sh` runs `cargo install-update -a` to update installed
packages, then runs `cargo install` for every package in the list — including
ones that are already installed and up-to-date. This wastes time rebuilding
packages that don't need it.
## Solution
Capture the `cargo install-update -a` output, parse installed package names,
and skip `cargo install` for any package that appeared in the update output.
## Changes
**File:** `scripts/install-cargo-packages.sh`
1. Declare an associative array `installed_packages` at the top.
2. In the `cargo-install-update` section, capture output with `tee /dev/stderr`
so it displays in real-time while also being stored in a variable.
3. Parse the captured output with `awk` — extract the first column from lines
matching a version pattern (`v[0-9]+\.[0-9]+`), skipping the header.
4. Populate `installed_packages` associative array from parsed names.
5. In `install_packages()`, check each package against the array. If found, log
a skip message via `msgr` and continue. If not found, install as before.
6. If `cargo-install-update` is not available, the array stays empty and all
packages install normally (preserves existing behavior).
## Output Parsing
The `cargo install-update -a` output format:
```text
Package Installed Latest Needs update
zoxide v0.9.8 v0.9.9 Yes
bkt v0.8.2 v0.8.2 No
```
Extraction: `awk '/v[0-9]+\.[0-9]+/ { print $1 }'` gets package names.

View File

@@ -0,0 +1,55 @@
# dfm Cleanup Design
## Summary
Clean up `local/bin/dfm` to fix bugs, remove dead code, improve
cross-platform portability, and make error handling consistent.
## Changes
### 1. Bash Version Bootstrap
Add a check at the top of the script (after variable declarations)
that requires bash 4.0+. On macOS, if bash is too old, install
Homebrew (if missing) and bash, then print instructions and exit.
The check itself uses only bash 3.2-compatible syntax.
### 2. Remove Fish Dead Code
Remove `CURRENT_SHELL` detection, `source_file()` function, and all
fish branches. Replace `source_file` calls with direct `source`.
The script has a bash shebang — fish handling was unreachable.
### 3. Bug Fixes
- Remove `ntfy` from install menu (no install script exists)
- Fix `msg)``msgr)` case label in `section_tests`
- Guard all `shift` calls against empty argument lists
- Quote `$width` in `menu_builder` seq calls
- Fix `$"..."` locale string → `"..."` in `usage()`
- Fix `exit 0` on apt.txt error → `return 1`
### 4. Replace `declare -A` in `section_scripts`
Replace associative array with indexed `"name:desc"` array,
matching the pattern used everywhere else in the script.
Move `get_script_description()` to top-level (out of the function).
### 5. Early-Return Guards & exit → return
- `section_brew()`: Early return with `msgr warn` if brew unavailable.
Remove duplicate `! x-have brew` check.
- `section_apt()`: Same pattern for apt.
- `section_check()`: Replace `exit` with `return`.
- `section_apt() install`: Replace `exit` with `return`.
- `section_brew() untracked`: Replace `exit` with `return`.
## Files Changed
- `local/bin/dfm` (all changes)
## Verification
- `yarn test` (existing bats test)
- `shellcheck local/bin/dfm`
- `bash -n local/bin/dfm` (syntax check)

View File

@@ -0,0 +1,46 @@
# x-* Scripts Cleanup Design
## Summary
Comprehensive cleanup of all 34 x-* utility scripts in `local/bin/`.
Fix critical bugs, consolidate duplicates, standardize patterns.
## Changes
### Removals
- `x-mkd`, `x-mkd.md`, `tests/x-mkd.bats` — unused, cd-in-subshell broken
- `x-validate-sha256sum.sh`, `x-validate-sha256sum.sh.md` — duplicates x-sha256sum-matcher
### Thin Wrappers (delegate to x-path)
- `x-path-append` → calls `x-path append "$@"`
- `x-path-prepend` → calls `x-path prepend "$@"`
- `x-path-remove` → calls `x-path remove "$@"`
### Critical Fixes
- `x-clean-vendordirs`: call msgr as command (it's in PATH)
- `x-foreach`: replace eval with direct "$@" execution
- `x-ip`: add error handling, curl check
### Consistency Fixes
- Fix `#!/bin/bash``#!/usr/bin/env bash` (x-env-list, x-localip)
- POSIX scripts keep `#!/bin/sh`
- Add `set -euo pipefail` where missing in bash scripts
- Use XDG variables instead of hardcoded paths (x-change-alacritty-theme)
- Quote unquoted variables
### Minor Fixes
- `x-multi-ping`: remove unused VERBOSE variable
- `x-when-down`, `x-when-up`: add error handling
- `x-term-colors`: add usage message
- `x-record`: fix undefined notify-call reference
## Verification
- `yarn test` — ensure remaining tests pass
- `shellcheck` on modified scripts
- `bash -n` syntax check on all modified bash scripts

View File

@@ -1,5 +1,5 @@
--- ---
- include: 'tools/dotbot-defaults.yaml' - include: "tools/dotbot-defaults.yaml"
- shell: - shell:
- echo "Configuring air" - echo "Configuring air"
- link: - link:
@@ -7,7 +7,7 @@
force: true force: true
glob: true glob: true
path: hosts/air/base/** path: hosts/air/base/**
prefix: '.' prefix: "."
~/.config/: ~/.config/:
glob: true glob: true
force: true force: true

View File

@@ -1,5 +1,5 @@
--- ---
- include: 'tools/dotbot-defaults.yaml' - include: "tools/dotbot-defaults.yaml"
- shell: - shell:
- echo "Configuring lakka" - echo "Configuring lakka"
- link: - link:
@@ -7,7 +7,7 @@
force: true force: true
glob: true glob: true
path: hosts/lakka/base/** path: hosts/lakka/base/**
prefix: '.' prefix: "."
~/.config/: ~/.config/:
glob: true glob: true
force: true force: true

View File

@@ -1,5 +1,5 @@
--- ---
- include: 'tools/dotbot-defaults.yaml' - include: "tools/dotbot-defaults.yaml"
- shell: - shell:
- echo "Configuring s" - echo "Configuring s"
- link: - link:
@@ -7,7 +7,7 @@
force: true force: true
glob: true glob: true
path: hosts/s/base/** path: hosts/s/base/**
prefix: '.' prefix: "."
~/.config/: ~/.config/:
glob: true glob: true
force: true force: true

Some files were not shown because too many files have changed in this diff Show More