aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpacedio <spacedio@thernusen.net>2026-05-24 21:07:04 -0400
committerSpacedio <spacedio@thernusen.net>2026-05-24 21:07:04 -0400
commit7999b9ad79a5aba6b12be73a938c823fc5b329e8 (patch)
tree35fab2c4b53b498c22bb0b701957f67d52366354
parenta82c20fbc2d736cba174502fccbcba648ce978e9 (diff)
downloaddotfiles-7999b9ad79a5aba6b12be73a938c823fc5b329e8.tar.gz
Reorganization of files.
-rw-r--r--bash/.bashrc2
-rwxr-xr-xsystem/deploy-system.sh21
-rw-r--r--system/etc/X11/xorg.conf.d/10-igpu.conf (renamed from nvidia-pm/etc/X11/xorg.conf.dir/10-igpu.conf)0
-rw-r--r--system/etc/X11/xorg.conf.d/30-touchpad.conf (renamed from nvidia-pm/etc/X11/xorg.conf.dir/30-touchpad.conf)0
-rw-r--r--system/etc/udev/rules.d/80-nvidia-pm.rules (renamed from nvidia-pm/etc/udev/rules.d/80-nvidia-pm.rules)0
-rwxr-xr-xsystem/usr/gpu-toggle (renamed from dgpu-toggle/usr/local/bin/gpu-toggle)6
-rwxr-xr-xsystem/usr/system-maintenance29
-rwxr-xr-xsystem/usr/system-update36
8 files changed, 90 insertions, 4 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index 12ab075..c60ac13 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -6,7 +6,7 @@
#ALIASES
alias ls='ls --color=auto'
alias l='ls -lahF'
-alias code='code-oss'
+alias code='zed'
alias xi='sudo xbps-install'
alias xr='sudo xbps-remove'
alias ..='cd ..'
diff --git a/system/deploy-system.sh b/system/deploy-system.sh
new file mode 100755
index 0000000..a83415f
--- /dev/null
+++ b/system/deploy-system.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# Define paths (Relative to script location)
+DOT_BIN="./usr/"
+DOT_ETC="./etc/"
+
+# Check for root
+if [ "$EUID" -ne 0 ]; then
+ echo "Please run as root (sudo ./deploy.sh)"
+ exit
+fi
+
+echo "Deploying system scripts..."
+rsync -avh --dry-run --chmod=D755,F755 --chown=root:root "$DOT_BIN" /usr/local/bin/
+
+echo "Deploying etc configs..."
+rsync -avh --dry-run --chmod=D755,F644 --chown=root:root "$DOT_ETC" /etc/
+
+#echo "Reloading services..."
+#udevadm control --reload-rules && udevadm trigger
+# Add other reloads here as needed
diff --git a/nvidia-pm/etc/X11/xorg.conf.dir/10-igpu.conf b/system/etc/X11/xorg.conf.d/10-igpu.conf
index 49a4151..49a4151 100644
--- a/nvidia-pm/etc/X11/xorg.conf.dir/10-igpu.conf
+++ b/system/etc/X11/xorg.conf.d/10-igpu.conf
diff --git a/nvidia-pm/etc/X11/xorg.conf.dir/30-touchpad.conf b/system/etc/X11/xorg.conf.d/30-touchpad.conf
index f958e88..f958e88 100644
--- a/nvidia-pm/etc/X11/xorg.conf.dir/30-touchpad.conf
+++ b/system/etc/X11/xorg.conf.d/30-touchpad.conf
diff --git a/nvidia-pm/etc/udev/rules.d/80-nvidia-pm.rules b/system/etc/udev/rules.d/80-nvidia-pm.rules
index 05cf9d7..05cf9d7 100644
--- a/nvidia-pm/etc/udev/rules.d/80-nvidia-pm.rules
+++ b/system/etc/udev/rules.d/80-nvidia-pm.rules
diff --git a/dgpu-toggle/usr/local/bin/gpu-toggle b/system/usr/gpu-toggle
index 4e1ddd2..4325829 100755
--- a/dgpu-toggle/usr/local/bin/gpu-toggle
+++ b/system/usr/gpu-toggle
@@ -1,7 +1,7 @@
#!/bin/bash
# -------------------------------------------------------------------------
-# GPU-SWITCH: Discrete Graphics Power & Bus Management
+# GPU-TOGGLE: Discrete Graphics Power & Bus Management
# Target: Razer Blade Stealth 13 (Late 2019) | Void Linux
# -------------------------------------------------------------------------
@@ -62,7 +62,7 @@ enable_gpu() {
# 1. Trigger PCI Rescan
echo "[STEP 1/2] Scanning PCI bridge for hardware changes..."
echo 1 > /sys/bus/pci/rescan
-
+
# Allow firmware-level handshake
sleep 2
@@ -83,5 +83,5 @@ case "$1" in
on) enable_gpu ;;
off) disable_gpu ;;
status) check_status ;;
- *) echo "Usage: gpu-switch {on|off|status}" ;;
+ *) echo "Usage: gpu-toggle {on|off|status}" ;;
esac
diff --git a/system/usr/system-maintenance b/system/usr/system-maintenance
new file mode 100755
index 0000000..d2918c6
--- /dev/null
+++ b/system/usr/system-maintenance
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Configuration
+MARKER_FILE="/var/log/last_maintenance_timestamp"
+LOG_OUT="/var/log/maintenance.log"
+# 604800 seconds = 7 days
+INTERVAL=604800
+
+# Get last run time or 0 if file doesn't exist
+LAST_RUN=$(stat -c %Y "$MARKER_FILE" 2>/dev/null || echo 0)
+CURRENT_TIME=$(date +%s)
+
+if [ $((CURRENT_TIME - LAST_RUN)) -ge $INTERVAL ]; then
+ {
+ echo "-------------------------------------------"
+ echo "[$(date)] Starting weekly maintenance..."
+
+ # 1. Trim SSD
+ /usr/sbin/fstrim -v /
+
+ # 2. Run Backup (Example)
+ # /usr/local/bin/backup.sh 2>&1
+
+ # Update timestamp marker
+ touch "$MARKER_FILE"
+
+ echo "[$(date)] Maintenance complete."
+ } >> "$LOG_OUT" 2>&1
+fi
diff --git a/system/usr/system-update b/system/usr/system-update
new file mode 100755
index 0000000..4187e46
--- /dev/null
+++ b/system/usr/system-update
@@ -0,0 +1,36 @@
+#!/bin/bash
+# /usr/local/bin/sys-update
+# Formal system maintenance utility with administrative enforcement
+
+LOG_FILE="/var/log/system-update.log"
+
+# Administrative Privileges Check
+if [ "$EUID" -ne 0 ]; then
+ printf ":: [ERROR] This utility requires administrative privileges. Please execute with 'sudo'.\n" >&2
+ exit 1
+fi
+
+set -e
+
+log_message() {
+ printf "[$(date +'%Y-%m-%d %H:%M:%S')] %s\n" "$1" >> "$LOG_FILE"
+}
+
+log_message "START: Commencing system maintenance cycle."
+printf ":: Initializing hardware state: Activating discrete GPU...\n"
+gpu-toggle on
+
+printf ":: Synchronizing package repositories and performing system upgrade...\n"
+xbps-install -Su
+
+printf ":: Commencing filesystem optimization and orphan removal...\n"
+xbps-remove -Oo
+
+printf ":: Executing kernel image purge for obsolete versions...\n"
+vkpurge rm all
+
+printf ":: Restoring power-efficient state: Deactivating discrete GPU...\n"
+gpu-toggle off
+
+log_message "FINISH: Maintenance cycle completed successfully."
+printf ":: [SUCCESS] Operation logged to %s\n" "$LOG_FILE"