From 2f9f31a4e24b7364a9df02ebbe572fc64b552cc5 Mon Sep 17 00:00:00 2001 From: jay Date: Wed, 30 Mar 2022 23:11:39 +0800 Subject: [PATCH] update --- alacritty/alacritty.yml | 30 ++++++++++++++++++++++++++++-- tmux | 3 --- zprofile | 14 +++++++++++--- zsh/30_alias.zsh | 6 ++++++ zsh/50_setopt.zsh | 2 +- zshrc_zinit | 9 ++++++--- 6 files changed, 52 insertions(+), 12 deletions(-) diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index 95cac42..f5a5ebc 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -150,7 +150,7 @@ font: #style: Bold Italic # Point size - size: 10.0 + size: 12.0 # Offset is the extra space around each character. `offset.y` can be thought # of as modifying the line spacing, and `offset.x` as modifying the letter @@ -719,7 +719,33 @@ live_config_reload: true # # If the same trigger is assigned to multiple actions, all of them are executed # in the order they were defined in. -#key_bindings: +# key_bindings: +# - { key: A, mods: Alt, chars: '\x1ba' } +# - { key: B, mods: Alt, chars: '\x1bb' } +# - { key: C, mods: Alt, chars: '\x1bc' } +# - { key: D, mods: Alt, chars: '\x1bd' } +# - { key: E, mods: Alt, chars: '\x1be' } +# - { key: F, mods: Alt, chars: '\x1bf' } +# - { key: G, mods: Alt, chars: '\x1bg' } +# - { key: H, mods: Alt, chars: '\x1bh' } +# - { key: I, mods: Alt, chars: '\x1bi' } +# - { key: J, mods: Alt, chars: '\x1bj' } +# - { key: K, mods: Alt, chars: '\x1bk' } +# - { key: L, mods: Alt, chars: '\x1bl' } +# - { key: M, mods: Alt, chars: '\x1bm' } +# - { key: N, mods: Alt, chars: '\x1bn' } +# - { key: O, mods: Alt, chars: '\x1bo' } +# - { key: P, mods: Alt, chars: '\x1bp' } +# - { key: Q, mods: Alt, chars: '\x1bq' } +# - { key: R, mods: Alt, chars: '\x1br' } +# - { key: S, mods: Alt, chars: '\x1bs' } +# - { key: T, mods: Alt, chars: '\x1bt' } +# - { key: U, mods: Alt, chars: '\x1bu' } +# - { key: V, mods: Alt, chars: '\x1bv' } +# - { key: W, mods: Alt, chars: '\x1bw' } +# - { key: X, mods: Alt, chars: '\x1bx' } +# - { key: Y, mods: Alt, chars: '\x1by' } +# - { key: Z, mods: Alt, chars: '\x1bz' } #- { key: Paste, action: Paste } #- { key: Copy, action: Copy } #- { key: L, mods: Control, action: ClearLogNotice } diff --git a/tmux b/tmux index 295472c..e5c876f 100644 --- a/tmux +++ b/tmux @@ -18,9 +18,6 @@ set -g bell-action any # start window indexing at 1 window so the 1 is easier to reach set -g base-index 1 -# tell tmux to use 256 colour terminal -set -g default-terminal "screen-256color" - # xterm-style function key sequences setw -g xterm-keys on diff --git a/zprofile b/zprofile index 308c4d3..07ef9f9 100644 --- a/zprofile +++ b/zprofile @@ -22,13 +22,21 @@ else start_agent; fi +function envf { + if [ ! -f "$1" ]; then + echo "File $1 does not exist" + exit 1 + fi + + export $(cat $1 | grep -v '^#' | xargs) +} + export HISTORY_SUBSTRING_SEARCH_PREFIXED=1 -export FLUTTER_ROOT="$HOME/apps/flutter" export GOPATH="$HOME/go" export GOROOT="$HOME/apps/go" export NODE_ROOT="$HOME/apps/node" -export PATH="$GOPATH/bin:$GOROOT/bin:$NODE_ROOT/bin:$FLUTTER_ROOT/bin:$PATH" +export PATH="$GOPATH/bin:$GOROOT/bin:$NODE_ROOT/bin:${KREW_ROOT:-$HOME/.krew}/bin:$PATH" if [ -f "$HOME/.cargo/env" ]; then . "$HOME/.cargo/env" @@ -42,4 +50,4 @@ fi if [ -f '/Users/jay/apps/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/jay/apps/google-cloud-sdk/path.zsh.inc'; fi # The next line enables shell command completion for gcloud. -if [ -f '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc'; fi +# if [ -f '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc'; fi diff --git a/zsh/30_alias.zsh b/zsh/30_alias.zsh index c300b70..15fdeb5 100644 --- a/zsh/30_alias.zsh +++ b/zsh/30_alias.zsh @@ -1,3 +1,9 @@ alias k="kubectl" alias nv="nvim" alias ls="ls --color=auto" + +# alias docker="lima nerdctl" +# alias ds="lima sudo nerdctl" + +alias wgup="sudo wg-quick up" +alias wgdown="sudo wg-quick down" diff --git a/zsh/50_setopt.zsh b/zsh/50_setopt.zsh index 6e32d27..ff76434 100644 --- a/zsh/50_setopt.zsh +++ b/zsh/50_setopt.zsh @@ -147,7 +147,7 @@ setopt hist_verify setopt bang_hist setopt always_last_prompt -setopt auto_cd +# setopt auto_cd setopt auto_menu setopt auto_param_keys setopt auto_param_slash diff --git a/zshrc_zinit b/zshrc_zinit index d38eaf5..94072e4 100644 --- a/zshrc_zinit +++ b/zshrc_zinit @@ -8,10 +8,10 @@ source ~/.zinit/bin/zinit.zsh zinit light zsh-users/zsh-completions zinit light zsh-users/zsh-autosuggestions -zinit light zdharma-continuum/fast-syntax-highlighting -zinit light zsh-users/zsh-completions zinit light mattbangert/kubectl-zsh-plugin +zinit light zdharma-continuum/fast-syntax-highlighting + zinit light zsh-users/zsh-history-substring-search # OhMyZSH Plugs @@ -21,8 +21,9 @@ zinit snippet OMZ::lib/theme-and-appearance.zsh zinit ice as="completion" zinit snippet OMZ::plugins/docker/_docker zinit snippet OMZP::composer +zinit snippet OMZP::aws zinit snippet OMZ::plugins/sudo/sudo.plugin.zsh -zinit snippet OMZ::plugins/kubectl/kubectl.plugin.zsh +zinit snippet OMZP::kubectl zinit ice lucid wait='1' zinit snippet OMZ::plugins/git/git.plugin.zsh @@ -41,3 +42,5 @@ zinit light "tinyRatP/ys" [ -f "$HOME/.zprofile" ] && source "$HOME/.zprofile" # vim: set ft=zsh: + +# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh