Skip to content

Commit

Permalink
start to manage core command/plugin with afx
Browse files Browse the repository at this point in the history
  • Loading branch information
cappyzawa committed Oct 28, 2023
1 parent 960131b commit 4d0c00b
Show file tree
Hide file tree
Showing 13 changed files with 178 additions and 144 deletions.
154 changes: 154 additions & 0 deletions .config/afx/github.yaml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions .config/afx/local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
local:
- name: zsh
description: My zsh scripts
directory: ~/.zsh
plugin:
if: |
[[ $SHELL == *zsh* ]]
sources:
- '[0-9]*.zsh'
7 changes: 0 additions & 7 deletions .config/aqua/aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
48 changes: 0 additions & 48 deletions .config/aqua/registry.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion .tmux/plugins/tpm
Submodule tpm deleted from 99469c
1 change: 1 addition & 0 deletions .tmux/plugins/tpm
9 changes: 9 additions & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -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}'
11 changes: 0 additions & 11 deletions .zsh/80_custom.zsh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions .zsh/zinit.zsh

This file was deleted.

12 changes: 0 additions & 12 deletions .zsh/zinit_wait.zsh

This file was deleted.

10 changes: 1 addition & 9 deletions .zshenv
Original file line number Diff line number Diff line change
@@ -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-/) \
Expand Down Expand Up @@ -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"

Expand Down
25 changes: 4 additions & 21 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions bin/license

This file was deleted.

26 changes: 0 additions & 26 deletions bin/notice

This file was deleted.

0 comments on commit 4d0c00b

Please sign in to comment.