diff options
Diffstat (limited to 'config/hypr/UserScripts')
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperEffects.sh | 32 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperSelect.sh | 33 |
2 files changed, 62 insertions, 3 deletions
diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index ccb5b744..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" @@ -10,6 +12,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 @@ -26,6 +29,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" @@ -33,7 +38,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" ) @@ -62,7 +68,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 +103,26 @@ if pidof rofi > /dev/null; then fi main + +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/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 + $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 + fi + done & +fi diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 7d6b339f..feae485b 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -3,8 +3,15 @@ # This script for selecting wallpapers (SUPER W) # WALLPAPERS PATH +terminal=kitty + wallDIR="$HOME/Pictures/wallpapers" SCRIPTSDIR="$HOME/.config/hypr/scripts" +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}') @@ -106,4 +113,28 @@ wait $! wait $! sleep 2 -"$SCRIPTSDIR/Refresh.sh"
\ No newline at end of file +"$SCRIPTSDIR/Refresh.sh" + +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/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 + $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 + |
