Skip to content

Commit

Permalink
afx manages core plugin/command, aqua manages others.
Browse files Browse the repository at this point in the history
  • Loading branch information
cappyzawa committed Oct 28, 2023
1 parent 4d0c00b commit fc5e6f6
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 102 deletions.
21 changes: 21 additions & 0 deletions .config/afx/aqua.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
github:
- 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
alias:
k: kubectl
46 changes: 21 additions & 25 deletions .config/afx/github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,6 @@ github:
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
Expand All @@ -69,13 +51,6 @@ github:
- 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
Expand Down Expand Up @@ -138,6 +113,27 @@ github:
link:
- from: '*/rg'
to: rg
- name: x-motemen/ghq
description: Remote repository management made easy
owner: x-motemen
repo: ghq
release:
name: ghq
tag: v1.4.2
asset:
filename: 'ghq_{{ .OS }}_{{ .Arch }}.zip'
command:
link:
- from: '**/ghq'
snippet: |
if ! [ -d $HOME/ghq ]; then
mkdir -p $HOME/ghq
fi
env:
GOPATH: $HOME/ghq
GOBIN: $GOPATH/bin
GOPRIVATE: "*.yahoo.co.jp"

- name: Rasukarusan/fzf-chrome-active-tab
description: 🐧 Fuzzy search and activate Chrome tab via the terminal.
owner: Rasukarusan
Expand Down
22 changes: 22 additions & 0 deletions .config/afx/zsh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
github:
- 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: zsh-users/zsh-autosuggestions
description: Fish-like autosuggestions for zsh
owner: zsh-users
repo: zsh-autosuggestions
plugin:
sources:
- zsh-autosuggestions.zsh
- name: zdharma-continuum/history-search-multi-word
description: Multi-word history searcher for Zshell
owner: zdharma-continuum
repo: history-search-multi-word
plugin:
sources:
- history-search-multi-word.plugin.zsh
63 changes: 63 additions & 0 deletions .zprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# autoload
autoload -Uz run-help
autoload -Uz add-zsh-hook
autoload -Uz colors && colors
autoload -Uz compinit && compinit -u
autoload -Uz is-at-least
autoload -U +X bashcompinit && bashcompinit

# LANGUAGE must be set by en_US
export LANGUAGE="en_US.UTF-8"
export LANG="${LANGUAGE}"
export LC_ALL="${LANGUAGE}"
export LC_CTYPE="${LANGUAGE}"

# Editor
export EDITOR=vim
export CVSEDITOR="${EDITOR}"
export SVN_EDITOR="${EDITOR}"
export GIT_EDITOR="${EDITOR}"

# Pager
export PAGER=less
# Less status line
export LESS='-R -f -X -i -P ?f%f:(stdin). ?lb%lb?L/%L.. [?eEOF:?pb%pb\%..]'
export LESSCHARSET='utf-8'

# LESS man page colors (makes Man pages more readable).
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[00;44;37m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'

# ls command colors
export LSCOLORS=exfxcxdxbxegedabagacad
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'

export PATH=~/bin:/opt/homebrew/bin:$PATH

# declare the environment variables
export CORRECT_IGNORE='_*'
export CORRECT_IGNORE_FILE='.*'

#export WORDCHARS='*?[]~&;!#$%^(){}<>'
#export WORDCHARS='*?.[]~&;!#$%^(){}<>'
export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'

# History file and its size
export HISTFILE=~/.zsh_history
export HISTSIZE=1000000
export SAVEHIST=1000000
# The size of asking history
export LISTMAX=50
# Do not add in root
if [[ $UID == 0 ]]; then
unset HISTFILE
export SAVEHIST=0
fi

# fzf - command-line fuzzy finder (https://github.com/junegunn/fzf)
export FZF_DEFAULT_OPTS="--extended --ansi --multi"
83 changes: 10 additions & 73 deletions .zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ typeset -gx -U path
path=( \
~/bin(N-/) \
~/.local/share/aquaproj-aqua/bin(N-/) \
~/ghq/bin(N-/) \
/usr/local/bin(N-/) \
/usr/sbin(N-/) \
~/.local/bin(N-/) \
~/.local/share/zinit/bin(N-/) \
~/.tmux/bin(N-/) \
~/.nimble/bin(N-/) \
~/.yarn/bin(N-/) \
Expand All @@ -22,73 +22,20 @@ path=( \
$HOME/.krew/bin(N-/) \
~/.luarocks/bin(N-/) \
~/Library/Application\ Support/Coursier/bin(N-/) \
~/.rd/bin(N-/) \
~/.cargo/bin(N-/) \
~/.rd/bin(N-/) \
"$path[@]" \
)

# autoload
autoload -Uz run-help
autoload -Uz add-zsh-hook
autoload -Uz colors && colors
autoload -Uz compinit && compinit -u
autoload -Uz is-at-least
autoload -U +X bashcompinit && bashcompinit

# LANGUAGE must be set by en_US
export LANGUAGE="en_US.UTF-8"
export LANG="${LANGUAGE}"
export LC_ALL="${LANGUAGE}"
export LC_CTYPE="${LANGUAGE}"

# Editor
export EDITOR=vim
if (command -v nvim > /dev/null); then
export EDITOR=nvim
fi

export CVSEDITOR="${EDITOR}"
export SVN_EDITOR="${EDITOR}"
export GIT_EDITOR="${EDITOR}"

# Pager
export PAGER=less
# Less status line
export LESS='-R -f -X -i -P ?f%f:(stdin). ?lb%lb?L/%L.. [?eEOF:?pb%pb\%..]'
export LESSCHARSET='utf-8'

# LESS man page colors (makes Man pages more readable).
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[00;44;37m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'

setopt no_global_rcs
# Add ~/bin to PATH
export PATH=~/bin:"$PATH"

# Settings for golang
if ! [ -d $HOME/ghq ]; then
mkdir $HOME/ghq
fi
export GOPATH="$HOME/ghq"
export GOBIN="$GOPATH/bin"
export PATH="$GOBIN:$PATH"
export GOENV_DISABLE_GOPATH=1
export GOPRIVATE="*.yahoo.co.jp"

# declare the environment variables
export CORRECT_IGNORE='_*'
export CORRECT_IGNORE_FILE='.*'

export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
export WORDCHARS='*?.[]~&;!#$%^(){}<>'

# Cask
#export HOMEBREW_CASK_OPTS="--appdir=/Applications"
typeset -gx -U fpath
fpath=( \
~/.zsh/Completion(N-/) \
~/.zsh/functions(N-/) \
~/.zsh/plugins/zsh-completions(N-/) \
/usr/local/share/zsh/site-functions(N-/) \
$fpath \
)

# History
# History file
Expand All @@ -108,13 +55,3 @@ fi
# Config
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"

# available $INTERACTIVE_FILTER
export INTERACTIVE_FILTER="fzf:peco:percol:gof:pick"

export DOTPATH=${0:A:h}
# export TERM="screen-256color"
export ZDOTDIR=${HOME}

export ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git/zinit.git"
. "$HOME/.cargo/env"
12 changes: 8 additions & 4 deletions .zshrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
umask 022
limit coredumpsize 0
bindkey -d
autoload -U +X bashcompinit && bashcompinit
autoload -Uz compinit
compinit

autoload -Uz colors
colors

if ! command -v afx &> /dev/null; then
curl -sL https://raw.githubusercontent.com/b4b4r07/afx/HEAD/hack/install | bash
Expand All @@ -10,6 +11,9 @@ fi
source <(afx init)
source <(afx completion zsh)

# word split: `-`, `_`, `.`, `=`
export WORDCHARS='*?[]~&;!#$%^(){}<>'

if [[ -f ~/.zshrc.local ]]; then
source ~/.zshrc.local
fi

0 comments on commit fc5e6f6

Please sign in to comment.