From 3363d48f00d92bbefe1a65c5331a5671ef88ae6a Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 16 Jan 2026 22:22:14 -0500 Subject: Disabled RainbowBorders by default use quick settings to enable The new mode select menu for RainbowBorders makes the prompt at install redundant. Especially when upgrading On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md renamed: config/hypr/UserScripts/RainbowBorders.sh -> config/hypr/UserScripts/RainbowBorders.bak.sh modified: config/hypr/configs/Startup_Apps.conf modified: copy.sh modified: scripts/lib_prompts.sh --- CHANGELOG.md | 2 + config/hypr/UserScripts/RainbowBorders.bak.sh | 89 +++++++++++++++++++++++++++ config/hypr/UserScripts/RainbowBorders.sh | 89 --------------------------- config/hypr/configs/Startup_Apps.conf | 4 +- copy.sh | 1 - scripts/lib_prompts.sh | 21 ------- 6 files changed, 93 insertions(+), 113 deletions(-) create mode 100755 config/hypr/UserScripts/RainbowBorders.bak.sh delete mode 100755 config/hypr/UserScripts/RainbowBorders.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a9ecb61..8ae7c154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ - There are now mulitple modes for the Rainbow Borders feature - `Disabled`, `Wallust Color`, `Rainbow`, `Gradient flow` - Thank you for the submission +- Disabled `RainbowBorders.sh` by default +- Use the quick setings menu `SUPERSHIFT + E` to enable, select mode - 2026-01-15 - Created waybar configs for ML4W Glass style diff --git a/config/hypr/UserScripts/RainbowBorders.bak.sh b/config/hypr/UserScripts/RainbowBorders.bak.sh new file mode 100755 index 00000000..67269b8a --- /dev/null +++ b/config/hypr/UserScripts/RainbowBorders.bak.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Smooth border cycling effect using Wallust palette or full rainbow + +# Possible values: "wallust_random", "rainbow", "gradient_flow" +EFFECT_TYPE="gradient_flow" + +WALLUST_COLORS_SOURCE="$HOME/.config/hypr/wallust/wallust-hyprland.conf" + +WALLUST_COLORS=() + +# ---------- LOAD WALLUST COLORS ---------- +if [[ "$EFFECT_TYPE" == "wallust_random" || "$EFFECT_TYPE" == "gradient_flow" ]]; then + # Accept either hex (0xffRRGGBB) or rgb(r,g,b) and normalize to 0xffRRGGBB + mapfile -t WALLUST_COLORS < <( + grep -E '^\$color[0-9]+' "$WALLUST_COLORS_SOURCE" | awk ' + function hex2(s){ return (length(s)==6 ? "0xff"s : ""); } + function rgb2(r,g,b){ return sprintf("0xff%02x%02x%02x", r, g, b); } + { + if (match($0, /0x([0-9a-fA-F]{8})/, m)) { print "0x" m[1]; next } + if (match($0, /#([0-9a-fA-F]{6})/, m)) { print hex2(m[1]); next } + if (match($0, /rgb\(([0-9]+),[ ]*([0-9]+),[ ]*([0-9]+)\)/, m)) { + print rgb2(m[1], m[2], m[3]); next + } + }' + ) + + if (( ${#WALLUST_COLORS[@]} == 0 )); then + # If wallust colors can't be loaded, fall back to random_hex + EFFECT_TYPE="rainbow" + fi +fi + +# ---------- RANDOM WALLUST COLORS ---------- +function wallust_random() { + echo "${WALLUST_COLORS[RANDOM % ${#WALLUST_COLORS[@]}]}" +} + +# ---------- RAINBOW COLORS ---------- +function random_hex() { + echo "0xff$(openssl rand -hex 3)" +} + +# ---------- FLOW MODE ---------- +BASE_COLOR="${WALLUST_COLORS[10]}" +GRAD1_COLOR="${WALLUST_COLORS[14]}" +GRAD2_COLOR="${WALLUST_COLORS[13]}" +GLOW_COLOR="${WALLUST_COLORS[15]}" + +MAX_POS=10 +GLOW_POS=0 + +function gradient_flow_color() { + local pos=$1 + local d=$(( pos - GLOW_POS )) + + # wrap distance (-9..9) + if (( d > MAX_POS/2 )); then d=$((d - MAX_POS)); fi + if (( d < -MAX_POS/2 )); then d=$((d + MAX_POS)); fi + + case "${d#-}" in + 0) echo "$GLOW_COLOR" ;; + 1) echo "$GRAD1_COLOR" ;; + 2) echo "$GRAD2_COLOR" ;; + *) echo "$BASE_COLOR" ;; + esac + + if (( pos == MAX_POS - 1 )); then + GLOW_POS=$(( (GLOW_POS + 1) % MAX_POS )) + fi +} + +# ---------- Main function ---------- + +function get_color() { + if [[ "$EFFECT_TYPE" == "wallust_random" && ${#WALLUST_COLORS[@]} -gt 0 ]]; then + wallust_random + elif [[ "$EFFECT_TYPE" == "gradient_flow" && ${#WALLUST_COLORS[@]} -ge 16 ]]; then + gradient_flow_color "$1" + else + random_hex + fi +} + +# border effect for ACTIVE window +hyprctl keyword general:col.active_border $(get_color 0) $(get_color 1) $(get_color 2) $(get_color 3) $(get_color 4) $(get_color 5) $(get_color 6) $(get_color 7) $(get_color 8) $(get_color 9) 270deg + +# border effect for INACTIVE windows +#hyprctl keyword general:col.inactive_border $(get_color 0) $(get_color 1) $(get_color 2) $(get_color 3) $(get_color 4) $(get_color 5) $(get_color 6) $(get_color 7) $(get_color 8) $(get_color 9) 270deg \ No newline at end of file diff --git a/config/hypr/UserScripts/RainbowBorders.sh b/config/hypr/UserScripts/RainbowBorders.sh deleted file mode 100755 index 67269b8a..00000000 --- a/config/hypr/UserScripts/RainbowBorders.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env bash -# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## -# Smooth border cycling effect using Wallust palette or full rainbow - -# Possible values: "wallust_random", "rainbow", "gradient_flow" -EFFECT_TYPE="gradient_flow" - -WALLUST_COLORS_SOURCE="$HOME/.config/hypr/wallust/wallust-hyprland.conf" - -WALLUST_COLORS=() - -# ---------- LOAD WALLUST COLORS ---------- -if [[ "$EFFECT_TYPE" == "wallust_random" || "$EFFECT_TYPE" == "gradient_flow" ]]; then - # Accept either hex (0xffRRGGBB) or rgb(r,g,b) and normalize to 0xffRRGGBB - mapfile -t WALLUST_COLORS < <( - grep -E '^\$color[0-9]+' "$WALLUST_COLORS_SOURCE" | awk ' - function hex2(s){ return (length(s)==6 ? "0xff"s : ""); } - function rgb2(r,g,b){ return sprintf("0xff%02x%02x%02x", r, g, b); } - { - if (match($0, /0x([0-9a-fA-F]{8})/, m)) { print "0x" m[1]; next } - if (match($0, /#([0-9a-fA-F]{6})/, m)) { print hex2(m[1]); next } - if (match($0, /rgb\(([0-9]+),[ ]*([0-9]+),[ ]*([0-9]+)\)/, m)) { - print rgb2(m[1], m[2], m[3]); next - } - }' - ) - - if (( ${#WALLUST_COLORS[@]} == 0 )); then - # If wallust colors can't be loaded, fall back to random_hex - EFFECT_TYPE="rainbow" - fi -fi - -# ---------- RANDOM WALLUST COLORS ---------- -function wallust_random() { - echo "${WALLUST_COLORS[RANDOM % ${#WALLUST_COLORS[@]}]}" -} - -# ---------- RAINBOW COLORS ---------- -function random_hex() { - echo "0xff$(openssl rand -hex 3)" -} - -# ---------- FLOW MODE ---------- -BASE_COLOR="${WALLUST_COLORS[10]}" -GRAD1_COLOR="${WALLUST_COLORS[14]}" -GRAD2_COLOR="${WALLUST_COLORS[13]}" -GLOW_COLOR="${WALLUST_COLORS[15]}" - -MAX_POS=10 -GLOW_POS=0 - -function gradient_flow_color() { - local pos=$1 - local d=$(( pos - GLOW_POS )) - - # wrap distance (-9..9) - if (( d > MAX_POS/2 )); then d=$((d - MAX_POS)); fi - if (( d < -MAX_POS/2 )); then d=$((d + MAX_POS)); fi - - case "${d#-}" in - 0) echo "$GLOW_COLOR" ;; - 1) echo "$GRAD1_COLOR" ;; - 2) echo "$GRAD2_COLOR" ;; - *) echo "$BASE_COLOR" ;; - esac - - if (( pos == MAX_POS - 1 )); then - GLOW_POS=$(( (GLOW_POS + 1) % MAX_POS )) - fi -} - -# ---------- Main function ---------- - -function get_color() { - if [[ "$EFFECT_TYPE" == "wallust_random" && ${#WALLUST_COLORS[@]} -gt 0 ]]; then - wallust_random - elif [[ "$EFFECT_TYPE" == "gradient_flow" && ${#WALLUST_COLORS[@]} -ge 16 ]]; then - gradient_flow_color "$1" - else - random_hex - fi -} - -# border effect for ACTIVE window -hyprctl keyword general:col.active_border $(get_color 0) $(get_color 1) $(get_color 2) $(get_color 3) $(get_color 4) $(get_color 5) $(get_color 6) $(get_color 7) $(get_color 8) $(get_color 9) 270deg - -# border effect for INACTIVE windows -#hyprctl keyword general:col.inactive_border $(get_color 0) $(get_color 1) $(get_color 2) $(get_color 3) $(get_color 4) $(get_color 5) $(get_color 6) $(get_color 7) $(get_color 8) $(get_color 9) 270deg \ No newline at end of file diff --git a/config/hypr/configs/Startup_Apps.conf b/config/hypr/configs/Startup_Apps.conf index 2bf902cd..0cc5da11 100644 --- a/config/hypr/configs/Startup_Apps.conf +++ b/config/hypr/configs/Startup_Apps.conf @@ -33,8 +33,8 @@ exec-once = $scriptsDir/Hyprsunset.sh init exec-once = wl-paste --type text --watch cliphist store exec-once = wl-paste --type image --watch cliphist store -# Rainbow borders -exec-once = $UserScripts/RainbowBorders.sh +# Rainbow borders (disabled by default; use quick settings menu) +#exec-once = $UserScripts/RainbowBorders.sh # Here are list of features available but disabled by default diff --git a/copy.sh b/copy.sh index 31c66a0b..b061f4ac 100755 --- a/copy.sh +++ b/copy.sh @@ -355,7 +355,6 @@ fi printf "\n%.0s" {1..1} prompt_clock_12h "$LOG" printf "\n%.0s" {1..1} -prompt_rainbow_borders "$LOG" >/dev/null printf "\n%.0s" {1..1} prompt_express_upgrade "$EXPRESS_SUPPORTED" "$LOG" diff --git a/scripts/lib_prompts.sh b/scripts/lib_prompts.sh index a63afde3..bf6fafd7 100644 --- a/scripts/lib_prompts.sh +++ b/scripts/lib_prompts.sh @@ -209,27 +209,6 @@ apply_sddm_12h_format_sequoia() { fi } -# Rainbow borders toggle; returns "disabled" or "kept". -prompt_rainbow_borders() { - local log="$1" - echo "${NOTE} ${SKY_BLUE}By default, Rainbow Borders animation is enabled" - echo "${WARN} However, this uses a bit more CPU and Memory resources." - if ! read -r -p "${CAT} Do you want to disable Rainbow Borders animation? (y/N): " border_choice &1 | tee -a "$log" - echo "kept" - return - fi - if [[ "$border_choice" =~ ^[Yy]$ ]]; then - mv config/hypr/UserScripts/RainbowBorders.sh config/hypr/UserScripts/RainbowBorders.bak.sh - sed -i '/exec-once = \$UserScripts\/RainbowBorders.sh/s/^/#/' config/hypr/configs/Startup_Apps.conf - sed -i '/^[[:space:]]*animation = borderangle, 1, 180, liner, loop/s/^/#/' config/hypr/configs/UserAnimations.conf - echo "${OK} Rainbow borders are now disabled." 2>&1 | tee -a "$log" - echo "disabled" - else - echo "${NOTE} No changes made. Rainbow borders remain enabled." 2>&1 | tee -a "$log" - echo "kept" - fi -} # Express upgrade confirmation; may set EXPRESS_MODE=1. prompt_express_upgrade() { -- cgit v1.2.3