diff --git a/.config/hypr/pyprland.toml b/.config/hypr/pyprland.toml index f235fcb9..9e922f99 100644 --- a/.config/hypr/pyprland.toml +++ b/.config/hypr/pyprland.toml @@ -1,5 +1,5 @@ [pyprland] -plugins = ["scratchpads", "magnify", "wallpapers"] +plugins = ["scratchpads", "magnify"] [scratchpads.volume] command = "pavucontrol" diff --git a/.config/hypr/scripts/autostart/services b/.config/hypr/scripts/autostart/services index c21b402a..a06e9b5f 100755 --- a/.config/hypr/scripts/autostart/services +++ b/.config/hypr/scripts/autostart/services @@ -3,10 +3,6 @@ # Automounter for removable media udiskie & -# Wallpaper Backend -hyprpaper & -"$HOME"/.config/hypr/scripts/random_wallpaper_hyprpaper & - # Pyprland Daemon pypr --debug /tmp/pypr.log & @@ -37,3 +33,8 @@ wl-paste --watch cliphist store & # Audio easyeffects --gapplication-service & + +# Wallpaper Backend +hyprpaper & +# swww-daemon --format xrgb & +"$HOME"/.config/hypr/scripts/random_wallpaper & diff --git a/.config/hypr/scripts/random_wallpaper b/.config/hypr/scripts/random_wallpaper new file mode 100755 index 00000000..0a8eab5a --- /dev/null +++ b/.config/hypr/scripts/random_wallpaper @@ -0,0 +1,17 @@ +#!/usr/bin/bash + +WALLPAPER_DIR="$HOME/.config/hypr/theme/walls" + +random=$(fd --base-directory "$WALLPAPER_DIR" --type f . | shuf -n 1) + +WALLPAPER="$WALLPAPER_DIR/$random" + +if pgrep -x "hyprpaper" >/dev/null; then + hyprctl hyprpaper reload ,"$WALLPAPER" && notify-send "Wallpaper Changed" -i "$WALLPAPER" --app-name=Wallpaper +elif pgrep -x "swww" >/dev/null; then + swww img "$WALLPAPER" \ + --transition-bezier 0.5,1.19,.8,.4 \ + --transition-type wipe \ + --transition-duration 2 \ + --transition-fps 75 && notify-send "Wallpaper Changed" -i "$WALLPAPER" --app-name=Wallpaper +fi diff --git a/.config/hypr/scripts/random_wallpaper_hyprpaper b/.config/hypr/scripts/random_wallpaper_hyprpaper deleted file mode 100755 index 11cdc412..00000000 --- a/.config/hypr/scripts/random_wallpaper_hyprpaper +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -WALLPAPER_DIR="$HOME/.config/hypr/theme/walls" -CURRENT_WALL=$(hyprctl hyprpaper listloaded) - -WALLPAPER=$(find "$WALLPAPER_DIR" -type f ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1) - -hyprctl hyprpaper reload ,"$WALLPAPER" && notify-send "Wallpaper Changed" -i "$WALLPAPER" --app-name=Wallpaper diff --git a/.config/hypr/scripts/random_wallpaper_swww b/.config/hypr/scripts/random_wallpaper_swww deleted file mode 100755 index 3c06ac05..00000000 --- a/.config/hypr/scripts/random_wallpaper_swww +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/bash - -random=$(fd --base-directory "$HOME/.config/hypr/theme/walls/" --type f . | shuf -n 1) - -wallpaper="$HOME/.config/hypr/theme/walls/$random" - -swww img "$wallpaper" \ - --transition-bezier 0.5,1.19,.8,.4 \ - --transition-type wipe \ - --transition-duration 2 \ - --transition-fps 75 && notify-send "Wallpaper Changed" -i "$wallpaper" --app-name=Wallpaper