87 lines
2.0 KiB
Plaintext
87 lines
2.0 KiB
Plaintext
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.config/composer/vendor/bin:$PATH"
|
|
export EDITOR="/usr/bin/nvim"
|
|
|
|
# vim
|
|
alias vim="nvim"
|
|
|
|
# ls
|
|
alias ls="ls --color=auto"
|
|
|
|
alias ..="cd .."
|
|
alias ...="cd ../.."
|
|
alias ....="cd ../../.."
|
|
alias .....="cd ../../../.."
|
|
alias ......="cd ../../../../.."
|
|
alias .......="cd ../../../../../.."
|
|
alias ........="cd ../../../../../../.."
|
|
alias .........="cd ../../../../../../../.."
|
|
alias ..........="cd ../../../../../../../../.."
|
|
alias ...........="cd ../../../../../../../../../.."
|
|
alias ............="cd ../../../../../../../../../../.."
|
|
alias .............="cd ../../../../../../../../../../../.."
|
|
alias ..............="cd ../../../../../../../../../../../../.."
|
|
alias ...............="cd ../../../../../../../../../../../../../.."
|
|
alias ................="cd ../../../../../../../../../../../../../../.."
|
|
|
|
# improved reset and clear
|
|
alias reset="tput reset"
|
|
alias clear="tput reset"
|
|
|
|
# better du
|
|
alias du="du -ha"
|
|
|
|
# better feh
|
|
alias feh="feh -."
|
|
|
|
# vi keybindings
|
|
alias info="info --vi-keys"
|
|
alias less="less -R"
|
|
alias sl="ls"
|
|
alias la="ls -a"
|
|
alias venv="source venv/bin/activate"
|
|
|
|
# search functions
|
|
alias grepa="grep -I -n --color=always -r --exclude-dir=venv --exclude-dir=node_modules"
|
|
|
|
# cat
|
|
alias cat="bat -p --paging=never --theme=OneHalfLight"
|
|
|
|
# pipe yd-dlp to mpv
|
|
ytmpv() {
|
|
yt-dlp -q -o - "$1" | mpv -
|
|
}
|
|
|
|
# timeking config
|
|
alias newsboat="timeking '11:00-24:00' && newsboat"
|
|
|
|
goto() {
|
|
open="$(grepa "$@" | fzf --ansi -1)"
|
|
if [ ! -z "$open" ]; then
|
|
file="$(echo "$open" | cut -d: -f1 -)"
|
|
line="$(echo "$open" | cut -d: -f2 -)"
|
|
|
|
vim "$file" -c "cd %:p:h" -c "normal! $line"gg
|
|
fi
|
|
}
|
|
|
|
# NVM - Dynamic loading trick
|
|
alias nvm="load_nvm; nvm"
|
|
alias node="load_nvm; node"
|
|
alias npm="load_nvm; npm"
|
|
alias npx="load_nvm; npx"
|
|
alias create-react-app="load_nvm; create-react-app"
|
|
|
|
export NVM_DIR="$HOME/.nvm"
|
|
load_nvm() {
|
|
if [ -z $NVM_LOADED ]; then
|
|
export NVM_LOADED=1
|
|
unalias nvm
|
|
unalias node
|
|
unalias npm
|
|
unalias npx
|
|
unalias create-react-app
|
|
. "$NVM_DIR/nvm.sh"
|
|
. "$NVM_DIR/bash_completion"
|
|
fi
|
|
}
|