mirror of
https://github.com/JanJastrow/.dotfiles.git
synced 2024-12-22 06:51:54 +01:00
80 lines
1.9 KiB
Plaintext
80 lines
1.9 KiB
Plaintext
#--------------------------------
|
|
# filename: /zsh/alias
|
|
#--------------------------------
|
|
|
|
# Update tools/OS aliases
|
|
if [[ -x $(which brew) ]]; then
|
|
alias brewupdate='brew update; brew upgrade; brew upgrade --cask; brew cleanup'
|
|
fi
|
|
|
|
if [[ -x $(which apt) ]]; then
|
|
alias aptupdate='sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt clean'
|
|
fi
|
|
|
|
# tmux
|
|
alias tm='tmux -u new -A -s default'
|
|
|
|
# screen reconnect/init
|
|
alias sc='screen -R'
|
|
|
|
# For fun
|
|
alias fucking='sudo'
|
|
alias please='sudo'
|
|
|
|
# clear
|
|
alias c='clear'
|
|
alias cl='clear && ll'
|
|
|
|
# aria2c
|
|
alias a2='aria2c --continue --max-connection-per-server=5 --max-tries=3 --timeout=20 --connect-timeout=20'
|
|
|
|
# youtube-dl / yt-dlp
|
|
if [[ -x $(which yt-dlp) ]]; then
|
|
alias ydl='yt-dlp'
|
|
elif [[ -x $(which youtube-dl) ]]; then
|
|
alias ydl='youtube-dl'
|
|
fi
|
|
|
|
# youtube-dl(p) - Download only best MP4
|
|
alias ytmp4='ydl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4"'
|
|
|
|
# better scp
|
|
alias bcp='rsync -avzuh --progress --partial'
|
|
|
|
# generate pseudo-random hash
|
|
alias random32='echo $(date +%s | md5sum | head -c 32)'
|
|
|
|
# tar extract
|
|
alias untargz='tar -xzvf'
|
|
|
|
# (macOS) start Firefox Profile manager
|
|
if [[ -x '/Applications/Firefox.app/Contents/MacOS/firefox-bin' ]]; then
|
|
alias firefox-pm='/Applications/Firefox.app/Contents/MacOS/firefox-bin -P'
|
|
fi
|
|
|
|
# zspotify (Docker)
|
|
alias zspotify='docker run -v ${HOME}/.zspotify:/root/.zspotify -v ${HOME}/Music:/root/Music -it jsavargas/zspotify'
|
|
|
|
# git
|
|
alias gadd='git add'
|
|
alias gclone='git clone'
|
|
alias gpull='git pull'
|
|
alias gpush='git push'
|
|
alias gcommit='git commit -m'
|
|
|
|
# docker
|
|
alias dcdu='docker compose down && docker compose up -d'
|
|
|
|
# linux stuff
|
|
alias journ='journalctl -xfe -t'
|
|
|
|
# own this dir (+subs)
|
|
alias makeitmine='sudo chown -R $(whoami) ./'
|
|
|
|
# ---
|
|
# .dotfiles
|
|
|
|
alias dotfiles='cd ~/.dotfiles'
|
|
alias dotfu='cd ~/.dotfiles; git pull; cd -; source ~/.zshrc'
|
|
alias reload-zsh='source ~/.zshrc'
|