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 *.pyc
.DS_Store .DS_Store
dotfiles.iml dotfiles.iml
.vscode

53
.zshrc

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

2
hammerspoon/config-example.lua

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

6
karabiner/karabiner.edn

@ -458,15 +458,15 @@
[:2 :!C2] [:2 :!C2]
[:3 :!C3] [:3 :!C3]
[:4 :!C4] [:4 :!C4]
[:t [:open "/Applications/iTerm.app"]]
[:b [:open "/Applications/Obsidian.app"]] [:b [:open "/Applications/Obsidian.app"]]
[:c [:open "/Applications/Google Chrome.app"]]
[:e [:open "/Applications/Lark.app"]] [:e [:open "/Applications/Lark.app"]]
[:w [:open "/Applications/WeChat.app"]] [:w [:open "/Applications/WeChat.app"]]
[:g [:open "/Applications/GoldenDict.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"]] [: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 [:alfred "search emoji" "com.github.jsumners.alfred-emoji"]]
[:c [:open "/Applications/Google Chrome.app"]]
[:spacebar [:alfred "search PDFs" "nikivi.search.files"]]]} [:spacebar [:alfred "search PDFs" "nikivi.search.files"]]]}
{:des "capskey (todo + trello)" {:des "capskey (todo + trello)"
:rules [:caps-mode :rules [:caps-mode

Loading…
Cancel
Save