diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-07-17 00:58:43 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-07-17 00:58:43 +0900 |
| commit | d36df085bf093ce6f8092eeb6e6878d9ad2791d0 (patch) | |
| tree | 6821aa4933ee9ce5e65f13ef152ae66ef55e345f | |
| parent | f43fe874dbc7561416997dd8e74df0f25621bdcd (diff) | |
integrated wallust colors into simple_sddm_2 SDDM theme
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperEffects.sh | 8 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperSelect.sh | 10 | ||||
| -rwxr-xr-x | config/hypr/scripts/sddm_wallpaper.sh | 56 |
3 files changed, 63 insertions, 11 deletions
diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 3717543c..2ba58d0c 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -131,10 +131,8 @@ if [[ -n "$choice" ]]; then exit 1 fi - # Open terminal and set the wallpaper - $terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \ - sudo cp -r $wallpaper_output '$sddm_simple/Backgrounds/default' && \ - notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'" + exec $SCRIPTSDIR/sddm_wallpaper.sh --effects + fi fi -fi +fi
\ No newline at end of file diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 47a8f2cd..a6e6c4d4 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -123,11 +123,9 @@ set_sddm_wallpaper() { notify-send -i "$iDIR/error.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background" exit 1 fi - - # Open terminal to enter password - $terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \ - sudo cp -r $wallpaper_current '$sddm_simple/Backgrounds/default' && \ - notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'" + + exec $SCRIPTSDIR/sddm_wallpaper.sh --normal + fi fi } @@ -235,4 +233,4 @@ if pidof rofi >/dev/null; then pkill rofi fi -main +main
\ No newline at end of file diff --git a/config/hypr/scripts/sddm_wallpaper.sh b/config/hypr/scripts/sddm_wallpaper.sh new file mode 100755 index 00000000..fd385fcd --- /dev/null +++ b/config/hypr/scripts/sddm_wallpaper.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ +# SDDM Wallpaper and Wallust Colors Setter + +# 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 +main_color=$(grep -oP 'color13:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust") +accent_color=$(grep -oP 'color12:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust") +bg_color=$(grep -oP 'color0:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust") +placeholder_color="$accent_color" +icon_color=$(grep -oP 'foreground:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust") + +# wallpaper to use +if [[ "$mode" == "normal" ]]; then + wallpaper_path="$wallpaper_current" +else + wallpaper_path="$wallpaper_modified" +fi + +# Launch terminal and apply changes +$terminal -e bash -c " +echo 'Enter your password to update SDDM wallpapers and colors'; +sudo sed -i \"s/MainColor=\\\"#.*\\\"/MainColor=\\\"$main_color\\\"/\" \"$sddm_theme_conf\" +sudo sed -i \"s/AccentColor=\\\"#.*\\\"/AccentColor=\\\"$accent_color\\\"/\" \"$sddm_theme_conf\" +sudo sed -i \"s/BackgroundColor=\\\"#.*\\\"/BackgroundColor=\\\"$bg_color\\\"/\" \"$sddm_theme_conf\" +sudo sed -i \"s/placeholderColor=\\\"#.*\\\"/placeholderColor=\\\"$placeholder_color\\\"/\" \"$sddm_theme_conf\" +sudo sed -i \"s/IconColor=\\\"#.*\\\"/IconColor=\\\"$icon_color\\\"/\" \"$sddm_theme_conf\" + +# Copy wallpaper +sudo cp \"$wallpaper_path\" \"$sddm_simple/Backgrounds/default\" + +notify-send -i \"$iDIR/ja.png\" \"SDDM\" \"Background SET\" +" |
