diff --git a/.shenanigans.sh b/.shenanigans.sh index ebb27de473add49f95c0a8b9ae4c4c26cd2d22e3..df1cd139e3ded0f85cf2e87046554befa89bdc1b 100755 --- a/.shenanigans.sh +++ b/.shenanigans.sh @@ -2,7 +2,7 @@ # Software list (Void Linux): # void-repo-nonfree void-repo-multilib void-repo-multilib-nonfree # file-roller xfce4-screenshooter xfce4-plugins xsetroot thunar-archive-plugin # clang clang-tools-extra vim stow git curl tmux hstr tree make cmake -# entr ack lazygit newsboat htop mc +# entr ack lazygit newsboat htop mc mpv cifs-utils zip rsync # Only run if the script is being sourced (bashrc). if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then @@ -29,6 +29,7 @@ alias less='less -R' alias tmux='tmux -u' alias server='python3 -m http.server 6969' alias newsboat='newsboat -r -u ~/.feeds.txt' + alias wow='sh ~/Games/turtlewow/wow.sh &' alias ack='ack -S' alias gg='lazygit' @@ -48,8 +49,27 @@ bind '"\e[A": history-search-backward' bind '"\e[B": history-search-forward' export HSTR_CONFIG=hicolor if [[ $- =~ .i. ]]; then bind '"\C-h": "\C-a hstr -- \C-j"'; fi + + # Custom paths. + export PATH="$PATH:$HOME/.local/bin" + export PATH="$PATH:$HOME/go/bin" fi -wow() { - cd ~/Games/turtlewow && ./wow.sh +backup() { + SNAPSHOT=$(date +%Y-%m-%d)-$(whoami)@$(hostname) + mkdir -p /tmp/$SNAPSHOT + + archive_sets=( + "ssh.zip /home/$USER/.ssh" + "bash_history_infinite.zip /home/$USER/.bash_history_infinite" + "projects.zip /home/$USER/Projects" + "twow.zip /home/$USER/Games/turtlewow/WTF /home/$USER/Games/turtlewow/SuperWoWhook.dll /home/$USER/Games/turtlewow/dlls.txt /home/$USER/Games/turtlewow/start.sh" + ) + + for entry in "${archive_sets[@]}"; do + zip -r /tmp/$SNAPSHOT/${entry} -x "**/.venv/*" "**/.git/*" "**/.import/*" "**/.godot/*" "**/.zig-cache/*" "**/node_modules/*" + done + + rsync -azhvpog /tmp/$SNAPSHOT /media/Void/Backup + rm -Rf /tmp/$SNAPSHOT }