From 0f116481b8e85daf5f1d730d043aa9a9282974ae Mon Sep 17 00:00:00 2001 From: Ein Verne Date: Thu, 30 Jun 2022 20:45:43 +0800 Subject: [PATCH] Update zshrc --- .gitignore | 1 + .zshrc | 53 +++++++++++++++++++--------------- hammerspoon/config-example.lua | 2 -- karabiner/karabiner.edn | 6 ++-- 4 files changed, 34 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index 2bd48b6..14b593a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ karabiner/karabiner.json *.pyc .DS_Store dotfiles.iml +.vscode \ No newline at end of file diff --git a/.zshrc b/.zshrc index 9ba182e..8b14dc7 100644 --- a/.zshrc +++ b/.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 diff --git a/hammerspoon/config-example.lua b/hammerspoon/config-example.lua index 14c25a1..bf7f4aa 100644 --- a/hammerspoon/config-example.lua +++ b/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'}, } diff --git a/karabiner/karabiner.edn b/karabiner/karabiner.edn index cb9bc3e..61f674a 100644 --- a/karabiner/karabiner.edn +++ b/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