dotfiles-mirror/local/bin/setwall.sh
2025-10-26 23:13:27 +03:30

8 lines
315 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
WALL_DIR="/home/coast/.local/src/wall"
SUBDIR=$(find "$WALL_DIR" -mindepth 1 -maxdepth 1 -type d | shuf -n1)
FILE=$(find "$SUBDIR" -type f \( -iname '*.jpg' -o -iname '*.png' -o -iname '*.jpeg' \) | shuf -n1)
if [[ -n "$FILE" ]]; then
swaymsg output '*' bg "$FILE" fill
fi