darkrc/shell/alias

68 lines
1.6 KiB
Text

alias bat='batcat --theme="$(bat_theme)"'
alias co='checkout'
alias e="find-edit"
alias fcd="cd \$(find . -type d | fzf)"
alias ff="find_files"
alias getclip='xclip -selection clipboard -o'
alias hello='echo "Hello :)"'
alias hlcat='highlight -O xterm256'
alias ll="ls -lAh"
alias ls="ls --color=auto"
alias ofw='on-file-write'
alias oneko='oneko -speed 20 -fg "#2f2f2f" -cursor 2 -name neko'
alias r='ranger'
alias ranger='source ranger'
alias rf='(f=$(tempfile); $(which ranger) --choosefiles $f; cat $f; rm $f)'
alias ro='(f=$(tempfile); $(which ranger) --choosefiles $f; rifle $(cat $f); rm $f)'
alias rr='$(whereis ranger | cut -d " " -f 2)'
alias sakura='oneko -bg "#ffddee" -sakura -name sakura'
alias setclip='xclip -selection c'
alias tmux='tmux -2'
alias w='watch -t -d -n 1'
alias wmu='wake-me-up'
bat_theme() {
if [ -e $HOME/.dark ]
then echo 'Monokai Extended Bright'
else echo 'Monokai Extended Light'
fi
}
if [ "$TERM_PROGRAM" = "WezTerm" ]
then wezvar() {
name="$1"; shift
value="$*"
printf "\033]1337;SetUserVar=%s=%s\007" "$name" $(echo -n "$value" | base64)
}
fi
pp() {
cd $(find-git-project $HOME/workspace "$@")
}
gfc() {
command="fadd"
unset patch
while test $# != 0
do
case "$1" in
--patch | -p) patch="--patch" ;;
--untracked | -u) command="faddall" ;;
--) shift; break ;;
*) break ;;
esac
shift
done
git $command $patch && git commit $@
}
# Funny
alias please='sudo'
alias qed='[ $RANDOM -ge $((32767 / 100 * 10)) ] && echo Quod Erat Demonstrandum || echo Quo Errat Demonstrator'
alias shit='git'
alias yeet='rm -r'
mcd() {
mkdir -p "$@"
cd "$@"
}