Update ZSH configurations
This commit is contained in:
@@ -1,6 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ "$(uname -o)" == "Darwin" ]; then
|
case $(uname -s) in
|
||||||
export ZSH_HIGHLIGHT_DIR=/opt/homebrew/share/zsh-syntax-highlighting
|
"Darwin")
|
||||||
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters
|
export ZSH_HIGHLIGHT_DIR=/opt/homebrew/share/zsh-syntax-highlighting
|
||||||
fi
|
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters
|
||||||
|
;;
|
||||||
|
"Linux")
|
||||||
|
export ZSH_HIGHLIGHT_DIR=/usr/share/zsh-syntax-highlighting
|
||||||
|
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/usr/share/zsh-syntax-highlighting/highlighters
|
||||||
|
export ZSH_AUTOSUGGESTIONS_DIR=/usr/share/zsh-autosuggestions
|
||||||
|
;;
|
||||||
|
esac
|
||||||
44
zsh/.oh-my-zsh/custom/aliases.zsh
Normal file
44
zsh/.oh-my-zsh/custom/aliases.zsh
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# Alias del comando ls
|
||||||
|
alias ls="eza --color=always --group-directories-first --icons"
|
||||||
|
alias ll="eza -l --color=always --group-directories-first --icons"
|
||||||
|
alias la="eza -a --color=always --group-directories-first --icons"
|
||||||
|
alias lt="eza -aT --color=always --group-directories-first --icons"
|
||||||
|
|
||||||
|
# Replace some more things with better alternatives
|
||||||
|
alias cat='bat --style header --style snip --style changes --style header --pager never'
|
||||||
|
|
||||||
|
# Replace df command tool
|
||||||
|
alias df='duf'
|
||||||
|
|
||||||
|
# Replace grep command tool
|
||||||
|
alias grep='ugrep --color=auto'
|
||||||
|
alias egrep='ugrep -E --color=auto'
|
||||||
|
alias fgrep='ugrep -F --color=auto'
|
||||||
|
|
||||||
|
# Alias vari
|
||||||
|
alias paths='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths
|
||||||
|
alias mkdir="mkdir -pv"
|
||||||
|
alias journalctl='sudo journalctl'
|
||||||
|
alias failed='sudo systemctl --failed'
|
||||||
|
alias se='ls /usr/bin | grep'
|
||||||
|
alias du='du -h'
|
||||||
|
alias please='sudo $(fc -ln -1)'
|
||||||
|
alias userlist="cut -d: -f1 /etc/passwd | sort"
|
||||||
|
alias fhere="find . -name "
|
||||||
|
alias free="free -mth"
|
||||||
|
alias ps="ps auxf"
|
||||||
|
alias ip='ip -color'
|
||||||
|
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
|
||||||
|
alias wget="wget -c"
|
||||||
|
alias histg="history | grep"
|
||||||
|
alias myip="curl http://ipecho.net/plain; echo"
|
||||||
|
alias logs="find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f"
|
||||||
|
alias folders='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn'
|
||||||
|
alias vpn-add='nmcli connection import type openvpn file'
|
||||||
|
alias pbcopy='xsel --clipboard --input'
|
||||||
|
alias pbpaste='xsel --clipboard --output'
|
||||||
|
alias stow='stow --dotfiles -d ~/.dotfiles '
|
||||||
|
alias openport='netstat -nape --inet'
|
||||||
|
alias kssh='kitty +kitten ssh'
|
||||||
|
alias lzg=lazygit
|
||||||
|
alias lzd=lazydocker
|
||||||
1565
zsh/.p10k.zsh
1565
zsh/.p10k.zsh
File diff suppressed because it is too large
Load Diff
26
zsh/.zshenv
26
zsh/.zshenv
@@ -1,19 +1,11 @@
|
|||||||
function appendpath() {
|
[ -f "$HOME/.ghcup/env" ] && . "$HOME/.ghcup/env"
|
||||||
case ":$PATH:" in
|
|
||||||
*:"$1":*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
PATH="${PATH:+$PATH:}$1"
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
appendpath "$GOPATH/bin"
|
if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then
|
||||||
appendpath "$HOME/.local/bin"
|
# Initialize Homebrew
|
||||||
appendpath "$GRAALVM_HOME/bin"
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
appendpath $HOME/.local/share/gem/ruby/3.0.0/bin
|
fi
|
||||||
|
|
||||||
unset appendpath
|
if command -v oh-my-posh > /dev/null 2>&1; then
|
||||||
|
# Initialize Oh My Posh
|
||||||
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
eval "$(oh-my-posh init zsh --config "$(brew --prefix oh-my-posh)/themes/peru.omp.json")"
|
||||||
export SDKMAN_DIR="$HOME/.sdkman"
|
fi
|
||||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
|
||||||
51
zsh/.zshrc
51
zsh/.zshrc
@@ -4,11 +4,13 @@
|
|||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
|
[[ ! -f ~/.zshenv ]] || source ~/.zshenv
|
||||||
|
|
||||||
# Set name of the theme to load --- if set to "random", it will
|
# Set name of the theme to load --- if set to "random", it will
|
||||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
# ZSH_THEME="robbyrussell"
|
||||||
|
|
||||||
# Set list of themes to pick from when loading at random
|
# Set list of themes to pick from when loading at random
|
||||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||||
@@ -71,13 +73,17 @@ ZSH_CUSTOM=$ZSH/custom
|
|||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(
|
plugins=(
|
||||||
|
aws
|
||||||
|
azure
|
||||||
|
battery
|
||||||
|
brew
|
||||||
colored-man-pages
|
colored-man-pages
|
||||||
colorize
|
colorize
|
||||||
command-not-found
|
command-not-found
|
||||||
|
dnf
|
||||||
docker
|
docker
|
||||||
docker-compose
|
docker-compose
|
||||||
docker-machine
|
eza
|
||||||
gem
|
|
||||||
git
|
git
|
||||||
git-auto-fetch
|
git-auto-fetch
|
||||||
git-extras
|
git-extras
|
||||||
@@ -88,23 +94,22 @@ plugins=(
|
|||||||
golang
|
golang
|
||||||
httpie
|
httpie
|
||||||
jsontools
|
jsontools
|
||||||
|
k9s
|
||||||
|
kitty
|
||||||
kubectl
|
kubectl
|
||||||
lein
|
kubectx
|
||||||
|
macos
|
||||||
man
|
man
|
||||||
minikube
|
minikube
|
||||||
|
mise
|
||||||
mvn
|
mvn
|
||||||
pep8
|
|
||||||
pip
|
|
||||||
poetry
|
|
||||||
profiles
|
profiles
|
||||||
pylint
|
ssh
|
||||||
python
|
ssh-agent
|
||||||
rake
|
|
||||||
ruby
|
|
||||||
themes
|
themes
|
||||||
tmux
|
tmux
|
||||||
web-search
|
zoxide
|
||||||
zsh-completions
|
zsh-interactive-cd
|
||||||
zsh-navigation-tools
|
zsh-navigation-tools
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -127,8 +132,6 @@ source $ZSH/oh-my-zsh.sh
|
|||||||
# Compilation flags
|
# Compilation flags
|
||||||
# export ARCHFLAGS="-arch x86_64"
|
# export ARCHFLAGS="-arch x86_64"
|
||||||
|
|
||||||
[[ ! -f ~/.zshenv ]] || source ~/.zshenv
|
|
||||||
|
|
||||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||||
@@ -143,24 +146,8 @@ bindkey -e
|
|||||||
|
|
||||||
fpath=(~/.zsh $fpath)
|
fpath=(~/.zsh $fpath)
|
||||||
|
|
||||||
unalias run-help
|
|
||||||
autoload run-help
|
autoload run-help
|
||||||
autoload -Uz compinit && compinit -u
|
autoload -Uz compinit && compinit -u
|
||||||
|
|
||||||
source "$ZSH_HIGHLIGHT_DIR/zsh-syntax-highlighting.zsh"
|
source "$ZSH_HIGHLIGHT_DIR/zsh-syntax-highlighting.zsh"
|
||||||
|
source "$ZSH_AUTOSUGGESTIONS_DIR/zsh-autosuggestions.zsh"
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
||||||
|
|
||||||
source <(kind completion zsh)
|
|
||||||
|
|
||||||
# pyenv configuration
|
|
||||||
eval "$(pyenv init -)"
|
|
||||||
eval "$(pyenv virtualenv-init -)"
|
|
||||||
|
|
||||||
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
|
|
||||||
|
|
||||||
# NVM configuration
|
|
||||||
export NVM_DIR="$HOME/.nvm"
|
|
||||||
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
|
|
||||||
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
|
|
||||||
|
|||||||
Reference in New Issue
Block a user