dotfiles/shell_common/.config/shell_common/aliases.sh

29 lines
589 B
Bash

# From https://mastodon.xyz/@CarlCravens/105758509287927276
alias clear='clear; tput cup $LINES 0'
alias camoff='sudo modprobe -r uvcvideo' # sudo rmmod -f uvcvideo
alias camon='sudo modprobe uvcvideo'
alias clip="xclip -sel clip"
ahbh(){
git rev-list --left-right --count \
"$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')"..."$(git branch --show-current)"
}
alias pu='git push'
alias st='git st'
foldersize(){
du -sh "$@"
}
tmm(){
if [ -z "$1" ]; then
tmux attach-session -t 0 || tmux
else
tmux attach-session -t "$1" || tmux new-session -t "$1" || tmux
fi
}