rice

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit ac24d0e177a8678b6f4739424d62ff5ae6e2d85f
parent 40b8c553f9d733f7aa66a4ebacfdf705bcd92b05
Author: Mark Feller <mjfeller1992@gmail.com>
Date:   Mon, 25 May 2020 09:45:32 -0600

misc config

Diffstat:
Mdots/.config/alacritty/alacritty.yml | 5++---
Mdots/.config/git/config | 16++++++----------
Mdots/.config/ncmpcpp/config | 2+-
Mdots/.config/zsh/.zshrc | 23++++++++++++++---------
Mdots/.config/zsh/gcloud.zsh | 21+++++++++++++++++----
Mdots/.config/zsh/kubernetes.zsh | 7++-----
6 files changed, 42 insertions(+), 32 deletions(-)

diff --git a/dots/.config/alacritty/alacritty.yml b/dots/.config/alacritty/alacritty.yml @@ -29,8 +29,7 @@ window: # Window decorations # Setting this to false will result in window without borders and title bar. - #decorations: transparent - decorations: none + decorations: transparent # Display tabs using this many cells (changes require restart) tabspaces: 8 @@ -201,7 +200,7 @@ selection: dynamic_title: true -hide_cursor_when_typing: true +hide_cursor_when_typing: false # Style of the cursor # diff --git a/dots/.config/git/config b/dots/.config/git/config @@ -1,22 +1,18 @@ [user] name = Mark Feller - email = mfeller@recurly.com - signingkey = BF5DA997A2A9913EB2B453C56A84C7868F1E023F + email = mjfeller1992@gmail.com + signingkey = D1895EF4221D0862624FA97AED1A8A284EED7C47 -[core] - hooksPath = ~/.config/git/hooks +#[core] +# hooksPath = ~/.config/git/hooks [url "ssh://git@github.com/"] insteadOf = https://github.com/ -[url "ssh://git@gitlab.com/"] - insteadOf = https://gitlab.com/ - -[url "ssh://git@bitbucket.org/"] - insteadOf = https://bitbucket.org/ - [commit] gpgsign = true [gpg] program = gpg +[diff "sopsdiffer"] + textconv = sops -d diff --git a/dots/.config/ncmpcpp/config b/dots/.config/ncmpcpp/config @@ -58,4 +58,4 @@ visualizer_sync_interval = "30" visualizer_look = "∙▋" visualizer_in_stereo = "yes" -execute_on_song_change = "$HOME/.local/bin/notify-mpd" +#execute_on_song_change = "$HOME/.local/bin/notify-mpd" diff --git a/dots/.config/zsh/.zshrc b/dots/.config/zsh/.zshrc @@ -1,26 +1,31 @@ source $HOME/.config/oh-my-zsh/oh-my-zsh.sh source $HOME/.config/zsh/fzf.zsh source $HOME/.config/zsh/kubernetes.zsh -source $HOME/.config/zsh/recurly.zsh +source $HOME/.config/zsh/terraform.zsh source $HOME/.config/zsh/gcloud.zsh -source $HOME/.config/zsh/private.zsh source $HOME/.config/aliases # oh my zsh plugins plugins=( - colored-man-pages - compleat - git + colored-man-pages + compleat + git ) # setup prompt git_prompt() { ref=$(git_current_branch) - if [ ! -z "$ref" ]; then - echo "%F{cyan}$ref%f " - fi + [ -z "$ref" ] || echo "%F{cyan}$ref%f " +} +kube_prompt() { + ctx=$(kubectl config current-context 2> /dev/null) + [ -z "$ctx" ] || echo "%F{green}$ctx%f " +} +PROMPT='%F{241}λ %2~%f $(kube_prompt)$(git_prompt)%B%F{241}»%b%f ' + +toggle_kube_promt() { + PROMPT='%F{241}λ %2~%f $(git_prompt)%B%F{241}»%b%f ' } -PROMPT='%F{241}λ %2~%f $(git_prompt)%B%F{241}»%b%f ' # history in cache directory HISTSIZE=10000 diff --git a/dots/.config/zsh/gcloud.zsh b/dots/.config/zsh/gcloud.zsh @@ -1,6 +1,19 @@ export GCLOUD_SDK="$HOME/prog/google-cloud-sdk" -# The next line updates PATH for the Google Cloud SDK. -if [ -f '/Users/mfeller/prog/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/mfeller/prog/google-cloud-sdk/path.zsh.inc'; fi -# The next line enables shell command completion for gcloud. -if [ -f '/Users/mfeller/prog/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/mfeller/prog/google-cloud-sdk/completion.zsh.inc'; fi +[ -f "$GCLOUD_SDK/path.zsh.inc" ] && source "$GCLOUD_SDK/path.zsh.inc" +[ -f "$GCLOUD_SDK/completion.zsh.inc" ] && source "$GCLOUD_SDK/completion.zsh.inc" + +gac() { + cfg=$(gcloud config configurations list | awk 'NR!=-1 { print $1 }' | fzf -e) + [ -z "$cfg" ] || gcloud config configurations activate $cfg +} + +gssh() { + instance=$(gcloud compute instances list | awk '/^gke/ { print $1 }' | sort | fzf) + [ -z "$instance" ] || gcloud compute ssh $instance +} + +gsp() { + project=$(gcloud projects list | awk 'NR!=1 { print $1 }' | sort | fzf) + [ -z "$project" ] || gcloud config set project $project +} diff --git a/dots/.config/zsh/kubernetes.zsh b/dots/.config/zsh/kubernetes.zsh @@ -1,8 +1,9 @@ alias k="kubectl" -alias kc="kubectl" alias kd="kubectl describe" alias kpw="kubectl get pods --watch" +[ -f "$HOME.kube/completion.zsh.inc" ] && source "$HOME.kube/completion.zsh.inc" + pod() { kubectl get pods -l app.kubernetes.io/name=$1 -o json | jq -r '.items[0].metadata.name' } @@ -15,7 +16,3 @@ kcc() { authn() { istioctl authn -n qa5 tls-check $(pod recurly-app-web) | rg "HOST|qa5" --color=never } - -# kt() { -# ktail -t '$BOLD$LIGHT_CYAN{{ .Container.Name }}$NONE $DIM{{ .Pod.Name }}$NONE $YELLOW{{ if .Timestamp }}{{ .Timestamp.Format \"2006-01-02T15:04:05.999999999Z07:00\" }}{{ end }}$NONE {{ .Message }}' -# }