From f405ceb5c8254e1ebd186ce62ee9524b5ac38e65 Mon Sep 17 00:00:00 2001 From: pfych Date: Fri, 16 Aug 2024 22:55:02 +1000 Subject: [PATCH] Update scripts --- .config/scripts/cron/backup-server.sh | 2 +- .zshrc | 75 +-------------------------- 2 files changed, 3 insertions(+), 74 deletions(-) diff --git a/.config/scripts/cron/backup-server.sh b/.config/scripts/cron/backup-server.sh index f9de184..dc99403 100644 --- a/.config/scripts/cron/backup-server.sh +++ b/.config/scripts/cron/backup-server.sh @@ -25,7 +25,7 @@ export B2_ACCOUNT_KEY=$(getSecret "/server/mac-mini-1/b2-account-key") backup /Volumes/Homelab/ \ --verbose=2 \ --json \ - --password-command "getSecret '/server/mac-mini-1/restic-key'" \ + --password-file <(source /Users/noahheague/.config/scripts/util/secret.sh; getSecret '/server/mac-mini-1/restic-key') \ --exclude "40 Programming/Docker/nginx-proxy-manager/data/nginx" \ --exclude "50 BitTorrent" \ --exclude "30 Archival/35 BMS" \ diff --git a/.zshrc b/.zshrc index 8bc7f4e..f70d6e4 100644 --- a/.zshrc +++ b/.zshrc @@ -21,34 +21,9 @@ export CONFIGDIR="${HOME}/.config" export XDG_CONFIG_HOME=$CONFIGDIR export EDITOR=nvim +# oh-my-zsh export ZSH_DIR="$CONFIGDIR/oh-my-zsh" export ZSH_CUSTOM="$ZSH_DIR/custom" - -export TERM=xterm-256color - -# Text colours -export BLACK_TEXT="\033[30m" -export RED_TEXT="\033[31m" -export GREEN_TEXT="\033[32m" -export ORANGE_TEXT="\033[33m" -export BLUE_TEXT="\033[34m" -export MAGENTA_TEXT="\033[35m" -export CYAN_TEXT="\033[36m" -export LIGHT_GREY_TEXT="\033[37m" -export DEFAULT_TEXT="\033[39m" - -# Background colours -export BLACK_BACKGROUND="\033[40m" -export RED_BACKGROUND="\033[41m" -export GREEN_BACKGROUND="\033[42m" -export ORANGE_BACKGROUND="\033[43m" -export BLUE_BACKGROUND="\033[44m" -export MAGENTA_BACKGROUND="\033[45m" -export CYAN_BACKGROUND="\033[46m" -export LIGHT_GREY_BACKGROUND="\033[47m" -export DEFAULT_BACKGROUND="\033[49m" - -# oh-my-zsh export ZSH="$CONFIGDIR/oh-my-zsh" plugins=(git-prompt git) source $ZSH/oh-my-zsh.sh @@ -85,54 +60,8 @@ export SKIP_PREFLIGHT_CHECK=true export FZF_DEFAULT_COMMAND='find . -type d \( -name Pods -o -name .yarn -o -name node_modules -o -name .git -o -path name \) -prune -false -o -name "*"' [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh -# Better dig -source ~/.config/scripts/dig.sh - -# Scratchpad command -source ~/.config/scripts/scratch.sh - -# Encrypt Files -source ~/.config/scripts/encrypt.sh - -# Thumb -source ~/.config/scripts/thumb.sh - -# Compress -source ~/.config/scripts/compress.sh - -# Ripgrep fzf -source ~/.config/scripts/rg_fzf.sh - -# AWS Profile fzf -source ~/.config/scripts/aws-profile.sh - -# Kill commands -source ~/.config/scripts/kill.sh +source ~/.config/scripts/scripts.sh # thefuck eval $(thefuck --alias) alias a=fuck - -# Better Git -function git() { - case $* in - rebase* ) HUSKY_SKIP_HOOKS=1 command git "$@";; - * ) command git "$@" - esac -} -source ~/.config/scripts/git_fzf.sh - -# The next line updates PATH for the Google Cloud SDK. -if [ -f '/Users/noah/Downloads/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/noah/Downloads/google-cloud-sdk/path.zsh.inc'; fi - -# The next line enables shell command completion for gcloud. -if [ -f '/Users/noah/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/noah/Downloads/google-cloud-sdk/completion.zsh.inc'; fi -[ -f "/Users/noah/.ghcup/env" ] && source "/Users/noah/.ghcup/env" # ghcup-env - -# bun completions -[ -s "/Users/noah/.bun/_bun" ] && source "/Users/noah/.bun/_bun" - -# bun -export BUN_INSTALL="$HOME/.bun" -export PATH="$BUN_INSTALL/bin:$PATH" -