commit f7fd3f137c7a5b886020c1e2133d716c65dbd329
parent 8ef718785a78f7da4819a28fb16c87797c6a2796
Author: andrew.laack <andrew.laack@imbue.com>
Date: Thu, 4 Sep 2025 02:38:15 -0500
Added rsync command and updated installation script
Diffstat:
3 files changed, 65 insertions(+), 7 deletions(-)
diff --git a/backupHelper.sh b/backupHelper.sh
@@ -20,10 +20,10 @@ if [ $? -eq 0 ]; then
du -s /home/serverBackup
echo "=== COMPLETED SUCCESSFULLY ==="
echo "Backup Success ($(date '+%Y-%m-%d %H:%M'))" > "/home/andrew/logs/backup-status.log"
- #notify-send -t 5000 "SYNC SUCCEEDED"
+ notify-send -t 5000 "SYNC SUCCEEDED"
else
echo "=== RSYNC FAILED ==="
echo "Backup Failed - ($(date '+%Y-%m-%d %H:%M'))" > "/home/andrew/logs/backup-status.log"
- #notify-send -u critical -t 5000 "ERROR - SYNC FAILED"
+ notify-send -u critical -t 5000 "ERROR - SYNC FAILED"
fi
diff --git a/installers/arch-install.sh b/installers/arch-install.sh
@@ -13,10 +13,10 @@ sudo pacman -Sy cron
sudo pacman -Sy ocaml # for installing unison
sudo pacman -Sy arandr
sudo pacman -Sy torbrowser-launcher
-sudo pacman -Sy zenity # needed for me to make browser work
git clone ssh://brgr/home/shared/git/public-repos/dotfiles.git
mv dotfiles .config
+rm .xinitrc
ln .config/xinitrc .xinitrc
sudo pacman -Sy ttf-fira-code
@@ -25,6 +25,8 @@ sudo pacman -Sy pulseaudio
sudo pacman -Sy rsync
sudo pacman -Sy flameshot
sudo pacman -Sy yt-dlp
+sudo pacman -S notify-send
+sudo pacman -S dunst
# DRAGON
@@ -49,10 +51,10 @@ make
sudo make install
cd
source ~/.bashrc
-
mkdir syncing
unison syncing ssh://brgr//home/shared/fileSharing/syncing -auto -batch
+
## DWM
cd gitRepos
@@ -61,9 +63,8 @@ cd dwm
sudo make install
cd ..
-## I3WM (this is set as the default current in xinitrc)
-
-sudo pacman -Sy i3
+## I3WM
+# sudo pacman -Sy i3
git clone ssh://brgr/home/shared/git/public-repos/st.git
@@ -127,6 +128,20 @@ yay -S librewolf-bin
# sudo make install
# cd
+## RSYNC (directory sync)
+# This is used to ensure I have a synchronized directory (~/syncing) with my server
+# and across my machines.
+
+#cd
+#mkdir syncing
+#mkdir logs
+#~/bin/rsync.sh
+#~/bin/backup.sh
+#cd
+
+
+
+
git config --global user.email "andrew@laack.co"
git config --global user.name "Andrew Laack"
diff --git a/rsync.sh b/rsync.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+OPTIONS="push\npull"
+
+if [ $# -eq 0 ]
+then
+ SELECTION=$(echo -e $OPTIONS| fzf)
+else
+ background=$1
+ foreground=$2
+ highlight=$3
+
+ prompt="rsync:"
+
+ dmenu_cmd="dmenu -l 15 -i -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
+ SELECTION=$(echo -e $OPTIONS | eval "$dmenu_cmd" "$@")
+
+fi
+
+
+
+if [ $SELECTION = "pull" ]; then
+ echo "==== PULLING ====" >> ~/logs/sync.log
+ date >> ~/logs/sync.log
+ if rsync -vrph --stats andrew@brgr:/home/shared/fileSharing/syncing ~/ >> ~/logs/sync.log; then
+ echo "==== PULL COMPLETED ====" >> ~/logs/sync.log
+ notify-send "Pull Succeeded!"
+ else
+ notify-send -u "critical" "Pull Failed! See ~/logs/sync.log"
+ echo "==== PULL FAILED ====" >> ~/logs/sync.log
+ fi
+fi
+
+if [ $SELECTION = "push" ]; then
+ echo "==== PUSHING ====" >> ~/logs/sync.log
+ if rsync -vrph --stats ~/syncing andrew@brgr:/home/shared/fileSharing/ >> ~/logs/sync.log ; then
+ echo "==== PUSH COMPLETED ====" >> ~/logs/sync.log
+ notify-send "Push Succeeded!"
+ else
+ notify-send -u "critical" "Push Failed! See ~/logs/sync.log"
+ echo "==== PUSH FAILED ====" >> ~/logs/sync.log
+ fi
+fi