Skip to content

Commit

Permalink
Update config files
Browse files Browse the repository at this point in the history
  • Loading branch information
sankalp-khare committed May 7, 2024
1 parent a0f45e4 commit 6606b49
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .config/topgrade.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
20 changes: 19 additions & 1 deletion .spacemacs-macos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -52,6 +52,7 @@ This function should only modify configuration layer settings."
multiple-cursors
org
php
puppet
python
react
;; (shell :variables
Expand All @@ -60,6 +61,7 @@ This function should only modify configuration layer settings."
;; spell-checking
;; syntax-checking
;; version-control
terraform
treemacs
yaml
)
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
)


Expand Down
28 changes: 16 additions & 12 deletions .zshrc
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"

Expand All @@ -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)"

0 comments on commit 6606b49

Please sign in to comment.