Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Maintainer: Aditya <contact@aditya-verma.me>
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=(
Expand All @@ -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"
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -59,15 +61,18 @@ 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)
- [`xwallpaper`](https://github.com/stoeckmann/xwallpaper)

**Optional:**
- `libnotify` — for error notifications via `notify-send`
- `waypaper` — for selecting the setter/back-end and more features

---

Expand Down
20 changes: 17 additions & 3 deletions fuzz-wall
Original file line number Diff line number Diff line change
@@ -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() {
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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