♻️ refactor(hypr): use hyprpaper instead of swww

This commit is contained in:
Sergio Laín 2025-04-20 14:08:02 +02:00
parent fabd1695f9
commit 1a9f1052ae
No known key found for this signature in database
GPG key ID: 51BB28D8B42FB438
5 changed files with 22 additions and 9 deletions

View file

@ -49,7 +49,7 @@ bind = $mainMod, D, exec, pypr toggle dots
## Other Modules ## Other Modules
bind = $mainMod, Z, exec, pypr zoom bind = $mainMod, Z, exec, pypr zoom
bind = $mainMod CTRL, W, exec, pypr wall next bind = $mainMod CTRL, W, exec, $scripts/random_wallpaper_hyprpaper
# Windows # Windows
## Basic Operations ## Basic Operations

View file

@ -4,7 +4,8 @@
udiskie & udiskie &
# Wallpaper Backend # Wallpaper Backend
swww-daemon --format xrgb & hyprpaper &
"$HOME"/.config/hypr/scripts/random_wallpaper_hyprpaper &
# Pyprland Daemon # Pyprland Daemon
pypr --debug /tmp/pypr.log & pypr --debug /tmp/pypr.log &
@ -31,7 +32,7 @@ wl-paste --watch cliphist store &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
# Screen sharing and portals # Screen sharing and portals
"$HOME"/.config/hypr/portal & "$HOME"/.config/hypr/scripts/portal &
# xwaylandvideobridge & # Off when using Vesktop instead of Discord # xwaylandvideobridge & # Off when using Vesktop instead of Discord
# Audio # Audio

View file

@ -0,0 +1,8 @@
#!/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

View file

@ -20,12 +20,16 @@ choice=$(
$rofi_cmd $rofi_cmd
) )
wallpaper="$wallpapers_dir/$choice" WALLPAPER="$wallpapers_dir/$choice"
swww img "$wallpaper" \ if pgrep -x "hyprpaper" >/dev/null; then
--transition-bezier 0.5,1.19,.8,.4 \ hyprctl hyprpaper reload ,"$WALLPAPER" && notify-send "Wallpaper Changed" -i "$WALLPAPER" --app-name=Wallpaper
--transition-type wipe \ elif pgrep -x "swww" >/dev/null; then
--transition-duration 2 \ swww img "$WALLPAPER" \
--transition-fps 75 && notify-send "Wallpaper Changed" -i "$wallpaper" --app-name=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
exit 1 exit 1