From 6606b4970099f6e2e3fe1aad99d585c32f78f350 Mon Sep 17 00:00:00 2001 From: Sankalp Khare Date: Tue, 7 May 2024 12:55:59 +0530 Subject: [PATCH] Update config files --- .config/topgrade.toml | 2 +- .spacemacs-macos | 20 +++++++++++++++++++- .zshrc | 28 ++++++++++++++++------------ 3 files changed, 36 insertions(+), 14 deletions(-) diff --git a/.config/topgrade.toml b/.config/topgrade.toml index 2bbe212..66512f1 100644 --- a/.config/topgrade.toml +++ b/.config/topgrade.toml @@ -4,7 +4,7 @@ # Disable specific steps - same options as the command line flag #disable = ["system", "emacs"] -disable = ["gem", "node", "pip3", "gnome_shell_extensions", "vagrant", "ruby_gems", "tlmgr", "helm"] +disable = ["gem", "node", "pip3", "gnome_shell_extensions", "vagrant", "ruby_gems", "tlmgr", "helm", "tldr"] # Ignore failures for these steps #ignore_failures = ["powershell"] diff --git a/.spacemacs-macos b/.spacemacs-macos index b755150..037354b 100644 --- a/.spacemacs-macos +++ b/.spacemacs-macos @@ -38,9 +38,9 @@ This function should only modify configuration layer settings." ;; Uncomment some layer names and press `SPC f e R' (Vim style) or ;; `M-m f e R' (Emacs style) to install them. ;; ---------------------------------------------------------------- - ansible ;; auto-completion ;; better-defaults + docker emacs-lisp git (go :variables @@ -52,6 +52,7 @@ This function should only modify configuration layer settings." multiple-cursors org php + puppet python react ;; (shell :variables @@ -60,6 +61,7 @@ This function should only modify configuration layer settings." ;; spell-checking ;; syntax-checking ;; version-control + terraform treemacs yaml ) @@ -346,6 +348,10 @@ It should only modify the values of Spacemacs settings." ;; Which-key frame position. Possible values are `right', `bottom' and ;; `right-then-bottom'. right-then-bottom tries to display the frame to the ;; right; if there is insufficient space it displays it at the bottom. + ;; It is also possible to use a posframe with the following cons cell + ;; `(posframe . position)' where position can be one of `center', + ;; `top-center', `bottom-center', `top-left-corner', `top-right-corner', + ;; `top-right-corner', `bottom-left-corner' or `bottom-right-corner' ;; (default 'bottom) dotspacemacs-which-key-position 'bottom @@ -625,6 +631,18 @@ before packages are loaded." ;; show a vertical bar to indicate the indent level in certain modes (add-hook 'python-mode-hook 'highlight-indentation-current-column-mode) (add-hook 'yaml-mode-hook 'highlight-indentation-current-column-mode) + + ;; https://www.masteringemacs.org/article/whats-new-in-emacs-29-1 + ;; really useful when blocks span more than the visible area + (setq show-paren-context-when-offscreen 'overlay) + + ;; proced is emacs' built-in thing for listing/interacting with running processes + ;; https://www.masteringemacs.org/article/displaying-interacting-processes-proced + (setq proced-enable-color-flag t) + + ;; auto-insert closing bracket + ;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Matching.html + ;; (setq electric-pair-mode t) ) diff --git a/.zshrc b/.zshrc index b64965d..d3a1ecb 100644 --- a/.zshrc +++ b/.zshrc @@ -1,15 +1,5 @@ - eval "$(starship init zsh)" -# coloured manpages -export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking -export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold -export LESS_TERMCAP_me=$'\E[0m' # end mode -export LESS_TERMCAP_se=$'\E[0m' # end standout-mode -export LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box -export LESS_TERMCAP_ue=$'\E[0m' # end underline -export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline - # history-related settings for zsh # src: https://www.soberkoder.com/better-zsh-history/ # ref: https://zsh.sourceforge.io/Doc/Release/Options.html @@ -55,7 +45,7 @@ function gurlo { } # imports -source /opt/homebrew/Cellar/git-extras/7.1.0/share/git-extras/git-extras-completion.zsh +source /opt/homebrew/Cellar/git-extras/7.2.0/share/git-extras/git-extras-completion.zsh test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" @@ -65,5 +55,19 @@ alias k='kubectl' alias kc='kubectx' alias kn='kubens' +# faster than the ketall plugin. stolen from a colleague who I won't name without checking with them first +function kga { + namespaced_resources() { + kubectl api-resources --cached --namespaced --verbs get --no-headers -o name | + grep -E -v '^events(\.events\.k8s\.io)?$' | grep -E -v 'externalmetrics' + } + kubectl get $(namespaced_resources | sort | paste -sd ,) "$@" 2> >(grep -v '^Error from server (Forbidden):' >&2) +} + # prevent the vi editor problem described at https://github.com/kubernetes/website/issues/674 -export KUBE_EDITOR=vim +export KUBE_EDITOR=emacsclient + +# use bat to show pretty man pages +export MANPAGER="sh -c 'col -bx | bat -l man -p'" + +eval "$(zoxide init zsh)"