Skip to content

Commit

Permalink
move some tools to aqua
Browse files Browse the repository at this point in the history
  • Loading branch information
cappyzawa committed Oct 27, 2023
1 parent c3cdaa9 commit 5b76334
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 140 deletions.
7 changes: 7 additions & 0 deletions .config/aqua/aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ packages:
- name: mvdan/[email protected]
- name: stern/[email protected]
- name: kubernetes-sigs/[email protected]
- name: cloudfoundry/[email protected]
- name: denoland/[email protected]
- name: cue-lang/[email protected]
- name: ogham/[email protected]
- name: open-policy-agent/[email protected]
- name: open-policy-agent/[email protected]
- name: direnv/[email protected]
4 changes: 0 additions & 4 deletions .zsh/10_utils.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,3 @@ gcd() {
local repo_path=`ghq list --full-path | fzf --reverse --preview "bat {1}/README.md"`
\cd ${repo_path}
}

if has 'anyenv'; then
eval "$(anyenv init -)"
fi
8 changes: 4 additions & 4 deletions .zsh/80_custom.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ if [[ -d $KREW_ROOT ]]; then
export PATH="${KREW_ROOT}/bin:$PATH"
fi

if (which jenv > /dev/null); then
export JAVA_HOME="${ANYENV_ROOT}/envs/jenv/versions/`jenv version-name`"
fi

if has "lazygit"; then
alias lg='lazygit'
fi
Expand Down Expand Up @@ -116,3 +112,7 @@ if has "gh"; then
gh_install "dlvhdr/gh-dash"
gh alias import --clobber "${XDG_CONFIG_HOME}/gh/alias.yml" >/dev/null
fi

if has "exa"; then
alias ls="exa"
fi
19 changes: 0 additions & 19 deletions .zsh/zinit.zsh
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
# required for activatioin {{{
# junegunn/fzf {{{
zinit ice lucid from"gh-r" as"program"
# }}}
# direnv/direnv {{{
zinit ice from"gh-r" as"program" mv"direnv* -> direnv" \
atclone'./direnv hook zsh > zhook.zsh' atpull'%atclone' \
src"zhook.zsh"
zinit light direnv/direnv
# }}}
# anyenv/anyenv {{{
zinit ice lucid as"program" pick:"bin/anyenv"
zinit light anyenv/anyenv
# }}}
# aquaproj/aqua {{{
zinit ice lucid as"program" from"gh-r"
zinit light aquaproj/aqua
# }}}
zinit ice lucid
zinit snippet $HOME/.zsh/10_utils.zsh
# }}}

zinit wait lucid light-mode as'null' \
Expand Down
110 changes: 0 additions & 110 deletions .zsh/zinit_wait.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,6 @@ zinit snippet $HOME/.zsh/80_custom.zsh
# }}}

# utils {{{
# b4b4r07/enhancd {{{
zinit ice wait pick"init.sh" lucid \
atload'export ENHANCD_FILTER="fzf --height 50% --reverse --ansi";export ENHANCD_DOT_SHOW_FULLPATH=1' \
atclone"zinit cclear" atpull"%atclone"
zinit light "b4b4r07/enhancd"
# }}}
# starship/starship {{{
if is_mac; then
zinit ice wait lucid as"command" from"gh-r" \
bpick'starship-x86_64-apple-darwin.tar.gz' \
atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \
atpull"%atclone" src"init.zsh" \
atload"export STARSHIP_CONFIG=$XDG_CONFIG_HOME/starship/starship.toml"
zinit light starship/starship
fi
# }}}
# ogham/exa (as ls) {{{
zinit ice wait lucid as"program" from"gh-r" \
pick"bin/exa" \
atload="alias ls='exa'"
zinit light ogham/exa
# }}}
# jonas/tig {{{
zinit ice wait"1" as"program" lucid \
make"install prefix=$ZPFX" pick"$ZPFX/bin/tig"
Expand All @@ -44,28 +22,6 @@ zinit ice lucid wait"2" as"program" from"gh-r" \
has"fzf" mv"chrome-tab-activate->tl"
zinit light Rasukarusan/fzf-chrome-active-tab
# }}}
# sharkdp/bat {{{
zinit ice wait'1' lucid as"program" from"gh-r" \
pick"bat-v*/bat" \
atload"compdef _gnu_generic bat"
zinit light sharkdp/bat
# }}}
# facebookexperimental/starlark-rust {{{
zinit ice wait'3' lucid as"program" has"cargo" \
atclone"cargo build" atpull"%atclone" \
pick"target/debug/starlark"
zinit light facebookexperimental/starlark-rust
# }}}
# open-policy-agent/conftest {{{
zinit ice wait'2' lucid as"program" from"gh-r" \
atclone"./conftest completion zsh > ~/.zsh/.Completion/_conftest" atpull"%atclone"
zinit light open-policy-agent/conftest
# }}}
# open-policy-agent/opa {{{
zinit ice wait'2' lucid as"program" from"gh-r" \
mv"opa* -> opa"
zinit light open-policy-agent/opa
# }}}
# Aloxaf/fzf-tab {{{
zinit ice wait'2' lucid as"program" \
atload"source ./fzf-tab.plugin.zsh"
Expand Down Expand Up @@ -245,54 +201,6 @@ zinit ice wait'2' lucid as"program" from"gh-r" \
atpull"%atclone"
zinit light tilt-dev/ctlptl
# }}}
# GoogleContainerTools/skaffold {{{
zinit ice wait'2' lucid as"program" from"gh-r" \
mv"skaffold-*->skaffold" \
atclone"./skaffold completion zsh > ${HOME}/.zsh/Completion/_skaffold" \
atpull"%atclone"
zinit light GoogleContainerTools/skaffold
# }}}
# }}}

