diff --git a/.config/afx/github.yaml b/.config/afx/github.yaml new file mode 100644 index 00000000..c39dfede --- /dev/null +++ b/.config/afx/github.yaml @@ -0,0 +1,154 @@ +github: +- name: neovim/neovim + description: Vim-fork focused on extensibility and usability + owner: neovim + repo: neovim + release: + name: nvim + tag: nightly + command: + env: + EDITOR: nvim + alias: + vim: nvim + vi: command vim + link: + - from: '**/bin/nvim' + to: nvim +- name: junegunn/fzf + description: A command-line fuzzy finder + owner: junegunn + repo: fzf + command: + build: + steps: + - ./install --bin --no-update-rc --no-key-bindings + link: + - from: 'bin/fzf' + - from: 'bin/fzf-tmux' +- name: aquaproj/aqua + description: | + Declarative CLI Version manager written in Go. + Support Lazy Install, Registry, and continuous update with Renovate. + CLI version is switched seamlessly + owner: aquaproj + repo: aqua + release: + name: aqua + tag: v2.16.1 + command: + env: + AQUA_CONFIG: $XDG_CONFIG_HOME/aqua/aqua.yaml + AQUA_PROGRESS_BAR: "true" + AQUA_POLICY_CONFIG: $XDG_CONFIG_HOME/aqua/policy.yaml + link: + - from: "**/aqua" + to: aqua +- name: tmux-plugins/tpm + description: Tmux Plugin Manager + owner: tmux-plugins + repo: tpm + command: + link: + - from: . + to: $HOME/.tmux/plugins/tpm +- name: direnv/direnv + description: Unclutter your .profile + owner: direnv + repo: direnv + release: + name: direnv + tag: v2.30.3 + asset: + filename: '{{ .Release.Name }}.{{ .OS }}-{{ .Arch }}' + replacements: + darwin: darwin + amd64: amd64 + command: + link: + - from: direnv + snippet: | + eval "$(direnv hook zsh)" +- name: zdharma-continuum/fast-syntax-highlighting + description: Syntax-highlighting for Zshell + owner: zdharma-continuum + repo: fast-syntax-highlighting + plugin: + sources: + - fast-syntax-highlighting.plugin.zsh +- name: Aloxaf/fzf-tab + description: Replace zsh's default completion selection menu with fzf! + owner: Aloxaf + repo: fzf-tab + plugin: + sources: + - fzf-tab.plugin.zsh +- name: cli/cli + description: GitHub’s official command line tool + owner: cli + repo: cli + release: + name: gh + tag: v2.37.0 + asset: + filename: 'gh_{{ replace .Release.Tag "v" "" }}_{{ .OS }}_{{ .Arch }}.zip' + replacements: + darwin: macOS + command: + link: + - from: "gh_*/bin/gh" + to: gh +- name: starship/starship + description: ☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell! + owner: starship + repo: starship + release: + name: starship + tag: v1.16.0 + asset: + filename: 'starship-{{ .Arch }}-{{ .OS }}.tar.gz' + replacements: + darwin: apple-darwin + amd64: x86_64 + arm64: aarch64 + command: + link: + - from: starship + to: starship + env: + STARSHIP_CONFIG: $XDG_CONFIG_HOME/starship/starship.toml + snippet: | + eval "$(starship init zsh)" +- name: BurntSushi/ripgrep + description: ripgrep recursively searches directories for a regex pattern while respecting your gitignore + owner: BurntSushi + repo: ripgrep + release: + name: ripgrep + tag: 13.0.0 + asset: + filename: 'ripgrep-{{ .Release.Tag }}-{{ .Arch }}-{{ .OS }}.tar.gz' + replacements: + darwin: apple-darwin + amd64: x86_64 + arm64: x86_64 + linux: unknown-linux-musl + windows: pc-windows-msvc + command: + link: + - from: '*/rg' + to: rg +- name: Rasukarusan/fzf-chrome-active-tab + description: 🐧 Fuzzy search and activate Chrome tab via the terminal. + owner: Rasukarusan + repo: fzf-chrome-active-tab + release: + name: fzf-chrome-active-tab + tag: 0.03 + asset: + filename: 'chrome-tab-activate' + command: + link: + - from: 'chrome-tab-activate' + alias: + tl: chrome-tab-activate diff --git a/.config/afx/local.yaml b/.config/afx/local.yaml new file mode 100644 index 00000000..67d7c667 --- /dev/null +++ b/.config/afx/local.yaml @@ -0,0 +1,9 @@ +local: +- name: zsh + description: My zsh scripts + directory: ~/.zsh + plugin: + if: | + [[ $SHELL == *zsh* ]] + sources: + - '[0-9]*.zsh' diff --git a/.config/aqua/aqua.yaml b/.config/aqua/aqua.yaml index 9a61fa5b..cbe2ccd9 100644 --- a/.config/aqua/aqua.yaml +++ b/.config/aqua/aqua.yaml @@ -24,8 +24,6 @@ packages: - name: jqlang/jq@jq-1.7 - name: kubernetes/kubectl@v1.25.15 - name: kubernetes-sigs/kustomize@kustomize/v5.2.1 -- name: neovim/neovim@nightly - registry: custom - name: tree-sitter/tree-sitter@v0.20.8 - name: BurntSushi/ripgrep@13.0.0 - name: jesseduffield/lazygit@v0.40.2 @@ -53,8 +51,6 @@ packages: - name: open-policy-agent/conftest@v0.46.0 - name: open-policy-agent/opa@v0.58.0 - name: direnv/direnv@v2.32.3 -- name: Rasukarusan/fzf-chrome-active-tab@0.03 - registry: custom - name: jesseduffield/lazydocker@v0.23.1 - name: wagoodman/dive@v0.11.0 - name: golang/go@go1.21.3 @@ -70,9 +66,6 @@ packages: - name: kubernetes-sigs/controller-tools/controller-gen@v0.13.0 - name: sigs.k8s.io/controller-runtime/tools/setup-envtest@bf15e44 registry: custom -- name: Aloxaf/fzf-tab - registry: custom - version: c2b4aa5ad2532cca91f23908ac7f00efb7ff09c9 - name: kubernetes-sigs/krew@v0.4.4 - name: tilt-dev/tilt@v0.33.6 - name: tilt-dev/ctlptl@v0.8.22 diff --git a/.config/aqua/registry.yaml b/.config/aqua/registry.yaml index dd95c79b..fc667178 100644 --- a/.config/aqua/registry.yaml +++ b/.config/aqua/registry.yaml @@ -1,52 +1,4 @@ packages: -- type: github_release - repo_owner: neovim - repo_name: neovim - description: Hyperextensible Vim-based text editor - supported_envs: - - darwin - - linux - - amd64 - replacements: - windows: win64 - linux: linux64 - darwin: macos - asset: nvim-{{.OS}}.{{.Format}} - format: tar.gz - files: - - name: nvim - src: nvim-{{.OS}}/bin/nvim - overrides: - - goos: windows - format: zip - version_constraint: semver(">= 0.7.2") - version_overrides: - - version_constraint: "true" - overrides: - - goos: windows - format: zip - # - goos: darwin - # files: - # - name: nvim - # src: nvim-osx64/bin/nvim -- type: github_archive - name: Aloxaf/fzf-tab - repo_owner: Aloxaf - repo_name: fzf-tab - description: Replace zsh's default completion selection menu with fzf! - files: - - name: fzf-tab.plugin.zsh - src: fzf-tab-{{trimV .Version}}/fzf-tab.plugin.zsh -- type: github_release - repo_owner: Rasukarusan - repo_name: fzf-chrome-active-tab - description: 🐧 Fuzzy search and activate Chrome tab via the terminal. - supported_envs: - - darwin - supported_if: GOOS == "darwin" - asset: chrome-tab-activate - aliases: - - name: tl - type: go_install name: sigs.k8s.io/controller-runtime/tools/setup-envtest repo_owner: kubernetes-sigs diff --git a/.tmux/plugins/tpm b/.tmux/plugins/tpm deleted file mode 160000 index 99469c4a..00000000 --- a/.tmux/plugins/tpm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946 diff --git a/.tmux/plugins/tpm b/.tmux/plugins/tpm new file mode 120000 index 00000000..e33742b4 --- /dev/null +++ b/.tmux/plugins/tpm @@ -0,0 +1 @@ +/Users/skutsuza/.afx/github.com/tmux-plugins/tpm \ No newline at end of file diff --git a/.yamlfmt b/.yamlfmt new file mode 100644 index 00000000..41c2fa07 --- /dev/null +++ b/.yamlfmt @@ -0,0 +1,9 @@ +formatter: + type: basic + indentless_arrays: true + retain_line_breaks: true + max_line_length: 100 + drop_merge_tag: true +doublestar: true +include: +- '**/*.{yaml,yml}' diff --git a/.zsh/80_custom.zsh b/.zsh/80_custom.zsh index bcdf7aee..9149f6e9 100644 --- a/.zsh/80_custom.zsh +++ b/.zsh/80_custom.zsh @@ -1,11 +1,3 @@ -if has "kubectl"; then - alias k='kubectl' - - if (kubectl krew info neat > /dev/null); then - alias -g kvy="| kubectl neat | vim '+set filetype=yaml buftype=nofile'" - fi -fi - export KREW_ROOT=${KREW_ROOT:-$HOME/.krew} if [[ -d $KREW_ROOT ]]; then export PATH="${KREW_ROOT}/bin:$PATH" @@ -44,9 +36,6 @@ if has "consul"; then complete -o nospace -C `which consul` consul fi -# TODO: remove -alias gofmt="find . -not -path './vendor/*' -and -name '*.go' | xargs gofmt -w" - alias lgtm="echo '![LGTM](//lgtmoon.herokuapp.com/images/23050)'|pbcopy" if [[ -d "/usr/local/Caskroom/google-cloud-sdk" ]]; then diff --git a/.zsh/zinit.zsh b/.zsh/zinit.zsh deleted file mode 100644 index 7357e6ec..00000000 --- a/.zsh/zinit.zsh +++ /dev/null @@ -1,6 +0,0 @@ -# required for activatioin {{{ -# }}} - -zinit wait lucid light-mode as'null' \ - atinit'. "$HOME/.zsh/zinit_wait.zsh"' \ - for 'zdharma-continuum/null' diff --git a/.zsh/zinit_wait.zsh b/.zsh/zinit_wait.zsh deleted file mode 100644 index 771efcfd..00000000 --- a/.zsh/zinit_wait.zsh +++ /dev/null @@ -1,12 +0,0 @@ -# zsh {{{ -zinit wait lucid for \ - atinit"ZINIT[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" \ - zdharma-continuum/fast-syntax-highlighting \ - atload"!_zsh_autosuggest_start" \ - zsh-users/zsh-autosuggestions \ - blockf \ - zsh-users/zsh-completions -# }}} - -zinit ice wait cdreplay -q -zinit creinstall -Q %HOME/.zsh/Completion 2>&1 >/dev/null diff --git a/.zshenv b/.zshenv index e2334ca2..23d34bc8 100644 --- a/.zshenv +++ b/.zshenv @@ -1,8 +1,8 @@ typeset -gx -U path path=( \ + ~/bin(N-/) \ ~/.local/share/aquaproj-aqua/bin(N-/) \ /usr/local/bin(N-/) \ - ~/bin(N-/) \ /usr/sbin(N-/) \ ~/.local/bin(N-/) \ ~/.local/share/zinit/bin(N-/) \ @@ -109,14 +109,6 @@ fi export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" -# Aqua -export AQUA_CONFIG="${XDG_CONFIG_HOME}/aqua/aqua.yaml" -export AQUA_PROGRESS_BAR="true" -export AQUA_POLICY_CONFIG="${XDG_CONFIG_HOME}/aqua/policy.yaml" - -# Starship -export STARSHIP_CONFIG=$XDG_CONFIG_HOME/starship/starship.toml - # available $INTERACTIVE_FILTER export INTERACTIVE_FILTER="fzf:peco:percol:gof:pick" diff --git a/.zshrc b/.zshrc index d7f7bdc4..7a36a5ca 100644 --- a/.zshrc +++ b/.zshrc @@ -3,29 +3,12 @@ limit coredumpsize 0 bindkey -d autoload -U +X bashcompinit && bashcompinit -source ~/.zsh/10_utils.zsh - -if ! has "aqua"; then - curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v2.1.2/aqua-installer | bash +if ! command -v afx &> /dev/null; then + curl -sL https://raw.githubusercontent.com/b4b4r07/afx/HEAD/hack/install | bash fi -if command -v aqua &> /dev/null; then source <(aqua completion zsh); fi - -source "${ZINIT_HOME}/zinit.zsh" -source ~/.zsh/zinit.zsh - -if has "starship"; then - eval "$(starship init zsh)" -fi - -for file in $(find "${XDG_DATA_HOME}/aquaproj-aqua/pkgs/github_archive/github.com/Aloxaf/fzf-tab" -type f -name 'fzf-tab.plugin.zsh' | head -n 1); do - source ${file} -done -source ~/.zsh/20_keybinds.zsh -source ~/.zsh/30_aliases.zsh -source ~/.zsh/50_setopt.zsh -source ~/.zsh/60_lang.zsh -source ~/.zsh/80_custom.zsh +source <(afx init) +source <(afx completion zsh) if [[ -f ~/.zshrc.local ]]; then source ~/.zshrc.local diff --git a/bin/license b/bin/license deleted file mode 100755 index 870784b9..00000000 --- a/bin/license +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -curl -s https://www.apache.org/licenses/LICENSE-2.0.txt diff --git a/bin/notice b/bin/notice deleted file mode 100755 index 9ab8199e..00000000 --- a/bin/notice +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -# Usage: license -# Prints an MIT license appropriate for totin' around. -# -# $ license >COPYING -# -# Original version by Chris Wanstrath: -# http://gist.github.com/287717 -exec sh -c "tail -n +$(($LINENO + 2)) <$0 | sed s/DATE/$(date +%Y)/" - -Copyright © DATE Shu Kutsuzawa - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -``` -http://www.apache.org/licenses/LICENSE-2.0 -``` - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License.