Zsh files
This commit is contained in:
parent
e03506c384
commit
5ad7c5e898
56
.zsh_aliases
Normal file
56
.zsh_aliases
Normal file
@ -0,0 +1,56 @@
|
||||
# Aliases
|
||||
alias c="clear"
|
||||
|
||||
alias vi="nvim"
|
||||
alias vim="nvim"
|
||||
|
||||
alias ls="eza --icons"
|
||||
alias la="eza --icons -a"
|
||||
alias ll="eza --icons -la"
|
||||
|
||||
alias grep="grep --color=auto"
|
||||
|
||||
alias update="sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean"
|
||||
|
||||
# Navigation
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
alias ~="cd ~"
|
||||
alias back="cd -"
|
||||
|
||||
# File Management
|
||||
alias rm="rm -i"
|
||||
alias cp="cp -i"
|
||||
alias mv="mv -i"
|
||||
alias mkcd='foo() { mkdir -p "$1"; cd "$1"; }; foo'
|
||||
|
||||
# Storage
|
||||
alias dfh="df -h" # Disk Free in Human Readable format
|
||||
alias duh="du -h --max-depth=1" # Disk Usage in Human Readable format
|
||||
|
||||
# System
|
||||
alias top="btop"
|
||||
alias cpu="lscpu"
|
||||
|
||||
# Network
|
||||
alias ip="ip -c" # IP command with colorized output
|
||||
alias ports="netstat -tulanp" # List all listening ports
|
||||
alias myip="curl ifconfig.me" # Get public IP address
|
||||
alias pingg="ping google.com" # Network Testing
|
||||
|
||||
# Docker
|
||||
alias dps="docker ps" # Docker PS
|
||||
alias dpsa="docker ps -a" # Docker PS All
|
||||
alias drm="docker rm $(docker ps -a -q)" # Docker Remove All Stopped Containers
|
||||
alias dclean="docker system prune -af" # Docker Clean All
|
||||
|
||||
dockcup() { # Docker Compose Up
|
||||
local file="${1:-docker-compose.yaml}" # Default to docker-compose.yaml if no argument is given
|
||||
docker compose -f "$file" up -d
|
||||
}
|
||||
|
||||
dockcdown() { # Docker Compose Down
|
||||
local file="${1:-docker-compose.yaml}" # Default to docker-compose.yaml if no argument is given
|
||||
docker compose -f "$file" down
|
||||
}
|
||||
58
.zshrc
Normal file
58
.zshrc
Normal file
@ -0,0 +1,58 @@
|
||||
# Path to your Oh My Zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
PROMPT="%B%~%b :: "
|
||||
RPROMPT="%n@%m"
|
||||
|
||||
# Plugins
|
||||
plugins=(
|
||||
git
|
||||
zsh-syntax-highlighting
|
||||
zsh-autosuggestions
|
||||
)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Add to PATH
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
|
||||
# GVM
|
||||
[[ -s "/home/mangopig/.gvm/scripts/gvm" ]] && source "/home/mangopig/.gvm/scripts/gvm"
|
||||
|
||||
# Golang
|
||||
# Ensure Go binary is in PATH
|
||||
export GOROOT=/usr/local/go
|
||||
export GOPATH=$HOME/Programming/go
|
||||
export GOBIN=$GOPATH/bin
|
||||
|
||||
# Set PATH correctly
|
||||
export PATH=$GOROOT/bin:$GOBIN:$GOPATH/bin:$PATH
|
||||
|
||||
# NVM
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
||||
|
||||
# Zoxide
|
||||
eval "$(zoxide init --cmd cd zsh)"
|
||||
|
||||
# Source the aliases file
|
||||
source ~/.zsh_aliases
|
||||
|
||||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('/home/mangopig/Programming/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "/home/mangopig/Programming/miniconda3/etc/profile.d/conda.sh" ]; then
|
||||
. "/home/mangopig/Programming/miniconda3/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="/home/mangopig/Programming/miniconda3/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user