From b69040fda091cb2a55e00c05e924cd0c0a42cb57 Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Wed, 4 Jun 2025 10:16:12 -0500 Subject: fixed awesome autostart dir. added wallpaper setter script. made no extension be filetype sh in neovim. renamed some scripts. --- env/.local/bin/scripts/backup/backup-flash | 21 +++++++ env/.local/bin/scripts/backup/backup-flash.sh | 21 ------- env/.local/bin/scripts/backup/backup.sh | 31 ---------- env/.local/bin/scripts/backup/bbackup | 31 ++++++++++ env/.local/bin/scripts/bri | 1 + env/.local/bin/scripts/bri.sh | 1 - env/.local/bin/scripts/math | 13 ++++ env/.local/bin/scripts/math.sh | 13 ---- env/.local/bin/scripts/setwll | 69 ++++++++++++++++++++++ .../bin/scripts/wallpaper_scripts/default-primary | 1 + .../scripts/wallpaper_scripts/default-secondary | 1 + env/.local/bin/scripts/wallpaper_scripts/drg | 1 + env/.local/bin/scripts/wallpaper_scripts/drk | 1 + 13 files changed, 139 insertions(+), 66 deletions(-) create mode 100755 env/.local/bin/scripts/backup/backup-flash delete mode 100755 env/.local/bin/scripts/backup/backup-flash.sh delete mode 100755 env/.local/bin/scripts/backup/backup.sh create mode 100755 env/.local/bin/scripts/backup/bbackup create mode 100755 env/.local/bin/scripts/bri delete mode 100755 env/.local/bin/scripts/bri.sh create mode 100755 env/.local/bin/scripts/math delete mode 100755 env/.local/bin/scripts/math.sh create mode 100755 env/.local/bin/scripts/setwll create mode 100755 env/.local/bin/scripts/wallpaper_scripts/default-primary create mode 100755 env/.local/bin/scripts/wallpaper_scripts/default-secondary create mode 100755 env/.local/bin/scripts/wallpaper_scripts/drg create mode 100755 env/.local/bin/scripts/wallpaper_scripts/drk (limited to 'env/.local/bin') diff --git a/env/.local/bin/scripts/backup/backup-flash b/env/.local/bin/scripts/backup/backup-flash new file mode 100755 index 0000000..c9ad023 --- /dev/null +++ b/env/.local/bin/scripts/backup/backup-flash @@ -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-flash.sh b/env/.local/bin/scripts/backup/backup-flash.sh deleted file mode 100755 index c9ad023..0000000 --- a/env/.local/bin/scripts/backup/backup-flash.sh +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100755 index e1c13d4..0000000 --- a/env/.local/bin/scripts/backup/backup.sh +++ /dev/null @@ -1,31 +0,0 @@ -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/backup/bbackup b/env/.local/bin/scripts/backup/bbackup new file mode 100755 index 0000000..e1c13d4 --- /dev/null +++ b/env/.local/bin/scripts/backup/bbackup @@ -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 b/env/.local/bin/scripts/bri new file mode 100755 index 0000000..b943f30 --- /dev/null +++ b/env/.local/bin/scripts/bri @@ -0,0 +1 @@ +echo "$1" > /sys/class/backlight/intel_backlight/brightness diff --git a/env/.local/bin/scripts/bri.sh b/env/.local/bin/scripts/bri.sh deleted file mode 100755 index b943f30..0000000 --- a/env/.local/bin/scripts/bri.sh +++ /dev/null @@ -1 +0,0 @@ -echo "$1" > /sys/class/backlight/intel_backlight/brightness diff --git a/env/.local/bin/scripts/math b/env/.local/bin/scripts/math new file mode 100755 index 0000000..26d4854 --- /dev/null +++ b/env/.local/bin/scripts/math @@ -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/math.sh b/env/.local/bin/scripts/math.sh deleted file mode 100755 index 26d4854..0000000 --- a/env/.local/bin/scripts/math.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/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/setwll b/env/.local/bin/scripts/setwll new file mode 100755 index 0000000..b19fdf3 --- /dev/null +++ b/env/.local/bin/scripts/setwll @@ -0,0 +1,69 @@ +#!/bin/bash +# may be moved to theme setter +cd "$(dirname "$0")" + +unload=0 +secondary="" +primary="" +all="" + +while getopts "up:s:a:" opt; do + case "$opt" in + u) unload=1 + ;; + p) primary="$OPTARG" + ;; + s) secondary="$OPTARG" + ;; + a) all="$OPTARG" + ;; + esac +done + +shift $((OPTIND-1)) +[ "${1:-}" = "--" ] && shift + +if [ "$all" ]; then + primary="$all" + secondary="$all" +fi + +if [ -z "$primary" ]; then + primary="$(./wallpaper_scripts/default-primary)" +else + if [ -f "./wallpaper_scripts/$primary" ]; then + primary="$(./wallpaper_scripts/$primary)" + fi +fi + +if [ -z "$secondary" ]; then + secondary="$(./wallpaper_scripts/default-secondary)" +else + if [ -f "./wallpaper_scripts/$secondary" ]; then + secondary="$(./wallpaper_scripts/$secondary)" + fi +fi + + +if [ "$WAYLAND_DISPLAY" ]; then + current_wal="$(hyprctl hyprpaper listactive | grep HDMI-A-1 | sed 's/HDMI-A-1 = //')" + hyprctl hyprpaper preload $primary + hyprctl hyprpaper wallpaper "HDMI-A-1,$primary" + if [ $unload == 1 ]; then + hyprctl hyprpaper unload "$current_wal" + fi + + current_wal="$(hyprctl hyprpaper listactive | grep DP-1 | sed 's/DP-1 = //')" + hyprctl hyprpaper preload $secondary + hyprctl hyprpaper wallpaper "DP-1,$secondary" + if [ $unload == 1 ]; then + hyprctl hyprpaper unload "$current_wal" + fi +else + if [ -z "$1" ]; then + nitrogen --head=0 --set-zoom-fill $primary + + nitrogen --head=1 --set-zoom-fill $secondary + fi +fi + diff --git a/env/.local/bin/scripts/wallpaper_scripts/default-primary b/env/.local/bin/scripts/wallpaper_scripts/default-primary new file mode 100755 index 0000000..2898bfb --- /dev/null +++ b/env/.local/bin/scripts/wallpaper_scripts/default-primary @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/4500025-retrowave-vaporwave-car-typography-purple-blue-chromatic-aberration-initial-d-hachi-roku.jpg" diff --git a/env/.local/bin/scripts/wallpaper_scripts/default-secondary b/env/.local/bin/scripts/wallpaper_scripts/default-secondary new file mode 100755 index 0000000..f2f5ee1 --- /dev/null +++ b/env/.local/bin/scripts/wallpaper_scripts/default-secondary @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/tumblr_06bbd355f3e355049446dac24f6e7c44_2c486f77_1280 ninesols.jpg" diff --git a/env/.local/bin/scripts/wallpaper_scripts/drg b/env/.local/bin/scripts/wallpaper_scripts/drg new file mode 100755 index 0000000..49ef5ca --- /dev/null +++ b/env/.local/bin/scripts/wallpaper_scripts/drg @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/6b06108fa3bc46f5.jpg" diff --git a/env/.local/bin/scripts/wallpaper_scripts/drk b/env/.local/bin/scripts/wallpaper_scripts/drk new file mode 100755 index 0000000..297f16a --- /dev/null +++ b/env/.local/bin/scripts/wallpaper_scripts/drk @@ -0,0 +1 @@ +echo "/home/iceyrazor/stuff/media/wallpapers/dark_leaves.png" -- cgit v1.3