From 0cd1c2011b146927bf8383039109b2749ec4f73a Mon Sep 17 00:00:00 2001 From: Raine Date: Sun, 19 Nov 2023 01:07:02 +0100 Subject: [PATCH] fix: add more zsh stuff --- crates/10-zsh/files/.zshrc | 39 ++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/crates/10-zsh/files/.zshrc b/crates/10-zsh/files/.zshrc index 8ba260d..1334f5c 100644 --- a/crates/10-zsh/files/.zshrc +++ b/crates/10-zsh/files/.zshrc @@ -1,32 +1,35 @@ #!/bin/zsh -# Raine's .zshrc +# Raine's .zshrc +export EDITOR=vim export GPG_TTY=$(tty) export PATH="$PATH:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$HOME/.local/bin" -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 - -# ALIASES -alias open="xdg-open" -alias s="title $HOST && cmatrix -rs && clear" -alias q="exit" +# 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 :(" + PS1="$(whoami)@$(hostname) $ " +fi update_dotfiles() { cd $HOME/.dotfiles git pull cd - &> /dev/null } -alias udf="update_dotfiles" -function 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)}" +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)}" } + +alias q="exit" \ No newline at end of file