diff --git a/PKGBUILD b/PKGBUILD index 8661894..76a29c7 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Aditya pkgname=fuzz-wall -pkgver=1.0.1 +pkgver=1.0.2 pkgrel=1 pkgdesc="A fuzzel-based wallpaper picker supporting multiple WMs and wallpaper setters" arch=('any') -url="https://github.com/youngcoder45/fuzz-wall" +url="https://github.com/krambo345/fuzz-wall" license=('MIT') depends=('fuzzel') optdepends=( @@ -16,7 +16,7 @@ optdepends=( 'libnotify: Desktop notifications support' ) source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") -sha256sums=('4dfbcf7885888ad6ccd5e448ff065f5c997852c48d6a832949ad01ffc306490a') +sha256sums=('b021d649ce3a5902a0b6396f27131f6065f3fcdd1ff8b1e9d951a14908a78661') package() { cd "$srcdir/$pkgname-$pkgver" diff --git a/README.md b/README.md index 5ac4d70..4cfe387 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,10 @@ It auto-detects your wallpaper setter, works on both Wayland and X11, and has ze | Setter | Session | Used by | |---|---|---| +| mpvpaper | Wayland | Hyprland, Sway | | swaybg | Wayland | Sway | -| swww | Wayland | Hyprland (with fade transitions) | +| awww | Wayland | Hyprland (with transitions) | +| swww(retired) | Wayland | Hyprland (with transitions) | | hyprpaper | Wayland | Hyprland | | feh | X11 | i3, bspwm, dwm | | nitrogen | X11 | openbox, bspwm | @@ -59,8 +61,10 @@ fuzz-wall picks whichever one is installed. If you have multiple, it prefers in **Required:** - [`fuzzel`](https://codeberg.org/dnkl/fuzzel) -**At least one wallpaper setter:** +**At least one wallpaper setter/back-end:** +- [`mpvpaper`](https://github.com/GhostNaN/mpvpaper) - [`swaybg`](https://github.com/swaywm/swaybg) +- [`awww`](https://codeberg.org/LGFae/awww) - [`swww`](https://github.com/LGFae/swww) - [`feh`](https://feh.finalrewind.org/) - [`nitrogen`](https://github.com/l3ib/nitrogen) @@ -68,6 +72,7 @@ fuzz-wall picks whichever one is installed. If you have multiple, it prefers in **Optional:** - `libnotify` — for error notifications via `notify-send` +- `waypaper` — for selecting the setter/back-end and more features --- diff --git a/fuzz-wall b/fuzz-wall index 1c3988a..5624b05 100644 --- a/fuzz-wall +++ b/fuzz-wall @@ -1,6 +1,7 @@ #!/bin/sh # fuzz-wall - A fuzzel-based wallpaper picker -# Supports: swaybg, hyprpaper, feh, nitrogen, xwallpaper, swww +# Supports: awww, mpvpaper, waypaper, swaybg, hyprpaper, feh, nitrogen, xwallpaper, swww + # Find wallpaper directory find_walldir() { @@ -21,7 +22,7 @@ WALLDIR="${FUZZ_WALL_DIR:-$(find_walldir)}" # Detect wallpaper setter detect_setter() { if [ -n "$WAYLAND_DISPLAY" ]; then - for cmd in swww swaybg hyprpaper xwallpaper; do + for cmd in mpvpaper awww swww swaybg hyprpaper xwallpaper; do command -v "$cmd" >/dev/null 2>&1 && echo "$cmd" && return done fi @@ -36,10 +37,16 @@ set_wallpaper() { WALL="$1" SETTER="$2" case "$SETTER" in + mpvpaper) + pkill mpvpaper 2>/dev/null + mpvpaper '*' "$WALL" --loop-file=inf --mpv-options="--loop" & + ;; swaybg) pkill swaybg 2>/dev/null swaybg -i "$WALL" -m fill & ;; + awww) + awww img "$WALL" --transition-type fade ;; swww) swww img "$WALL" --transition-type fade ;; hyprpaper) @@ -66,10 +73,17 @@ fi command -v fuzzel >/dev/null 2>&1 || { echo "fuzzel not found"; exit 1; } +WAYPAPER=0 +command -v waypaper >/dev/null 2>&1 && WAYPAPER=1 + SETTER=$(detect_setter) while true; do WALL=$(ls "$WALLDIR" | fuzzel --dmenu --prompt "Wallpaper (ESC to exit) > ") [ -z "$WALL" ] && exit 0 - set_wallpaper "$WALLDIR/$WALL" "$SETTER" + if [ "$WAYPAPER" -eq 1 ]; then + waypaper --wallpaper "$WALLDIR/$WALL" + else + set_wallpaper "$WALLDIR/$WALL" "$SETTER" + fi done