aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2025-07-22 00:13:48 +0900
committerJaKooLit <ejhay.games@gmail.com>2025-07-22 00:13:48 +0900
commit54af0ed84c6efcf61f088ab1af1188842aa4ed0d (patch)
tree3c480187c8c2c8dabab87073f279aad55913e43c /config/hypr/scripts
parented1fe4992d44b05767a65731837d8cfa37f59230 (diff)
updated copy.sh to work with simple_sddm_2 and updated wallpaper_sddm script
Diffstat (limited to 'config/hypr/scripts')
-rw-r--r--config/hypr/scripts/sddm_wallpaper-v2.sh82
1 files changed, 38 insertions, 44 deletions
diff --git a/config/hypr/scripts/sddm_wallpaper-v2.sh b/config/hypr/scripts/sddm_wallpaper-v2.sh
index 898053c7..19fe7158 100644
--- a/config/hypr/scripts/sddm_wallpaper-v2.sh
+++ b/config/hypr/scripts/sddm_wallpaper-v2.sh
@@ -28,55 +28,49 @@ elif [[ "$1" == "--effects" ]]; then
mode="effects"
fi
-
-
# Extract colors from rofi wallust config
-get_color() {
- grep -oP "$1:\s*\K#[A-Fa-f0-9]+" "$rofi_wallust"
-}
-
-color11=$(get_color 'color11')
-HeaderTextColor=$(get_color 'color12')
-DateTextColor=$(get_color 'color13')
-bg_color=$(get_color 'color0')
-placeholder_color="$accent_color"
-icon_color=$(get_color 'foreground')
-color11=$(get_color 'color11')
+color14=$(grep -oP 'color14:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust")
+color13=$(grep -oP 'color13:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust")
+color12=$(grep -oP 'color12:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust")
+color1=$(grep -oP 'color1:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust")
+color0=$(grep -oP 'color0:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust")
+color10=$(grep -oP 'color10:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust")
+foreground=$(grep -oP 'foreground:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust")
+#background-color=$(grep -oP 'background:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust")
-# Define an array of key-value pairs for SDDM config updates
-declare -A color_updates=(
- [HeaderTextColor]="$HeaderTextColor"
- [DateTextColor]="$DateTextColor"
- [TimeTextColor]="$DateTextColor"
- [SystemButtonsIconsColor]="$DateTextColor"
- [SessionButtonTextColor]="$DateTextColor"
- [VirtualKeyboardButtonTextColor]="$DateTextColor"
- [BackgroundColor]="$bg_color"
- [PlaceholderTextColor]="$placeholder_color"
- [IconColor]="$icon_color"
- [DropdownBackgroundColor]="$bg_color"
- [HighlightBackgroundColor]="$color11"
-)
+# wallpaper to use
+if [[ "$mode" == "normal" ]]; then
+ wallpaper_path="$wallpaper_current"
+else
+ wallpaper_path="$wallpaper_modified"
+fi
-# Apply changes via terminal and sudo
+# Launch terminal and apply changes
$terminal -e bash -c "
echo 'Enter your password to update SDDM wallpapers and colors';
-$(for key in "${!color_updates[@]}"; do
- value="${color_updates[$key]}"
- echo "sudo sed -i \"s/${key}=\\\"#.*\\\"/${key}=\\\"$value\\\"/\" \"$sddm_theme_conf\""
-done)
-"
-# Set wallpaper path based on mode
-wallpaper_path=$([[ "$mode" == "normal" ]] && echo "$wallpaper_current" || echo "$wallpaper_modified")
+# Update the colors in the SDDM config
+sudo sed -i \"s/HeaderTextColor=\\\"#.*\\\"/HeaderTextColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/DateTextColor=\\\"#.*\\\"/DateTextColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/TimeTextColor=\\\"#.*\\\"/TimeTextColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/DropdownSelectedBackgroundColor=\\\"#.*\\\"/DropdownSelectedBackgroundColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\"
-# Copy wallpaper safely
-if [[ -f "$wallpaper_path" ]]; then
- sudo cp "$wallpaper_path" "$sddm_simple/Backgrounds/default"
- notify-send -i "$iDIR/ja.png" "SDDM" "Background SET"
-else
- notify-send -i "$iDIR/ja.png" "SDDM" "Wallpaper not found: $wallpaper_path"
- echo "Error: Wallpaper file not found: $wallpaper_path"
- exit 1
-fi
+sudo sed -i \"s/SystemButtonsIconsColor=\\\"#.*\\\"/SystemButtonsIconsColor=\\\"$color12\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/SessionButtonTextColor=\\\"#.*\\\"/SessionButtonTextColor=\\\"$color12\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/VirtualKeyboardButtonTextColor=\\\"#.*\\\"/VirtualKeyboardButtonTextColor=\\\"$color12\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/HighlightBackgroundColor=\\\"#.*\\\"/HighlightBackgroundColor=\\\"$color12\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/LoginFieldTextColor=\\\"#.*\\\"/LoginFieldTextColor=\\\"$color12\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/PasswordFieldTextColor=\\\"#.*\\\"/PasswordFieldTextColor=\\\"$color12\\\"/\" \"$sddm_theme_conf\"
+
+sudo sed -i \"s/DropdownBackgroundColor=\\\"#.*\\\"/DropdownBackgroundColor=\\\"$color0\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/HighlightTextColor=\\\"#.*\\\"/HighlightTextColor=\\\"$color10\\\"/\" \"$sddm_theme_conf\"
+
+sudo sed -i \"s/PlaceholderTextColor=\\\"#.*\\\"/PlaceholderTextColor=\\\"$color14\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/UserIconColor=\\\"#.*\\\"/UserIconColor=\\\"$color14\\\"/\" \"$sddm_theme_conf\"
+sudo sed -i \"s/PasswordIconColor=\\\"#.*\\\"/PasswordIconColor=\\\"$color14\\\"/\" \"$sddm_theme_conf\"
+
+# Copy wallpaper to SDDM theme
+sudo cp \"$wallpaper_path\" \"$sddm_simple/Backgrounds/default\"
+notify-send -i \"$iDIR/ja.png\" \"SDDM\" \"Background SET\"
+" \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage