aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com~>2025-07-21 17:26:37 +0900
committerJaKooLit <ejhay.games@gmail.com~>2025-07-21 17:26:49 +0900
commited1fe4992d44b05767a65731837d8cfa37f59230 (patch)
tree712c1f97319af9558cec1cc2948b1464173b12d3
parentea3bc3999e1323de5b23e535e00669549154a187 (diff)
uploaded new script for the new sddm theme
-rw-r--r--config/hypr/scripts/sddm_wallpaper-v2.sh82
1 files changed, 82 insertions, 0 deletions
diff --git a/config/hypr/scripts/sddm_wallpaper-v2.sh b/config/hypr/scripts/sddm_wallpaper-v2.sh
new file mode 100644
index 00000000..898053c7
--- /dev/null
+++ b/config/hypr/scripts/sddm_wallpaper-v2.sh
@@ -0,0 +1,82 @@
+#!/bin/bash
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */
+# SDDM Wallpaper and Wallust Colors Setter
+
+# for the upcoming changes on the simple_sddm_theme
+
+# variables
+terminal=kitty
+wallDIR="$HOME/Pictures/wallpapers"
+SCRIPTSDIR="$HOME/.config/hypr/scripts"
+wallpaper_current="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current"
+wallpaper_modified="$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified"
+sddm_simple="/usr/share/sddm/themes/simple_sddm_2"
+
+# rofi-wallust-sddm colors path
+rofi_wallust="$HOME/.config/rofi/wallust/colors-rofi.rasi"
+sddm_theme_conf="$sddm_simple/theme.conf"
+
+# Directory for swaync
+iDIR="$HOME/.config/swaync/images"
+iDIRi="$HOME/.config/swaync/icons"
+
+# Parse arguments
+mode="effects" # default
+if [[ "$1" == "--normal" ]]; then
+ mode="normal"
+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')
+
+# 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"
+)
+
+# Apply changes via terminal and sudo
+$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")
+
+# 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
+
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage