Browse Source

Update zshrc

pull/6/head
Ein Verne 2 years ago
parent
commit
0f116481b8
No known key found for this signature in database
GPG Key ID: 926634D64ACAD792
  1. 1
      .gitignore
  2. 53
      .zshrc
  3. 2
      hammerspoon/config-example.lua
  4. 6
      karabiner/karabiner.edn

1
.gitignore vendored

@ -18,3 +18,4 @@ karabiner/karabiner.json
*.pyc
.DS_Store
dotfiles.iml
.vscode

53
.zshrc

@ -31,27 +31,28 @@ zinit light-mode lucid wait for \
# binary release, unpack provide fzf
zinit ice from"gh-r" as"program"
zinit light junegunn/fzf
zinit light Aloxaf/fzf-tab
# zinit ice from"gh-r" as"program" mv"docker* -> docker-compose" bpick"*linux*"
# zinit load docker/compose
zinit ice as"program" from"gh-r" mv"docker-c* -> docker-compose"
zinit light "docker/compose"
zinit load agkozak/zsh-z
# Ref: zdharma/fast-syntax-highlighting
# Note: Use wait 1 second works for kubectl
zinit wait lucid for \
atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \
zdharma-continuum/fast-syntax-highlighting \
atload"zpcdreplay" wait"1" \
OMZP::kubectl \
blockf \
zsh-users/zsh-completions \
atload"!_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions \
as"completion" is-snippet \
https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker \
https://github.com/docker/compose/blob/master/contrib/completion/zsh/_docker-compose
#zinit wait lucid for \
# atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \
# zdharma-continuum/fast-syntax-highlighting \
## atload"zpcdreplay" wait"1" \
# #OMZP::kubectl \
# blockf \
# zsh-users/zsh-completions \
# atload"!_zsh_autosuggest_start" \
# zsh-users/zsh-autosuggestions \
# as"completion" is-snippet \
# https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker \
# https://github.com/docker/compose/blob/master/contrib/completion/zsh/_docker-compose
# 语法高亮
zinit ice lucid wait='0' atinit='zpcompinit'
@ -72,7 +73,7 @@ zinit snippet OMZ::lib/key-bindings.zsh
zinit snippet OMZ::lib/theme-and-appearance.zsh
zinit snippet OMZ::plugins/colored-man-pages/colored-man-pages.plugin.zsh
zinit snippet OMZ::plugins/sudo/sudo.plugin.zsh
zinit snippet OMZ::plugins/git-flow/git-flow.plugin.zsh
#zinit snippet OMZ::plugins/git-flow/git-flow.plugin.zsh
zinit snippet OMZ::plugins/mvn/mvn.plugin.zsh
zinit snippet OMZ::plugins/tmux/tmux.plugin.zsh
zinit snippet OMZ::plugins/tmuxinator/tmuxinator.plugin.zsh
@ -94,16 +95,16 @@ export ASDF_DIR=$HOME/.asdf
# ASDF
if [ -d "$HOME/.asdf" ]; then
# zinit ice wait lucid
# zinit light asdf-vm/asdf
zinit ice wait lucid
zinit light asdf-vm/asdf
# OR
load_asdf() {
. $HOME/.asdf/asdf.sh
}
zinit light-mode wait lucid for \
atload'load_asdf' \
zdharma-continuum/null
# load_asdf() {
# . $HOME/.asdf/asdf.sh
# }
#
# zinit light-mode wait lucid for \
# atload'load_asdf' \
# zdharma-continuum/null
fi
# zinit light denysdovhan/spaceship-prompt
@ -140,6 +141,12 @@ if type brew &>/dev/null; then
fi
fpath=(${ASDF_DIR}/completions $fpath)
autoload -Uz compinit
if [ -d "$HOME/.asdf" ]; then
source $HOME/.asdf/asdf.sh
source $HOME/.asdf/completions/asdf.bash
fi
# if [ $(date +'%j') != $(stat -f '%Sm' -t '%j' ~/.zcompdump) ]; then
# compinit;
# else

2
hammerspoon/config-example.lua

@ -21,7 +21,6 @@ hspoon_list = {
hsapp_list = {
{key = 'a', name = 'Atom'},
{key = 'c', id = 'com.google.Chrome'},
{key = 'd', name = 'ShadowsocksX'},
{key = 'e', name = 'Emacs'},
{key = 'f', name = 'Finder'},
{key = 'i', name = 'iTerm'},
@ -34,7 +33,6 @@ hsapp_list = {
{key = 's', name = 'Safari'},
{key = 't', name = 'Terminal'},
{key = 'v', id = 'com.apple.ActivityMonitor'},
{key = 'w', name = 'Mweb'},
{key = 'y', id = 'com.apple.systempreferences'},
}

6
karabiner/karabiner.edn

@ -458,15 +458,15 @@
[:2 :!C2]
[:3 :!C3]
[:4 :!C4]
[:t [:open "/Applications/iTerm.app"]]
[:b [:open "/Applications/Obsidian.app"]]
[:c [:open "/Applications/Google Chrome.app"]]
[:e [:open "/Applications/Lark.app"]]
[:w [:open "/Applications/WeChat.app"]]
[:g [:open "/Applications/GoldenDict.app"]]
[:t [:open "/Applications/Telegram.app"]]
[:v [:open "/Applications/Visual Studio Code.app"]]
[:j [:open "/Users/einverne/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app"]]
[:t [:open "/Applications/iTerm.app"]]
;[:c [:alfred "search emoji" "com.github.jsumners.alfred-emoji"]]
[:c [:open "/Applications/Google Chrome.app"]]
[:spacebar [:alfred "search PDFs" "nikivi.search.files"]]]}
{:des "capskey (todo + trello)"
:rules [:caps-mode

Loading…
Cancel
Save