Update ZSH configurations
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$(uname -o)" == "Darwin" ]; then
|
||||
case $(uname -s) in
|
||||
"Darwin")
|
||||
export ZSH_HIGHLIGHT_DIR=/opt/homebrew/share/zsh-syntax-highlighting
|
||||
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters
|
||||
fi
|
||||
;;
|
||||
"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() {
|
||||
case ":$PATH:" in
|
||||
*:"$1":*)
|
||||
;;
|
||||
*)
|
||||
PATH="${PATH:+$PATH:}$1"
|
||||
esac
|
||||
}
|
||||
[ -f "$HOME/.ghcup/env" ] && . "$HOME/.ghcup/env"
|
||||
|
||||
appendpath "$GOPATH/bin"
|
||||
appendpath "$HOME/.local/bin"
|
||||
appendpath "$GRAALVM_HOME/bin"
|
||||
appendpath $HOME/.local/share/gem/ruby/3.0.0/bin
|
||||
if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then
|
||||
# Initialize Homebrew
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
unset appendpath
|
||||
|
||||
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
||||
export SDKMAN_DIR="$HOME/.sdkman"
|
||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
if command -v oh-my-posh > /dev/null 2>&1; then
|
||||
# Initialize Oh My Posh
|
||||
eval "$(oh-my-posh init zsh --config "$(brew --prefix oh-my-posh)/themes/peru.omp.json")"
|
||||
fi
|
||||
51
zsh/.zshrc
51
zsh/.zshrc
@@ -4,11 +4,13 @@
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
[[ ! -f ~/.zshenv ]] || source ~/.zshenv
|
||||
|
||||
# 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,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# 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
|
||||
# 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)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(
|
||||
aws
|
||||
azure
|
||||
battery
|
||||
brew
|
||||
colored-man-pages
|
||||
colorize
|
||||
command-not-found
|
||||
dnf
|
||||
docker
|
||||
docker-compose
|
||||
docker-machine
|
||||
gem
|
||||
eza
|
||||
git
|
||||
git-auto-fetch
|
||||
git-extras
|
||||
@@ -88,23 +94,22 @@ plugins=(
|
||||
golang
|
||||
httpie
|
||||
jsontools
|
||||
k9s
|
||||
kitty
|
||||
kubectl
|
||||
lein
|
||||
kubectx
|
||||
macos
|
||||
man
|
||||
minikube
|
||||
mise
|
||||
mvn
|
||||
pep8
|
||||
pip
|
||||
poetry
|
||||
profiles
|
||||
pylint
|
||||
python
|
||||
rake
|
||||
ruby
|
||||
ssh
|
||||
ssh-agent
|
||||
themes
|
||||
tmux
|
||||
web-search
|
||||
zsh-completions
|
||||
zoxide
|
||||
zsh-interactive-cd
|
||||
zsh-navigation-tools
|
||||
)
|
||||
|
||||
@@ -127,8 +132,6 @@ source $ZSH/oh-my-zsh.sh
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
[[ ! -f ~/.zshenv ]] || source ~/.zshenv
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||
@@ -143,24 +146,8 @@ bindkey -e
|
||||
|
||||
fpath=(~/.zsh $fpath)
|
||||
|
||||
unalias run-help
|
||||
autoload run-help
|
||||
autoload -Uz compinit && compinit -u
|
||||
|
||||
source "$ZSH_HIGHLIGHT_DIR/zsh-syntax-highlighting.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
|
||||
source "$ZSH_AUTOSUGGESTIONS_DIR/zsh-autosuggestions.zsh"
|
||||
|
||||
Reference in New Issue
Block a user