aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin/scripts
diff options
context:
space:
mode:
authoriceyrazor <iceyrazor@mailfence.com>2025-05-25 04:42:09 -0500
committericeyrazor <iceyrazor@mailfence.com>2025-05-25 04:42:09 -0500
commit5f802a4a9d5e013429f9af6f887278ea6db5e18b (patch)
tree37d1b6b8951f44524dfaba081477d53d302dba97 /env/.local/bin/scripts
parent90248ad8222cf99d5a8ef7e1f2816d3ee810d3b8 (diff)
made dynamic generating path.
Diffstat (limited to 'env/.local/bin/scripts')
-rwxr-xr-xenv/.local/bin/scripts/backup/backup-flash.sh21
-rwxr-xr-xenv/.local/bin/scripts/backup/backup.sh31
-rwxr-xr-xenv/.local/bin/scripts/bri.sh1
-rwxr-xr-xenv/.local/bin/scripts/math.sh13
-rwxr-xr-xenv/.local/bin/scripts/set-pri-java.sh1
5 files changed, 67 insertions, 0 deletions
diff --git a/env/.local/bin/scripts/backup/backup-flash.sh b/env/.local/bin/scripts/backup/backup-flash.sh
new file mode 100755
index 0000000..c9ad023
--- /dev/null
+++ b/env/.local/bin/scripts/backup/backup-flash.sh
@@ -0,0 +1,21 @@
+cd ~/stuff/scripts
+
+fsync () {
+ # t?
+ rsync -RUurvn --size-only --delete-after $exclude $syncfile "$target"
+ printf "===commit these changes?\n"
+ read - "y/n: " uinput
+ if [ "$uinput" != "n" ] && [ "$uinput" != "N" ]; then
+ printf "\n\n\n"
+ rsync -RUurv --progress --size-only --delete-after $exclude $syncfile "$target"
+ printf "\n===end sync\n---------\n\n"
+ fi
+}
+
+syncfile="LINUX-SERVER1 sites"
+
+#sync game stuff
+target="/home/iceyrazor/u"
+exclude=""
+
+fsync
diff --git a/env/.local/bin/scripts/backup/backup.sh b/env/.local/bin/scripts/backup/backup.sh
new file mode 100755
index 0000000..e1c13d4
--- /dev/null
+++ b/env/.local/bin/scripts/backup/backup.sh
@@ -0,0 +1,31 @@
+cd ~/
+
+fsynca () {
+ # t?
+ rsync -RUurvn --size-only --delete-after $exclude $syncfile "$target"
+}
+
+fsyncb () {
+ printf "===confirm changes?\n"
+ read -p "y/n: " uinput
+ if [ "$uinput" != "n" ] && [ "$uinput" != "N" ]; then
+ printf "\n\n\n"
+ rsync -RUurv --progress --size-only --delete-after $exclude $syncfile "$target"
+ printf "\n===end sync\n---------\n\n"
+ fi
+}
+
+syncfile="stuff .surf/styles .gnupg .ssh .local/bin/lf-gadgets .config/FreeTube .config/wlxoverlay .config/newsboat .var/app/dev.vencord.Vesktop/config/vesktop/themes .config/zsh .config/vesktop/themes .keepass .config/Pinta .config/cmus .config/cava .local/share/applications/custom .local/share/osu"
+
+# se shit
+syncfile="$syncfile /home/iceyrazor/.local/share/Steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/AppData/Roaming/SpaceEngineers/Blueprints /home/iceyrazor/.local/share/Steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/AppData/Roaming/SpaceEngineers/IngameScripts /home/iceyrazor/.local/share/Steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/AppData/Roaming/SpaceEngineers/Saves"
+
+target="/home/iceyrazor/mnt-backups/LINUX FILES/home/iceyrazor"
+exclude="--exclude node_modules --exclude node_modules_23 --exclude dontsync --exclude **/target --exclude LinVAM/pyenv"
+
+fsynca
+
+printf "==CC-survival unsynced?\n\n"
+printf "==osu unsynced\n\n"
+
+fsyncb
diff --git a/env/.local/bin/scripts/bri.sh b/env/.local/bin/scripts/bri.sh
new file mode 100755
index 0000000..b943f30
--- /dev/null
+++ b/env/.local/bin/scripts/bri.sh
@@ -0,0 +1 @@
+echo "$1" > /sys/class/backlight/intel_backlight/brightness
diff --git a/env/.local/bin/scripts/math.sh b/env/.local/bin/scripts/math.sh
new file mode 100755
index 0000000..26d4854
--- /dev/null
+++ b/env/.local/bin/scripts/math.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+expression=$1
+precision=$2
+
+if [ "$precision" == "" ]; then
+ precision=1;
+fi;
+
+# Perform arithmetic operation using awk
+result=$(awk "BEGIN {printf \"%.${precision}f\n\", $expression}" | sed 's/\.0$//')
+
+# Print the result
+echo "$result"
diff --git a/env/.local/bin/scripts/set-pri-java.sh b/env/.local/bin/scripts/set-pri-java.sh
new file mode 100755
index 0000000..35a9769
--- /dev/null
+++ b/env/.local/bin/scripts/set-pri-java.sh
@@ -0,0 +1 @@
+sudo renice -20 -p $(sudo pidof java)