dotfiles/crates/10-zsh/files/.zshrc

46 lines
990 B
Bash
Raw Normal View History

2023-11-19 01:03:45 +01:00
#!/bin/zsh
2023-10-14 22:38:12 +02:00
2023-11-19 01:07:02 +01:00
# Raine's .zshrc
2023-10-14 22:38:12 +02:00
2023-11-19 01:07:02 +01:00
export EDITOR=vim
2023-11-19 01:03:45 +01:00
export GPG_TTY=$(tty)
export PATH="$PATH:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$HOME/.local/bin"
2023-10-14 22:38:12 +02:00
2023-11-19 01:07:02 +01:00
# oh-my-zsh init
if [ -f "$HOME/.oh-my-zsh/oh-my-zsh.sh" ]; then
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="afowler"
plugins=(git docker docker-compose node zsh-autosuggestions zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
else
echo "oh-my-zsh not detected :("
2023-11-19 01:18:33 +01:00
PS1="$(whoami)@${HOSTNAME:-$(hostname)} $ "
2023-11-19 01:07:02 +01:00
fi
2023-10-14 22:38:12 +02:00
2023-10-14 22:38:14 +02:00
update_dotfiles() {
cd $HOME/.dotfiles
git pull
cd - &> /dev/null
}
2023-11-19 01:07:02 +01:00
share_cdn() {
if ! [ -f "$1" ]; then
echo "file needs to exist"
return 1
fi
scp $1 keymaker:/usr/share/cdn/random/$2 > /dev/null
echo "https://cdn.ixvd.net/random/${2:-$(basename $1)}"
2023-11-16 15:43:34 +01:00
}
2023-11-19 01:07:02 +01:00
2023-11-19 01:19:47 +01:00
container() {
docker run \
-ti \
--rm \
--name tmp-$(id -u)-$(openssl rand -hex 8) \
2023-11-19 01:21:13 +01:00
--network ${CONTAINER_NETWORK:-internal} \
2023-11-19 01:19:47 +01:00
alpine \
ash
}
2023-11-19 15:42:05 +01:00
alias q="exit"
alias vim="nvim"