From 90fe32a08a1c6a9234916d5fab15c82851b0f0a2 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 3 Feb 2025 17:24:53 +0900 Subject: added support to make current wallpaper to SDDM (NOTE: need sequoia wallpaper) --- config/hypr/UserScripts/WallpaperEffects.sh | 25 ++++++++++++++++++++++++- config/hypr/UserScripts/WallpaperSelect.sh | 26 +++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 2 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index ccb5b744..14da323d 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -10,6 +10,7 @@ focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{pri # Directory for swaync iDIR="$HOME/.config/swaync/images" +iDIRi="$HOME/.config/swaync/icons" # swww transition config FPS=60 @@ -62,7 +63,6 @@ main() { [[ "$effect" != "No Effects" ]] && options+=("$effect") done - # Show rofi menu and handle user choice choice=$(printf "%s\n" "${options[@]}" | LC_COLLATE=C sort | rofi -dmenu -i -config ~/.config/rofi/config-wallpaper-effect.rasi) # Process user choice @@ -98,3 +98,26 @@ if pidof rofi > /dev/null; then fi main + +sleep 2 +# supports sddm sequoia_2 theme only +sddm_sequoia="/usr/share/sddm/themes/sequoia_2" +if [ -d "$sddm_sequoia" ]; then + notify-send -i "$iDIRi/picture.png" "Set wallpaper" "as SDDM background?" \ + -t 10000 \ + -A "yes=Yes" \ + -A "no=No" \ + -h string:x-canonical-private-synchronous:wallpaper-notify + + dbus-monitor "interface='org.freedesktop.Notifications',member='ActionInvoked'" | + while read -r line; do + if echo "$line" | grep -q "yes"; then + # User chose "Yes", copy the wallpaper with correct syntax + pkexec /usr/bin/cp -r "$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified" "$sddm_sequoia/backgrounds/default" + notify-send -i "$iDIRi/picture.png" "SDDM" "Background SET" + break + elif echo "$line" | grep -q "no"; then + break + fi + done & +fi diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 7d6b339f..043c3c96 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -5,6 +5,7 @@ # WALLPAPERS PATH wallDIR="$HOME/Pictures/wallpapers" SCRIPTSDIR="$HOME/.config/hypr/scripts" +iDIR="$HOME/.config/swaync/icons" # variables focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') @@ -106,4 +107,27 @@ wait $! wait $! sleep 2 -"$SCRIPTSDIR/Refresh.sh" \ No newline at end of file +"$SCRIPTSDIR/Refresh.sh" + +sleep 2 +sddm_sequoia="/usr/share/sddm/themes/sequoia_2" +if [ -d "$sddm_sequoia" ]; then + notify-send -i "$iDIR/picture.png" "Set wallpaper" "as SDDM background?" \ + -t 10000 \ + -A "yes=Yes" \ + -A "no=No" \ + -h string:x-canonical-private-synchronous:wallpaper-notify + + # Wait for user input using a background process + dbus-monitor "interface='org.freedesktop.Notifications',member='ActionInvoked'" | + while read -r line; do + if echo "$line" | grep -q "yes"; then + # User chose "Yes", copy the wallpaper with correct syntax + pkexec /usr/bin/cp -r "$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" "$sddm_sequoia/backgrounds/default" + notify-send -i "$iDIR/picture.png" "SDDM" "Background SET" + break + elif echo "$line" | grep -q "no"; then + break + fi + done & +fi -- cgit v1.2.3 From f2fd8261f187e6394cff5be695c943b49b1b05a9 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 3 Feb 2025 20:15:32 +0900 Subject: add delay of 5 secords for those who have slow machines --- config/hypr/UserScripts/WallpaperEffects.sh | 2 +- config/hypr/UserScripts/WallpaperSelect.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 14da323d..0a599deb 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -99,7 +99,7 @@ fi main -sleep 2 +sleep 5 # add delay of 5 secords for those who have slow machines # supports sddm sequoia_2 theme only sddm_sequoia="/usr/share/sddm/themes/sequoia_2" if [ -d "$sddm_sequoia" ]; then diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 043c3c96..b40ec62c 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -109,7 +109,7 @@ wait $! sleep 2 "$SCRIPTSDIR/Refresh.sh" -sleep 2 +sleep 5 # add delay of 5 secords for those who have slow machines sddm_sequoia="/usr/share/sddm/themes/sequoia_2" if [ -d "$sddm_sequoia" ]; then notify-send -i "$iDIR/picture.png" "Set wallpaper" "as SDDM background?" \ -- cgit v1.2.3 From 4e0eebb8cd368e9018875eaad24e5fa8b4319c56 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 4 Feb 2025 12:07:21 +0900 Subject: All more wallpaper effects. New default wallpaper --- config/hypr/UserScripts/WallpaperEffects.sh | 5 ++++- config/hypr/wallpaper_effects/.wallpaper_current | Bin 1072854 -> 1031389 bytes 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 0a599deb..8a604e46 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -27,6 +27,8 @@ declare -A effects=( ["Charcoal"]="magick $current_wallpaper -charcoal 0x5 $wallpaper_output" ["Edge Detect"]="magick $current_wallpaper -edge 1 $wallpaper_output" ["Emboss"]="magick $current_wallpaper -emboss 0x5 $wallpaper_output" + ["Frame Raised"]="magick $current_wallpaper +raise 150 $wallpaper_output" + ["Frame Sunk"]="magick $current_wallpaper -raise 150 $wallpaper_output" ["Negate"]="magick $current_wallpaper -negate $wallpaper_output" ["Oil Paint"]="magick $current_wallpaper -paint 4 $wallpaper_output" ["Posterize"]="magick $current_wallpaper -posterize 4 $wallpaper_output" @@ -34,7 +36,8 @@ declare -A effects=( ["Sepia Tone"]="magick $current_wallpaper -sepia-tone 65% $wallpaper_output" ["Solarize"]="magick $current_wallpaper -solarize 80% $wallpaper_output" ["Sharpen"]="magick $current_wallpaper -sharpen 0x5 $wallpaper_output" - ["Vignette"]="magick $current_wallpaper -vignette 0x5 $wallpaper_output" + ["Vignette"]="magick $current_wallpaper -vignette 0x3 $wallpaper_output" + ["Vignette-black"]="magick $current_wallpaper -background black -vignette 0x3 $wallpaper_output" ["Zoomed"]="magick $current_wallpaper -gravity Center -extent 1:1 $wallpaper_output" ) diff --git a/config/hypr/wallpaper_effects/.wallpaper_current b/config/hypr/wallpaper_effects/.wallpaper_current index 5a39f08c..c42ae068 100644 Binary files a/config/hypr/wallpaper_effects/.wallpaper_current and b/config/hypr/wallpaper_effects/.wallpaper_current differ -- cgit v1.2.3 From 40cd9976f402a0810503eb2b5356d00c79e5fcdd Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 5 Feb 2025 16:57:09 +0900 Subject: switched to kitty from pkexec --- config/hypr/UserScripts/WallpaperEffects.sh | 16 +++++++++------- config/hypr/UserScripts/WallpaperSelect.sh | 21 ++++++++++++++------- 2 files changed, 23 insertions(+), 14 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 8a604e46..e12db3cf 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -3,6 +3,8 @@ # Wallpaper Effects using ImageMagick (SUPER SHIFT W) # Variables +terminal=kitty + current_wallpaper="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" wallpaper_output="$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified" SCRIPTSDIR="$HOME/.config/hypr/scripts" @@ -102,22 +104,22 @@ fi main -sleep 5 # add delay of 5 secords for those who have slow machines -# supports sddm sequoia_2 theme only +sleep 3 # add delay of 3 seconds for those who have slow machines sddm_sequoia="/usr/share/sddm/themes/sequoia_2" if [ -d "$sddm_sequoia" ]; then - notify-send -i "$iDIRi/picture.png" "Set wallpaper" "as SDDM background?" \ + notify-send -i "$iDIR/ja.png" "Set wallpaper" "as SDDM background?" \ -t 10000 \ -A "yes=Yes" \ -A "no=No" \ -h string:x-canonical-private-synchronous:wallpaper-notify + # Wait for user input using a background process dbus-monitor "interface='org.freedesktop.Notifications',member='ActionInvoked'" | while read -r line; do - if echo "$line" | grep -q "yes"; then - # User chose "Yes", copy the wallpaper with correct syntax - pkexec /usr/bin/cp -r "$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified" "$sddm_sequoia/backgrounds/default" - notify-send -i "$iDIRi/picture.png" "SDDM" "Background SET" + if echo "$line" | grep -q "yes"; then + $terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \ + sudo cp -r $wallpaper_output '$sddm_sequoia/backgrounds/default' && \ + notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'" break elif echo "$line" | grep -q "no"; then break diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index b40ec62c..feae485b 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -3,9 +3,15 @@ # This script for selecting wallpapers (SUPER W) # WALLPAPERS PATH +terminal=kitty + wallDIR="$HOME/Pictures/wallpapers" SCRIPTSDIR="$HOME/.config/hypr/scripts" -iDIR="$HOME/.config/swaync/icons" +wallpaper_current="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" + +# Directory for swaync +iDIR="$HOME/.config/swaync/images" +iDIRi="$HOME/.config/swaync/icons" # variables focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') @@ -109,10 +115,10 @@ wait $! sleep 2 "$SCRIPTSDIR/Refresh.sh" -sleep 5 # add delay of 5 secords for those who have slow machines +sleep 3 # add delay of 3 seconds for those who have slow machines sddm_sequoia="/usr/share/sddm/themes/sequoia_2" if [ -d "$sddm_sequoia" ]; then - notify-send -i "$iDIR/picture.png" "Set wallpaper" "as SDDM background?" \ + notify-send -i "$iDIR/ja.png" "Set wallpaper" "as SDDM background?" \ -t 10000 \ -A "yes=Yes" \ -A "no=No" \ @@ -121,13 +127,14 @@ if [ -d "$sddm_sequoia" ]; then # Wait for user input using a background process dbus-monitor "interface='org.freedesktop.Notifications',member='ActionInvoked'" | while read -r line; do - if echo "$line" | grep -q "yes"; then - # User chose "Yes", copy the wallpaper with correct syntax - pkexec /usr/bin/cp -r "$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" "$sddm_sequoia/backgrounds/default" - notify-send -i "$iDIR/picture.png" "SDDM" "Background SET" + if echo "$line" | grep -q "yes"; then + $terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \ + sudo cp -r $wallpaper_current '$sddm_sequoia/backgrounds/default' && \ + notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'" break elif echo "$line" | grep -q "no"; then break fi done & fi + -- cgit v1.2.3