# hashicorp tools {{{
# terraform {{{
# terraform-linters/tflint {{{
zinit ice wait'2' lucid as"program" from:"gh-r" has"terraform"
zinit light terraform-linters/tflint
# }}}
# terraform-docs/terraform-docs {{{
zinit ice wait'2' lucid as"program" from:"gh-r" has"terraform" \
mv"terraform-docs-*->terraform-docs"
zinit light terraform-docs/terraform-docs
# }}}
# hashicorp/terraform-bundle {{{
zinit ice wait'3' lucid as"program" has"go" id-as"hashicorp/terraform-bundle" \
atclone"go install ./tools/terraform-bundle" atpull"%atclone"
zinit light hashicorp/terraform
# }}}
# cappyzawa/tfswitch {{{
zinit ice wait'1' lucid as"program" from"gh-r"
zinit light cappyzawa/tfswitch
# }}}
# im2nguyen/rover {{{
zinit ice wait'1' lucid as"program" from"gh-r" \
mv"rover_* -> rover"
zinit light im2nguyen/rover
# }}}
# }}}
# }}}

# tonsky/FiraCode {{{
zinit ice wait'1' lucid as"program" from:"gh-r" \
if'[[ "$(ostype)" == "darwin" ]]' \
atclone"cp ttf/FiraCode*.ttf ~/Library/Fonts"
zinit light tonsky/FiraCode
# }}}

# cloudfoundry/bosh-cli {{{
zinit ice wait'2' lucid as"program" from"gh-r" \
mv"bosh-cli* -> bosh"
zinit light cloudfoundry/bosh-cli
# }}}

# minio/mc {{{
Expand All @@ -307,30 +215,12 @@ zinit ice wait'2' lucid as"program" from:"gh-r" \
zinit light bazelbuild/bazel
# }}}

# screwdriver-cd/sd-local {{{
zinit ice wait'2' lucid as"program" from:"gh-r" \
mv"sd-local_*->sd-local"
zinit light screwdriver-cd/sd-local
# }}}

# denoland/deno_install {{{
zinit ice wait'2' lucid as"program" \
atclone"curl -fsSL https://deno.land/x/install/install.sh | DENO_INSTALL=$ZPFX sh && deno completions zsh > ~/.zsh/Completion/_deno" atpull"%atclone"
zinit light denoland/deno_install
# }}}

# protocolbuffers/protobuf {{{
zinit ice wait'2' lucid as"program" from:"gh-r" \
if'[[ "$(ostype)" == "darwin" ]]' \
bpick:"protoc-*-osx-*.zip" mv"bin/protoc->$ZPFX/bin/protoc"
zinit light protocolbuffers/protobuf
# }}}

# cue-lang/cue {{{
zinit ice wait'2' lucid as"program" from:"gh-r" \
atclone"./cue completion zsh > ~/.zsh/Completion/_cue" atpull"%atclone"
zinit light cue-lang/cue
# }}}

zinit ice wait cdreplay -q
zinit creinstall -Q %HOME/.zsh/Completion 2>&1 >/dev/null
5 changes: 3 additions & 2 deletions .zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ path=( \
/usr/local/bin(N-/) \
~/bin(N-/) \
/usr/sbin(N-/) \
~/.config/anyenv/bin(N-/) \
~/.local/bin(N-/) \
~/.local/share/aquaproj-aqua/bin(N-/) \
~/.local/share/zinit/bin(N-/) \
Expand Down Expand Up @@ -110,13 +109,15 @@ fi
# Config
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export ANYENV_ROOT="${XDG_CONFIG_HOME}/anyenv"

# 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
8 changes: 7 additions & 1 deletion .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ 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
fi

source "${ZINIT_HOME}/zinit.zsh"
source ~/.zsh/zinit.zsh

if (command -v starship > /dev/null) then
if has "starship"; then
eval "$(starship init zsh)"
fi

Expand Down

0 comments on commit 5b76334

Please sign in to comment.